gstreamer + vivid

Michael Tretter m.tretter at pengutronix.de
Thu Aug 31 13:38:52 UTC 2023


On Sun, 27 Aug 2023 23:04:57 +0300, Regine Issan via gstreamer-devel wrote:
> I am trying to use gstreamer with vivid .
> the idea is to use vivid to  simulate 4 virtaul cameras.
> Then, use gstreamer to write images to these virtual cameras.
> when i try writing to the device using gstreamer,i get the following error
> "device '/dev/video3' is not a output device".
> I was using the following link  to ensure that the devices are set as
> output devices:
> https://www.kernel.org/doc/html/v4.14/media/v4l-drivers/vivid.html
> details below.
> I will appriviate any advise.
> Thanks !
> 
> 1.  sudo modprobe -r vivid
> 2.  sudo modprobe vivid num_outputs=4 output_types=0x00
> 3. v4l2-ctl --list-devices
>     result:
>     vivid (platform:vivid-000):
>    /dev/video3
>    /dev/video4
>    /dev/video5
>    /dev/video6
>    /dev/radio0
>   /dev/radio1
>   /dev/vbi0
>   /dev/vbi1
>   /dev/swradio0
>   /dev/v4l-touch0
>   /dev/media1
> 4.
>  gst-launch-1.0 -v multifilesrc location=./%05d.png loop=1
> caps="image/png,framerate=30/1" ! pngdec ! videoconvert !
> "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video3
> return error:
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device
> '/dev/video3' is not a output device.
> Additional debug info:
> ../sys/v4l2/v4l2_calls.c(636): gst_v4l2_open ():
> /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
> Capabilities: 0x5230005

Your device lacks the "Video Output" Capability. Bit 1 (0x2) should be set
here. Use `v4l2-ctl -D -d /dev/video3` to show the device information in a
readable format.

Vivid creates 4 capture devices unless the num_inputs parameter is overridden
or input is disabled via the node_types parameter.

Check that /sys/module/vivid/parameters/node_types has bit 8 set in the first
node (more precisely, (node_type & 0x40300)). If this is not the case, set
node_types when loading vivid to the types that you are expecting.

Michael

> ERROR: pipeline doesn't want to preroll.
> Failed to set pipeline to PAUSED.
> 
> 5. same for video4,5,6


More information about the gstreamer-devel mailing list