gst-rtsp-server multiple clients cannot see same video

Alan Petrus dartagnan64b at gmail.com
Wed Mar 9 13:17:26 UTC 2022


Hi Michael,

Thanks for replying.  The gst_rtsp_media_factory_set_shared is already
being called on line 76 of examples/test-launch.c
https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/blob/master/examples/test-launch.c#L76
The default v4l2h264enc h264_i_frame_period is 60 and the video FPS is 20;
could this be contributing to connection not establishing as well (don't
know if rtsp server starts new client at next or previous keyframe).  Any
other suggestion to mitigate issue with v4l2src and pipelines?

Thanks

On Wed, Mar 9, 2022 at 12:30 AM Michael Gruner <michael.gruner at ridgerun.com>
wrote:

> 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/20220309/6b6ad2be/attachment.htm>


More information about the gstreamer-devel mailing list