sending raw video of varying dimensions through shmsink

Matt Feury mattfeury at
Mon Feb 6 16:05:08 UTC 2023


i have two pipelines sharing video data between processes via
shmsink/shmsrc. This has been working well because the data is already h264
encoded. However, I'm now interested in sharing video/x-raw between these
pipelines. Currently i'm able to do so by explicitly defining caps with the
video dimensions like so:

Sending pipeline:

gst-launch-1.0 -v rtspsrc location="..." ! decodebin ! queue ! clockoverlay
! identity ! shmsink wait-for-connection=false socket-path=/tmp/tmpsock

Receiving pipeline:

gst-launch-1.0 shmsrc socket-path=/tmp/tmpsock ! "video/x-raw,
format=(string)I420,  width=(int)320, height=(int)240,
framerate=(fraction)30/1" ! x264enc ! appsink

This works well when the width/height are explicitly known. However, since
this will be used across many rtspsrcs, I don't have any way to know the
dimensions. I'd like to find some way to share this data across
shmsink/shmsrc, but without the full raw caps, the shmsrc has trouble
processing the buffers.

Does anyone have any thoughts as to ways I could approach this?

I tried to add a rtpvrawpay/rtpvrawdepay on both sides, thinking RTP may be
able to provide the metadata, but I'm seeing rejected caps with "no width
specified" messaged in that case.

An alternative is not to use shmsink and try to do something like
ipcpipeline, but that feels like a much bigger change than I'd like to do
right now. So I'm wondering: is there any way to share raw video between
shmsink/shmsrc in such a way that it supports variable dimensions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list