-
-
Notifications
You must be signed in to change notification settings - Fork 33
v4l2loopback issue on Ubuntu Desktop 18.04 LTS (ioctl(VIDIOC_G_FMT): Invalid argument) #8
Comments
@ShayBox Do you have any idea why it says "Invalid Argument"? I think v4l2 works, because video50 exists, but for some reason it still doesn't work. |
I'm not an expert in ffmpeg, but my guess is the old version of ffmpeg ubuntu still provides doesn't work in the way mon2cam uses it, 3.4.6 is what you have, 4.2 is what is currently out, if possible could you either use a ppa to update ffmpeg, or download a binary and put it in the mon2cam folder, and modify the script to use that one instead and see if that fixes it? |
If that's the fix, I might be able pinpoint a change to fix older ffmpeg support |
I just updated to ffmpeg 4.2 using a PPA and here's the error output. There are some differences, but ultimately comes to the same "Invalid argument" in the fourth to the last line:
|
Okay, after doing some testing, it appears it's not ffmpeg, Ubuntu 18.04 still ships with v4l2loopback 0.10 which had this bug which has been fixed, so the solution is to update v4l2loopback to 0.12, Ubuntu provides this for 18.10+, so you can either update ubuntu, compile v4l2loopback, or use the PPA for the newer version of ubuntu. |
Okay wow you replied as I was typing my message lol |
Hmmmmm.... It's trying to get me to upgrade to 19.04, which I might want to play with later, but for now I just want to see if I can get this script working, so I'll get the PPA going for v4l2loopback. (if I can locate one...) |
Okay, slight change of plans. Couldn't find a PPA for v4l2loopback 0.12, so I compiled (which I'm amazed I was able to do with no problems, being a newbie!)
So, with that in place, I attempted to run the script again. Still getting an error.
|
Run these two commands in the v4l2loopback folder you have, then reboot and try mon2cam again |
If it still errors, try uninstalling the other |
Okay so... it's not erroring out! I rebooted (makes sense. kernel module.), but still didn't work, apt remove'd the old version, and now it's (apparently) encoding frames! The Preview window in Discord is still black, but as soon as I have a partner who's willing to try this out with me I shall see if it is working! |
Okay, testing with a friend now. It's still displaying both monitors as one. "Entire screen" shows as one long monitor, and picking an Application Window is ignored.
Exits normally on CTRL + C |
You have to change your webcam and turn webcam on |
I'm sorry, webcam? I don't have a webcam. |
This doesn't fix discord screen sharing, it loops your monitor into a camera, mon2cam, click the webcam button in discord |
My reaction: https://media.giphy.com/media/l0MYziGczQ3xenGaA/giphy.gif Alright, so.... got the script running, Mon2Cam is selected, preview is still black, went into a call, selected webcam, and the two blue squares are rotating in discord, and system starts lagging a lot. |
Black screen usually means abnormal resolution or aspect ratio, discord doesn't like weird webcams, try some of the scaling options like -b |
Tip: you can make a single person group to call in so you don't have to be in a call with someone |
Alright! It's working! I used this:
Interesting note, that while But, it's working! Thank you so much for helping me! |
-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 |
Oh yeah I totally forgot that I had to compile v4l2l myself aswell. I'm glad you finally got it working :) |
@ShayBox I'm gonna push some examples to git, should I put it in the help page as well or only the github page? |
Sure, add an examples section or link if you want, anything's good if it helps people out |
I think this can be closed. |
On 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:
The text was updated successfully, but these errors were encountered: