v4l ("Video For Linux") is a video capture infrastructure provided by the linux kernel. the historic "v4l" has been obsoleted by the "v4l2" ("Video for Linux 2") infastructure and has been removed from the linux-kernel starting with 2.6.38.
Questions tagged [v4l]
52 questions
26
votes
3 answers
v4l2 very simple example
I'm looking for a simple example for camera access in Linux using V4L2.
Where I can find it? As simple, as possible.
Thanks,

Alex Ivasyuv
- 8,585
- 17
- 72
- 90
14
votes
2 answers
How to use V4L or V4L2 (Video for Linux) in Android?
Does Android Linux Kernel support V4L or V4L2 (Video for Linux). If not, is it possible to add it?

Walidix
- 1,247
- 5
- 17
- 27
12
votes
4 answers
OpenCV: can't set resolution of video capture
I am using OpenCV 2.4.5 on Ubuntu 12.04 64-bit. I would like to be able to set the resolution of the input from my Logitech C310 webcam. The camera supports up to 1280x960 at 30fps, and I am able to view the video at this resolution in guvcview. But…

erobertc
- 644
- 1
- 9
- 20
7
votes
1 answer
Mapping pixel formats from CVPixelBuffer to their equivalent V4L
I need to map a range of OSX CoreVideo pixel formats as enumerated in CVPixelBuffer.h to their equivalents in V4L. For example, kCVPixelFormatType_24RGB would map to V4L2_PIX_FMT_RGB24.
I have tried to match using fourcc, but the definitions for…

topless
- 8,069
- 11
- 57
- 86
5
votes
1 answer
Missing libv4l for OpenCV
I am trying to use my webcam with OpenCV to run my application.
However, when I tried to get the frame with videoCapture, and it gives me this error.
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by
OpenCV Sample:…

holopekochan
- 595
- 2
- 10
- 18
4
votes
0 answers
Webcam doesn't read through OpenCV but does with guvcview
I have a webcam of sorts that is quite old. I've been attempting to get it to work. I started out with guvcview which works, however it only gives me the first frame captured then stops. That's fine for now.
I'm trying to recreate this behaviour…

donkey
- 1,343
- 13
- 32
4
votes
2 answers
android: permission denied while opening /dev/video4 (webcam) from JNI
I have configured v4l2 on my android device. I plug the webcam and see that /dev/video4 node is created. But when I try to open it from my JNI layer it says "Permission denied"
I have tried the following
1) Change the permission of /dev/video4 so…

user2125869
- 41
- 1
- 2
3
votes
1 answer
Two webcams on one usb hub - bandwidth issues
I'm using OpenCV 2.3 to capture video from two webcams on a Linux computer(Ubuntu 10.04) which only has one USB hub. I'm getting an error "videoc_streamon: No space left on device" when cv.QueryFrame is called for the second camera the first time…

pkinsky
- 1,718
- 2
- 23
- 28
3
votes
0 answers
VIDIOC_G_STD: failed: Inappropriate ioctl doer device
I attempted the command below:
v4l2-ctl -d 0 --get-standard
But I get the error
VIDIOC_G_STD: failed: Inappropriate ioctl for device
The below command however works completely fine.
v4l2-ctl -d 0 --all
Any help would be appreciated. In my program…

pd109
- 335
- 2
- 3
- 12
3
votes
0 answers
Write to dummy video stream using OpenCV
I'm using OpenCV and v4l2loopback library to emulate video devices:
modprobe v4l2loopback devices=2
Then I check what devices I have:
root@blah:~$ v4l2-ctl --list-devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
…

Pavel Podlipensky
- 8,201
- 5
- 42
- 53
3
votes
0 answers
OPENCV 3.1 videoio error: v4l: device /dev/video unable to query number of channels
I have a C++ program written with opencv 3.1 on a workstation running ubuntu 12.04. The program captures a frame from a USB camera (/dev/video2) every 5 minutes, does a bit of stuff, and saves the frame to disk. For some reason the program is…

Jason Pitt
- 31
- 6
3
votes
2 answers
Preview USB Webcamera on Android via ndk and V4L
I am trying to access a USB Webcam from Android ndk.
The Android system has the V4L Kernel modules, so I thought it would be best to use the V4L libraries. They are bundeled in the ndk so it was not a big deal to include them into my project.
My…

BT9
- 87
- 1
- 11
3
votes
2 answers
MPEG-TS PSI parsing
I am trying to construct EIT table sections as specified in EN 300 468. I have successfully parsed the packets into data structures (in Java), and can access the payload of each packet.
I don't understand how the table section is split across the…

user1357063
- 39
- 1
- 2
- 5
3
votes
1 answer
OpenCV is able to change to composite input?
I would like to know if OpenCV is able to set the camera (dev/video1) to composite or S-video input.
The camera I was using only runs in composite input, but v4l2 opens dev/video1 in S-Video input by default. V4l2 is able to change from S-video to…

user2155042
- 33
- 1
- 7
2
votes
1 answer
Is it possible to disable autofocus of a webcam on Windows 10?
I am working with python opencv and I am not able to disable autofocus, autoexposure etc on windows 10.
I am using Logitech BRIO 4k webcam.
Everything works perfectly on Ubuntu 18.04. With Opencv 3.4.4 using v4l backend I am able to set focus,…

nick
- 463
- 3
- 11