-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ioctl(VIDIOC_G_FMT): invalid argument ,could not write header for output file (incorrect codec parameters ) invalid argument #247
Comments
I am having the same issue. |
Same here |
hashtag me too! |
I encountered the same problem on UBUNTU 18.04 LTS, but it seems to only appear on 18.04 LTS platform, install In addition, I also tried to compile and install the code of v4l2loopback from git on the x64 platform, because I found that the v4l2loopback installed by Raspberry Pi 19.10 using apt is the version of |
I tested UBUNTU 19.10 on the x64 platform and found that v4l2loopback works normally. The installed version is the same as that of the Raspberry Pi's Ubuntu, both of which are 0.12.2. I tried to install the v4l2loopback-dkms_0.12.2-1_all.deb package of Ubuntu 19.10 on Ubuntu 18.04LTS separately, but I still get an error using ffmpeg:
dmesg:
|
same issue here |
Started working after removing the version installed by apt then installing from source and restarting ¯_(ツ)_/¯ |
Same issue on |
Ubuntu 18.04
|
@pedrodiamel this is most certainly the wrong way to inject a different version of wget http://deb.debian.org/debian/pool/main/v/v4l2loopback/v4l2loopback-dkms_0.12.4-1_all.deb
sudo dpkg -i v4l2loopback-dkms_0.12.4-1_all.deb however, how does this fix the problem at hand? should this be closed then? @jas-ts et al...? |
I think I'm seeing the same problem here...
And I built v4l2loopback from the 0.12.5 tag. |
argh, no, I'm sorry—I had the wrong device. Disregard! |
I am building this project from the master branch, and I have the same issue. What's going on here?
|
Did some one have solution for this issue? |
not a solution but I can recommend you akvcam (
https://github.com/webcamoid/akvcam) for virtual camera emulation.
…On Thu, 30 Jul 2020, 13:07 IvanUAH, ***@***.***> wrote:
Did some one have solution for this issue?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#247 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKFM2EXTBQAE5GBPA2FG3FLR6FH6LANCNFSM4JSBZDSA>
.
|
For those who are wondering what went wrong here. You might be using a wrong /dev/video* device
Now update your command to use the other video devices and it will work. In my case, it worked with /dev/video2
|
@xB-2048's solution worked for me! Thanks! |
@xB-2048 thanks a lot for the solution! Totally worked! |
Solved for a specific case. I had an existing v4l2loopback instance, OBS virtual Cam. Trying to modprobe another v4l2loopback device, an android IP cam stream, on top of an existing instance won't work (Duh!). (FFMpeg results in ioctl(VIDIOC_G_FMT) Followed how-do-i-automatically-run-modprobe-v4l2loopback-on-boot Added both boot time devices to /etc/modprobe.d/v4l2loopback.conf Checking...
Runs... So basically https://stackoverflow.com/questions/62075776/running-two-v4l2loopback-devices-with-their-individual-properties |
ah well, this is not possible. EDIT: this also means, that you cannot just add new module parameters once the module is loaded. you have to unload the module first, before you can reload it (and in order to unload it, no user-space application must be using the module; so all applications have to be quit first) this is a fundamental difference to user-space applications (and not an issue of |
@umlaeute Thanks. And yes, "Duh!" means "obviously" and "no shit sherlock". No, it's got nothing to do with v4l2loopback. |
I also ran into this issue (on Ubuntu 20.10). Turns out I my output device was already in use for another camera. Pointing to an unused output device worked smoothly. Run Not sure if this solves the problem of the OP but it might help others searching for a solution. |
For me the commands: They're working fine on bash, however. |
Worked for me as well.. thank you so much! |
given there's no activity from the OP and everybody else here seems to be happy with the proposed solution, i think i can close this. |
I'm keep running into this When I boot my PC, then it works fine, this is my iter, I connect my Canon camera, turn it on and: elect@5800x:~$ ps aux | grep gphoto
elect 7954 0.0 0.0 253336 16420 ? Ssl set07 0:00 /usr/libexec/gvfs-gphoto2-volume-monitor
elect 84406 0.3 0.0 511784 13592 ? Sl 11:09 0:00 /usr/libexec/gvfsd-gphoto2 --spawner :1.3 /org/gtk/gvfs/exec_spaw/4
elect 84449 0.0 0.0 9500 2524 pts/1 S+ 11:09 0:00 grep --color=auto gphoto and I kill the first two process, and then simply:
But the next time I want to use my Canon again, then I have to reboot, otherwise I'll get [video4linux2,v4l2 @ 0x560d95322e80] 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! |
@elect86 I have the same issue, I'm using video0 and it works fine the first time and after I finish the gphoto2 process, the issue is the following:
|
Same issue |
seems only a one time use now for some reason, but the problem is likely more on the v4l2loopback device side, not gphoto2 :( |
Any idea how we might investigate further or trying to solve it? |
same issue here - can this be reopened? worked smoothly on Ubuntu 20.04 LTS - since upgrading to 21.10 and kernal 5.15.23-76051523-generic
found this thread after posting on ubuntu answers: |
Same issue as above - works once per boot... Small fix to avoid reboot:
Then rerun your ffmpeg stream. |
I am now facing this issue after I've upgraded my Ubuntu 20.04.5 kernel from This is pretty much the command I am using in order to write to a v4l2loopback device:
This is the error I am getting:
I'm also using the latest v4l2loopback release - 0.12.7 In my case, I can't really perform It looks like an issue in v4l2loopback. Maybe it's something that can be fixed in the next release? |
For anyone with the same issue, do check if the video device is already occupied. My camera created video4 out of the blue and broke my whole setup. |
According to the info mentioned here First unload the module with rmmod
Then load it again using
This creates a virtual output device Use it according to your needs
now in this use case , open the camera/webcam and you should see the video playing in loop
|
you are my hero ! |
in my case, guvcview was holding it hostage by being in a sleep state. had to kill those processes first |
i am trying to convert landscape mode to portrait mode for my usb camera on ubuntu 18.04, i have kernal version 5.0.0-39- , i am getting above error whenever i run
can anybody help what i am doing wrong here
The text was updated successfully, but these errors were encountered: