3

I set a dummy camera /dev/video1 with v4l2loopback module.

I can read the stream with ffplay, vlc or even zoom of this camera when I send to it contentwith ffmpeg:

ffmpeg -re -i input-file.mp4 -f v4l2 /dev/video1

Redirecting a real camera to the dummy works too:

ffmpeg -i /dev/video0 -f v4l2 /dev/video1

However, when I try to Guvcview (2.0.6), I still get the error "Invalid pixel format", then the error "invalid resolution index". Guvcview works with the real camera (video0).

So I checked both cameras with the command v4l2-ctl --list-formats:

  • video0 (true camera)

      ioctl: VIDIOC_ENUM_FMT
              Index       : 0
              Type        : Video Capture
              Pixel Format: 'YUYV'
              Name        : YUYV 4:2:2
    
          Index       : 1
          Type        : Video Capture
          Pixel Format: 'MJPG' (compressed)
          Name        : Motion-JPEG
    

  • video1 (fake one)

      ioctl: VIDIOC_ENUM_FMT
              Index       : 0
              Type        : Video Capture
              Pixel Format: 'YUYV'
              Name        : YUYV 4:2:2
    

They both accept the pixel format YUV 4:2:2. So I passed -pix_fmt yuyv422 to ffmpeg (and tried other formats) to explicitely use this as pixel format output (so after the -i input-y argument) but it didn't worked neither.

Am I missing something?

Amessihel
  • 355

0 Answers0