Questions tagged [v4l2]
v4l2 (video for Linux 2) is a video capture interface for a variety of video capture devices tested to be fully compatible with Linux. v4l2 is commonly used by programs and frameworks such as Ekiga, gstreamer, Mplayer, Skype, and VLC media player.
v4l2
445
questions
26
votes
3
answers
44k
views
v4l2 very simple example [closed]
I'm looking for a simple example for camera access in Linux using V4L2.
Where I can find it? As simple, as possible.
Thanks,
16
votes
7
answers
30k
views
Capturing multiple webcams (uvcvideo) with OpenCV on Linux
I am trying to simultaneously stream the images from 3 Logitech Webcam Pro 900 devices using OpenCV 2.1 on Ubuntu 11.10. The uvcvideo driver gets loaded for these.
Capturing two devices works fine, ...
14
votes
2
answers
14k
views
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?
14
votes
1
answer
4k
views
Memory leak with VideoCapture in Python OpenCV
I am using 3 webcams to occasionally take snapshots in OpenCV. They are connected to the same usb bus, which does not allow for all 3 connections at the same time due to usb bandwidth limitations (...
13
votes
5
answers
49k
views
Capturing h.264 stream from camera with Gstreamer
I'm trying to capture H264 stream from locally installed Logitech C920 camera from /dev/video0 with Gstreamer 1.0 v4l2src element.
v4l2-ctl --list-formats shows that camera is capable to give H264 ...
13
votes
3
answers
32k
views
How can I capture audio AND video simultenaous with ffmpeg from a linux USB capture device
I'm capturing a video by means of an USB Terratec Grabster AV350 (which is based on the em2860 chip).
I don't succeed to get the audio when it is played . If I play the captured video with vlc or ...
13
votes
3
answers
12k
views
v4l2 Python - streaming video - mapping buffers
I'm working on a video capture script for Python in Raspbian (Raspberry Pi 2) and I'm having trouble using the Python bindings for v4l2, since I have no success on memory-maping the buffers.
What I ...
13
votes
6
answers
22k
views
OpenCV (via python) on Linux: Set frame width/height?
I'm using openCV via python on linux (ubuntu 12.04), and I have a logitech c920 from which I'd like to grab images. Cheese is able to grab frames up to really high resolutions, but whenever I try to ...
12
votes
4
answers
28k
views
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 ...
11
votes
4
answers
58k
views
cv2.videocapture.read() does not return a numpy array
I have this code trying to capture a frame from my webcam on raspberry pi, and saving it as an image. I use opencv 2, but I get strange errors when I run the code..
import time
import sys
from ...
10
votes
7
answers
38k
views
Gstreamer Error: pipeline could not be constructed: no element "v4l2src"
Am using Ubuntu(14.04) and I am getting this error while trying to use gstreamer.
gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! x264enc ! h264parse ! rtph264pay ! udpsink host=127.0....
10
votes
1
answer
4k
views
"Invalid or incomplete multibyte or wide character" running v4l2-ctl
Using iTerm, I'm SSHing into my raspberry pi (raspbian) to control a home security system I've setup.
I need to change the focus of my camera, so I'm running v4l2-ctl -c focus_absolute=0 on my ...
10
votes
1
answer
9k
views
How to write/pipe to a virtual webcam created by V4L2loopback module?
I have written an application which reads from a webcam and processes the frames using OpenCV on linux.
Now I want to pipe the output of my application to a virtual webcam that has been created by the ...
10
votes
2
answers
4k
views
mmap physically contiguous memory
I might have some misconceptions here, so bear with me.
I wrote a program that captures images from a camera. I am sharing the memory between the camera and my application with mmap as I found in ...
10
votes
1
answer
2k
views
How thread-safe is V4L2?
I couldn't find any mention of the thread safety characteristics of V4L2, except for this e-mail from 2008. It talks about the big kernel lock, which I guess is gone now, right?
Does anybody have any ...
9
votes
1
answer
6k
views
Zero shutter lag in Android camera
In normal shutter lag,sensor driver give the caputured image buffer to v4l2 layer and here jpeg(hardware) header adds some extra data(exif info and thumbnail) and this layer give the image buffer to ...
9
votes
1
answer
13k
views
V4L2 absolute exposure setting has (almost) not effect
I am trying to manually control the exposure of my camera, but the setting is only briefly active, but then apparently still an auto mode seems to be active, as I can see on the camera images.
My ...
9
votes
2
answers
15k
views
Error in spawning a dbus-launch - what is that?
I like to run a cron that snapshots a cam like this:
* 9-17 * * 1-5 vlc -I dummy v4l2:///dev/video0 --video-filter scene --no-audio --scene-path /home/foo/tmp/cam --scene-prefix snapshot --scene-...
8
votes
2
answers
18k
views
How do I enable the UVC_QUIRK_FIX_BANDWIDTH quirk in Linux UVC Driver?
I am currently trying to run 2 webcams on a Wandboard board, which have to share a USB hub. Problem is , the current driver implementation (YUV only) saturates the USB hub and in the end I can only ...
8
votes
1
answer
14k
views
How to change mjpeg to yuyv422 from a webcam to a v4l2loopback?
Backstory: One livestreaming site I use isn't smart enough to detect the capabilities of my webcam (Logitech Brio, 4k), and instead just uses the default frames per second settings, which is 5fps.
(...
7
votes
1
answer
19k
views
GStreamer pipeline broken
I am not sure why this pipeline is breaking, I have gstreamer installed on linux from the websites exact instructions, any ideas?
gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale ! video/x-raw, ...
7
votes
2
answers
9k
views
Where does v4l2_buffer->timestamp value starts counting?
I am trying to use v4l2_buffer's timestamp value (type timeval) to synchronize images captured from a UVC webcam to external events.
However the timestamp is not the same as the system time, or the ...
7
votes
1
answer
4k
views
OpenCV output on V4l2
I wanted to know if I can use "opencv" to write on a v4l2 device.
I would take a picture, apply small changes with the features of opencv, and then send it on a v4l2 device.
I searched on the web, ...
7
votes
1
answer
6k
views
Capturing camera image with v4l2 very slow
I've been working on using v4l2 directly to grab a camera image in OpenCV. This is working very nice; this way I can grab an image in YUYV format and with a high resolution (understanding that the ...
6
votes
2
answers
61k
views
FFmpeg change output to specific pixel format?
I am working on an openCV project, I have a stable running variant that is taking input from an HDMI capture card and using FFmpeg to output to a v4L2 loopback device (/dev/video0) my openCV project ...
6
votes
2
answers
26k
views
List available capture formats
New to V4L, I decided to start using the video4linux2 library in order to capture a frame from my camera in C (I am using the uvcvideo module with a Ricoh Co. camera). I followed several guides and ...
6
votes
3
answers
15k
views
Dummy video device - v4l2loopback - webRTC
I need to play multiple video for test a video server. I'm using lubuntu 14.04 and have installed V4l2loopback to make the device file ( /dev/videoN )
I am using mplayer to play video from this ...
6
votes
1
answer
6k
views
Timestamp for v4l2 image capture
I have a Linux application that processes camera images. Currently I provide buffers to the v4l2 kernel subsystem that are filled with image data.
However I need to know, as exact as possible, when ...
6
votes
0
answers
524
views
V4L2 and Aptina sensor with external trigger - discard old frames
I'm using an Aptina MT9V024 sensor connected via LVDS to the CSI interface of an i.MX6 Quad. I'm running the sensor in snapshot mode, i.e. using an external signal to trigger/start the image capture.
...
6
votes
0
answers
1k
views
Does v4l2 camera capture with mmap ring buffer make sense for tracking application
I'm working on a v4l2 API for capturing images from a raw sensor on embedded platform. My capture routine is related to the example on [1]. The proposed method for streaming is using mmaped buffers as ...
6
votes
0
answers
2k
views
How to query all devices in ffmpeg?
How to properly query all video devices in system using libavdevice?
opening input with int err = avformat_open_input(&context, NULL, fmt, NULL); fails because device name is not provided (second ...
5
votes
2
answers
9k
views
Running two v4l2loopback devices with their individual properties
Working with v4l2loopback devices I can run these two virtual devices:
a) running the preview image from a Canon DSLR via USB through v4l2loopback into OBS:
modprobe v4l2loopback
gphoto2 --stdout --...
5
votes
2
answers
6k
views
v4l2loopback device detected by Chrome, not seen by Zoom or Firefox
I am trying to create a loopback device from my webcam to be accessible from both Zoom and a browser. I created three v4l2loopback devices:
sudo modprobe v4l2loopback devices=3 video_nr=10,11,12 ...
5
votes
1
answer
14k
views
v4l2 video capture example
this is my first post here and I hope I can find some help
I'm working on embedded linux on samsung ok6410 board and ov9650 cmos camera
I have to capture a video and save it on a SD-card
I want to ...
5
votes
1
answer
6k
views
How can I change webcam properties that OpenCV doesn't support but v4l2 API does?
I'm using OpenCV 3.1 and Python 2.7 to capture video frames from my webcam, Logitech C270. I'm also using video4linux2(v4l2) to set the properties of my camera but this led to a few problems. My OS is ...
5
votes
1
answer
8k
views
v4l2 fcntl.ioctl VIDIOC_S_PARM for setting fps and resolution of camera capture
I am trying to set fps and resolution of webcam and capture from it via v4l2 Python.
v4l2 Python documentation is limited to ;
>>> import v4l2
>>> import fcntl
>>> vd = ...
5
votes
2
answers
4k
views
Gstreamer message to signal new frame from video source (webcam)
I am trying to save a stream from webcam as series of image using gstreamer. I have written this code so far...
#!/usr/bin/python
import sys, os
import pygtk, gtk, gobject
import pygst
pygst.require("...
5
votes
3
answers
2k
views
streaming video to and from multiple sources
I wanted to get some ideas one how some of you would approach this problem.
I've got a robot, that is running linux and uses a webcam (with a v4l2 driver) as one of its sensors. I've written a control ...
5
votes
1
answer
3k
views
video capturing with V4l2 has dropped/lost frames
I have a scientific application which captures a video4Linux video stream. It's crucial that we capture each frame and no one gets lost. Unfortunately frames are missing here and there and I don't ...
5
votes
2
answers
4k
views
Writing to /dev/fb0 using OpenCV
So am a bit confused about doing an memcopy to a mapped frame buffer device (ex. /dev/fb0) hwne using OpenCV.
For example, looking at one of the OpenCV capture functions for both C and C++:
C: ...
5
votes
0
answers
2k
views
Capturing a picture in c++ using v4l2, explaining the process
I have been struggling with making a c++ code for capturing a picture from web-camera. I successfully did it, but I would like some clarification about the process i took.
So my code can be described ...
4
votes
3
answers
12k
views
Does OpenCV support v4l2?
I'm writing a Python program using OpenCV, but I cannot capture images from v4l2 cameras.
I tried with both a PS2 EyeToy and Droidcam (Android virtual webcam), which are both using v4l2, and none of ...
4
votes
4
answers
4k
views
Canon DSLR Video loop back using v4l2loopback and EDSDK Liveview?
I want to use my DSLR camera as video input for let say Skype / Google talk under Linux and Android.
Is it possible to create a video loop back using v4l2loopback and Canon EDSDK ? how can I pipe the ...
4
votes
2
answers
9k
views
Undefine reference for libraries, so How could I find the right path?
I am trying to compile a v4l2 example in Ubuntu but I am getting the following error:
guilherme@notedev01:~/Downloads/V4l2_samples-0.4.1$ make
gcc -O2 -L/usr/include -lX11 -lXext -o viewer viewer.c
/...
4
votes
1
answer
5k
views
How to get Gstreamer1.0 working with v4l2 raspicam driver
For the last 4 days I'm trying to get gstreamer1.0 working with v4l2 driver for Raspberry Pi camera, but with no success.
I'm running the latest Raspbian image (from 19.9.2014.), with raspicam ...
4
votes
2
answers
1k
views
Google chrome cannot detect v4l2loopback device
I'm trying to transmit my screen using ffmpeg and v4l2loopback, more when running the commands:
sudo modprobe v4l2loopback devices=1 video_nr=2 card_label="Camera
Loopback"
and
ffmpeg -f ...
4
votes
3
answers
5k
views
Where I can find example in using v4l2 codec driver
in Raspberry-Pi code, there is a s5p-jpeg codec driver.
drivers/media/platform/s5p-jpeg/jpeg-core.c
Can sombody please tell me where I can find an example of how to use it?
Or any other v4l2 codec ...
4
votes
1
answer
5k
views
Cross Compiling v4l2-ctl for Android
I've got a usb camera working on android (via Android On-The-Go), and I'm looking to change the exposure of the camera. I've been able to get this to work by using v4l2-ctl on a linux machine, and I'm ...
4
votes
2
answers
6k
views
Official V4L2 Driver for raspberry pi, how do I add lrt flags to a makefile?
I am creating a small python application that uses v4l on the raspberry pi. After hours of troubleshooting I'm close to installing it. I just need to compile the Official V4L2 Driver.
I'm following ...
4
votes
1
answer
16k
views
ERROR opening V4L interface: Operation not permitted
I compiled mjpg-streamer in my raspberry pi, but when I run the below command, it occured an eeror shown in the title. Details are below:
root@raspberrypi:/home/pi/mjpg-streamer-code-182/mjpg-...