gst-rtsp-server multiple clients cannot see same video
Michael Gruner
michael.gruner at ridgerun.com
Wed Mar 9 05:30:04 UTC 2022
The problem is v4l2src and not gstrtspserver. Every time a new client connects, a new “pipeline” (called media in the server context) is created and played. The problem, I believe, is that the first client already has the device occupied.
Try setting gst_rtsp_media_factory_set_shared to true so that all clients share the same camera.
https://gstreamer.freedesktop.org/documentation/gst-rtsp-server/rtsp-media-factory.html?gi-language=c#gst_rtsp_media_factory_set_shared
Michael
> On 8 Mar 2022, at 22:29, Alan Petrus via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>
>
> Hello,
>
> I'm running test-launch.c from the gst-rtsp-server examples folder without any modifications; when the second client connects it kicks the first connected client. How can I get multiple clients to see the same video from a USB camera? (rtsp over tcp)
>
> Here is my pipeline:
> v4l2src device=/dev/video0 do-timestamp=true ! image/jpeg,width=1920,height=1080,framerate=20/1 ! jpegparse ! queue leaky=2 ! v4l2jpegdec output-io-mode=4 capture-io-mode=0 ! v4l2convert ! queue ! v4l2h264enc output-io-mode=5 capture-io-mode=4 extra-controls=controls,video_bitrate=4000000,repeat_sequence_header=1,h264_level=13,h264_profile=4; ! capsfilter caps=\"video/x-h264,profile=high,level=(string)4.2\" ! queue ! h264parse config-interval=-1 ! rtph264pay pt=96 name=pay0
>
> logs:
> https://pastebin.com/geE40G0M
>
> Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220308/8bb72458/attachment.htm>
More information about the gstreamer-devel
mailing list