uvcsink using arbitrary sources

Michael Tretter m.tretter at pengutronix.de
Thu Aug 31 13:53:48 UTC 2023


On Fri, 18 Aug 2023 14:18:04 +0200, Markus Fritsche via gstreamer-devel wrote:
> I have a Raspberry Pi Zero 2 W set up as an USB gadget. This is recognized on my host correctly as
> 
> ioctl: VIDIOC_ENUM_FMT
>        Type: Video Capture
> 
>        [0]: 'YUYV' (YUYV 4:2:2)
>                Size: Discrete 640x360
>                        Interval: Discrete 0.010s (100.000 fps)
>                        Interval: Discrete 0.067s (15.000 fps)
>                        Interval: Discrete 0.500s (2.000 fps)
> 
> If I start the pipeline
> 
> gst-launch-1.0 videotestsrc ! queue ! uvcsink v4l2sink::device=/dev/video0
> 
> on the RPI and then open the UVC device on my host, I can see the test video just fine. However, if I start
> 
> gst-launch-1.0v4l2src  ! video/x-raw,width=640,height=360 ! tee name="local"! queue ! jpegenc ! rtpjpegpay ! udpsink host=192.168.88.51 port= 5000
> 
> on my host and
> 
> gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! queue ! jpegdec ! uvcsink v4l2sink::device=/dev/video0
> 
> on the rpi, the run time counter on the rpi just stops (no other error is being printed) and vlc on my host cannot open the video stream.

What happens right before the counter stops? Does it stop, when you try to
open the UVC device on your host or already before?

> 
> Is this supposed to work?

I never tested a pipeline with a udpsrc to uvcsink, but it should work. The
uvcsink has quite elaborate handling of the stream start as the uvcsink starts
with the GStreamer pipeline, but switches to the internal v4l2sink only when
the host starts streaming.

> 
> What additional info should I provide?

Can you test if the patches in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5170 help?

Please also provide the log of the pipeline with GST_DEBUG=uvcsink:5. The
uvcsink should log its internal state changes and there should be something
right before the pipeline stops.

Michael


More information about the gstreamer-devel mailing list