Gstreamer shared memory issue

ghizlane ghizlane.boudabza at
Fri May 28 11:34:52 UTC 2021


I have a question regarding an issue we have with a shmsink pipeline and
multiple shmsrc pipelines "connected" to the same shared memory.

I run a producer pipeline like this one:
gst-launch-1.0 videotestsrc ! "video/x-raw,width=(int)320, height=(int)240"
! x264enc key-int-max=30 bitrate=2500 ! mux. audiotestsrc ! audio/x-raw !
voaacenc bitrate=192 ! mux. mpegtsmux name=mux ! shmsink
socket-path=/tmp/foo shm-size=10000000 wait-for-connection=false

And I've got 2 consumer pipelines "connected" to the shared mem of producer

Consumer pipeline 1 (forward to rtmp server):
gst-launch-1.0 shmsrc socket-path=/tmp/foo ! tsparse ! tsdemux name=d d. !
h264parse ! queue ! mux. flvmux name=mux ! rtmpsink
location=rtmp://{host}/{key} d. ! aacparse ! queue ! mux.

Consumer pipeline 2 (forward to srt server):
gst-launch-1.0 shmsrc socket-path=/tmp/foo ! video/mpegts ! queue ! srtsink
uri=srt://{host1}:{port1} mode=caller

As soon as the rtmp server or the srt server becomes unreachable, that is to
say as soon as 1 of the consumer pipelines fails, the other consumer
pipeline gets interrupted as well.
So let's say srt pipeline fails because srt server is unreachable, rtmp
pipeline is blocked as well although rtmp server is reachable.
The expected behavior would be to have rtmp pipeline keep on working
properly, consuming data from the shared memory, even if srt pipeline fails.

Does someone else already experienced this kind of issue?

Thanks a lot,


Sent from:

More information about the gstreamer-devel mailing list