gstreamer + vivid
Michael Tretter
m.tretter at pengutronix.de
Wed Oct 4 14:06:20 UTC 2023
On Wed, 27 Sep 2023 12:53:11 +0300, Regine Issan wrote:
> Hello Michael,
> Thak you for your replay.
> It seems that my vivid video device is an output device, but it still
> complains it is not.
> any idea ?
>
>
>
> 1. The error i get :video2 is not an output device
> gst-launch-1.0 -v multifilesrc location=./%04d.png loop=1
> caps="image/png,framerate=30/1" ! pngdec ! videoconvert !
> "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video2
>
> Setting pipeline to PAUSED ...
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device
> '/dev/video2' is not a output device.
> Additional debug info:
> ../sys/v4l2/v4l2_calls.c(636): gst_v4l2_open ():
> /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
> Capabilities: 0x5230005
> ERROR: pipeline doesn't want to preroll.
> Failed to set pipeline to PAUSED.
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
>
> 2. seems like it is an output device
>
> v4l2-ctl -D -d /dev/video2
...
> Capabilities : 0x9dbf0df7
> Video Capture
> Video Output
The driver instance has Output capabilities
...
> Device Caps : 0x05230005
> Video Capture
> Video Overlay
but /dev/video2 still lacks the output capability.
Check if there are other video devices created by Vivid that actually are
Output devices. The Vivid video devices do not necessarily have the same
capabilities.
As your driver instance still supports Capture, it may still create 4 Capture
devices. If you don't need input devices at all, you may load vivid with
modprobe vivid num_inputs=0 num_outputs=4 output_types=0x00
Michael
> Tuner
> Audio
> Read/Write
> Streaming
> Extended Pix Format
> Media Driver Info:
> Driver name : vivid
> Model : vivid
> Serial :
> Bus info : platform:vivid-000
> Media version : 6.2.16
> Hardware revision: 0x00000000 (0)
> Driver version : 6.2.16
> Interface Info:
> ID : 0x03000003
> Type : V4L Video
> Entity Info:
> ID : 0x00000001 (1)
> Name : vivid-000-vid-cap
> Function : V4L2 I/O
> Pad 0x01000002 : 0: Sink
>
> On Thu, Aug 31, 2023 at 4:38 PM Michael Tretter <m.tretter at pengutronix.de>
> wrote:
>
> > 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