Problem with creating a virtual camera with v4l2loopback

I want to create a virtual webcam but, when I run my program, I have this error:

[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module capsfilter1  reported: Filter caps do not completely specify the output format

I had setup my vitrual camera with this comman:

sudo modprobe v4l2loopback card_label="robotechnicCam" exclusive_caps=1

I use a fork of ofxGstV4L2Sink which you can found here
And here is the output of this command

v4l2-ctl --all -d 2 
Driver Info:
        Driver name      : v4l2 loopback
        Card type        : robotechnicCam
        Bus info         : platform:v4l2loopback-000
        Driver version   : 5.11.11
        Capabilities     : 0x85208002
                Video Output
                Video Memory-to-Memory
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x05208002
                Video Output
                Video Memory-to-Memory
                Extended Pix Format
Priority: 2
Video output: 0 (loopback in)
Format Video Output:
        Width/Height      : 8192/8192
        Pixel Format      : 'YVYU' (YVYU 4:2:2)
        Field             : None
        Bytes per Line    : 16384
        Size Image        : 134217728
        Colorspace        : sRGB
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Limited Range)
        Flags             : 
Streaming Parameters Video Capture:
        Frames per second: 30.000 (30/1)
        Read buffers     : 2
Streaming Parameters Video Output:
        Frames per second: 30.000 (30/1)
        Write buffers    : 2

User Controls

                    keep_format 0x0098f900 (bool)   : default=0 value=0
              sustain_framerate 0x0098f901 (bool)   : default=0 value=0
                        timeout 0x0098f902 (int)    : min=0 max=100000 step=1 default=0 value=0
               timeout_image_io 0x0098f903 (bool)   : default=0 value=0

And if I do that:

gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video2

or that:

ffmpeg -re -i ./test.mp4 -f v4l2 /dev/video2

It works perfectly so, I don’t know why this doesn’t work as expected with my code.

I ave fixed my problem by creating my own add-ons:
This module is based on this lib:

1 Like

FYI, I fixed that addon here:

I created some new examples and updated the documentation