v4l2loopback issue on Ubuntu Desktop 18.04 LTS (ioctl(VIDIOC_G_FMT): Invalid argument)
See original GitHub issueOn this thread for discord-monitors-to-vc, an issue came up and I was advised to open up a thread here on the fork.
Summary: What started as a “I can’t get discord-monitors-to-vc to install” issue morphed into a “I can’t get Mon2Cam to work” issue, and it apparently has something to do with ffmepg. Here is the output when running in debug mode:
Monitors: 2
0: +*DVI-I-2 1920/518x1200/324+1920+0 DVI-I-2
1: +DVI-I-3 1920/518x1200/324+0+0 DVI-I-3
Which monitor: 0
CTRL + C to stop
Your screen will look mirrored for you, not others
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[x11grab @ 0x55df90f3a780] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':1+1920,0':
Duration: N/A, start: 1571330840.250214, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1200, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[v4l2 @ 0x55df90f44500] ioctl(VIDIOC_G_FMT): Invalid argument
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!
Issue Analytics
- State:
- Created 4 years ago
- Comments:24 (12 by maintainers)
Top Results From Across the Web
18.04 ffmpeg: Play mp4 on fake webcam, "Conversion ...
The error from the ffmpeg command: ioctl(VIDIOC_G_FMT): Invalid argument Could not write header for output file #0 (incorrect codec parameters ...
Read more >Cannot encode to v4l2loopback
I installed v4l2loopback using these instructions to build from source. ... 0x55f83cd2e100] ioctl(VIDIOC_G_FMT): Invalid argument Could not ...
Read more >Ubuntu ffmpeg fake webcam with mp4 error - linux
It showing yuyv422 and several widthxheight makes me assume another video device is active. I can only get ioctl(VIDIOC_G_FMT): Invalid argument ...
Read more >IOError when trying to use PyFakeWebcam - python
So, I was recently trying to use PyFakeWebcam, but I have ran into a bit of a problem. Whenever I try to do...
Read more >Streaming to v4l2loopback(/dev/video2) device fails with ...
[v4l2 @ 0x55eae9e50ec0] ioctl(VIDIOC_G_FMT): Invalid argument. What i'm doing wrong? my video file is an uncompressed avi file and my goal ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh yeah I totally forgot that I had to compile v4l2l myself aswell. I’m glad you finally got it working 😃
-b is just border, there’s no value for it, but it’s only needed for non 16:9 screens, glad you got it working