-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Streaming ioctls errors #87
Comments
Compliance errors may vary from each kernel, and are in most cases just a mere warning, the important part here is if the client software can detect and capture the virtual camera. Try streaming with FFmpeg and capturing with ffplay, if that works, then everything is ready and working. |
Thank you @hipersayanX Capture works fine as mentioned above with /dev/video0, and also with VLC, but streaming does not with /dev/video1. $ gst-launch-1.0 -v videotestsrc ! video/x-raw,format=RGB ! videoconvert ! v4l2sink device=/dev/video1 $ ffmpeg -i video.webm -s 640x480 -r 30 -f v4l2 -vcodec rawvideo -pix_fmt rgb24 /dev/video1 |
Because, probably confusing the device, /dev/video0 is probably the output device and /dev/video1 is the capture device.
You must point to a valid video file in your computer. |
OK, added a valid video file now, but still getting an error message: |
No, no, dev/video0 is the correct capture device, and get the same error message if I replce /dev/video1 with dev/video0 in the above command line. I correctly get the camera starting with $ ffplay /dev/video0 as the capture device This is the part of config.ini defining the video devices: [Cameras] cameras/1/type = output cameras/2/type = capture |
@hipersayanX , do you have any idea about the issues above? |
Show me the the full /etc/akvcam/config.ini. |
Sure, configuration file is the one proposed by Linux Fake Background Webcam:
|
For the moment, the output device only supports RGB24, I want to port the Webcamoid's video format conversion code to the virtual camera in future versions.
|
Still getting error messages with both streaming command lines after editing config.ini exactly as per your proposal. $ gst-launch-1.0 -v videotestsrc ! video/x-raw,format=RGB ! videoconvert ! v4l2sink device=/dev/video1 $ ffmpeg -i /home/nicolas/energy.mp4 -s 640x480 -r 30 -f v4l2 -vcodec rawvideo -pix_fmt rgb24 /dev/video1 |
Did you had reloaded the module after editing the config.ini? |
I had not, just did it, but after that error messages remain the same. $ sudo rmmod akvcam |
You have this
and then this
how would you fix the command or the config.ini? |
Thank you. but still get the same error: [video4linux2,v4l2 @ 0x5a7b6232abc0] ioctl(VIDIOC_G_FMT): Invalid argument Changing the resolution in the command also does not explain why streaming with gstreamer also does not work. $ gst-launch-1.0 -v videotestsrc ! video/x-raw,format=RGB ! videoconvert ! v4l2sink device=/dev/video1 |
Your config.ini is wrong or you are confusing the devices. Why not just create the virtual camera using Webcamoid instead of doing manually? at least until you learn how to configure the cameras. |
This is what I did and nothing else, creating the virtual cameras with webcamoid, and the config.ini file is the one you proposed above. Here is the installation procedure I followed:
When testing the cameras with gstreamer and ffmpeg with the above command lines, then I get the error messages copied in the previous message. |
Does Webcamoid send the video signal to the virtual cameras? |
For some reasons now I have remaining cameras after unloading the module: $ sudo rmmod akvcam So now checking the driver returns a positive result: $ v4l2-compliance -d /dev/video2 -f -s Compliance test for akvcam device /dev/video2: Driver Info: ../.. Then video2 appears to be the output device $ v4l2-compliance -d /dev/video3 -f -s Compliance test for akvcam device /dev/video3: Driver Info: ../.. and video3 the capture device... So now testing with ffmpeg, there is a streaming process running, which stops after a short time: $ ffmpeg -i /home/nicolas/energy.mp4 -s 1280x720 -r 30 -f v4l2 -vcodec rawvideo -pix_fmt rgb24 /dev/video2 the output file is NOT modified, remains the same as before. $ gst-launch-1.0 -v videotestsrc ! video/x-raw,format=RGB ! videoconvert ! v4l2sink device=/dev/video2 Now as well testing with gstreamer, there is indeed a process running... $ gst-launch-1.0 -v videotestsrc ! video/x-raw,format=RGB ! videoconvert ! v4l2sink device=/dev/video2 So now it seems that I am all set? I am checking with Cheese, and indeed have the Akvcam camera additionally, but with an error message. However, when testing the capture device, there is a video window opening, but it only shows noise, does not capture an actual video. $ ffplay /dev/video3 |
Are you sure rmmod executed properly without any error? Also, try removing all cameras from Webcamoid and creating a new one from cero. I think you are not working with a clean environment when testing, and that's why you are getting all those errors.
You are confused here, energy.mp4 is the input file, is from were FFmpeg takes the video signal and send to the virtual camera, the input file is never modified.
Try playing the desktop, a video, an image, or whatever with Webcamoid, and capture with ffplay, does it work? |
The two cameras are existing even with akvcam not loaded: I have tried by force deleting the files /dev/video0 and /dev/video1 but this broke my system. I had to reboot with an older kernel and update/upgrade. Also my laptop webcam is no longer available (Cheese says no camera available). I also have corresponding folders in /sys/class/video4linux. So how do I please remove the cameras from within webcamoid?
I don't know how to do that. Can you please explain how can I do 'playing the desktop, a video, an image' and how do I capture this stream with ffplay? Please understand I am not a coder and just looking for a technical solution. |
If akvcam is unloaded and you still have /dev/video*, then those are you real cameras and not the virtual ones.
Just reboot your system.
Main menu/Video/Outputs/Remove all outputs
From Webcamoid, select any video source, and select the output virtual camera, that is.
|
But I still don't understand why do you want to configure the virtual cameras manually instead of using Webcamoid, if you don't have experience with Linux internals it's like running in a street of pointed rocks. |
I don't have a 'webcamoid' app or gui installed. |
You can install it from the repositories or from the official binaries.
Yes, it can be installed, configured, and used from the command line, but you need experience with the command line. For example, here you are trying to stream to a capture device instead of the output device, you could have fixed that just by changing the device number until it worked. |
I have indeed from the start installed the gui according to: |
That is not the GUI, the virtual camera has not any GUI, it is just the kernel module. If you want to manage the virtual camera graphically, you must install Webcamoid.
You are confusing the projects, |
Succeeded installing the module on Ubuntu 24.04 LTS on Wayland.
Configuration file is the one proposed by Linux Fake Background Webcam.
Two devices have correctly been created:
$ ls /dev/video*
Akvcam should have created two extra video devices.
( yes: /dev/video0 /dev/video1 )
The camera starts also capturing correctly with:
$ ffplay /dev/video0
However, I seem to have compliance issues with Streaming iocts errors and warnings:
$ v4l2-compliance -d /dev/video0 -f -s
In addition, I don't have any alternative camera in video apps (Zoom, Signal, Cheese).
Not sure if this is connected to the streaming issues detailed above.
The text was updated successfully, but these errors were encountered: