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.

A good place to start understanding the V4L2 framework is the following series of articles on lwn.net.

Part 1: The Video4Linux2 API
Part 2: registration and open()
Part 3: Basic ioctl() handling
Part 4: Inputs and Outputs
Part 5a: Colors and formats
Part 5b: Format negotiation
Part 6a: Basic frame I/O
Part 6b: Streaming I/O
Part 7: Controls

444 questions
9
votes
1 answer

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 camera has the following controls: v4l2-ctl…
Janos
  • 796
  • 1
  • 9
  • 26
9
votes
1 answer

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 preview heap(In HAL layer) for further…
anupam
  • 101
  • 2
  • 3
8
votes
2 answers

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 connect one camera. However the UVC driver…
Adrian Nițu
  • 131
  • 1
  • 2
  • 11
7
votes
1 answer

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. (full solution walk-through in the answer) The best…
Dev Null
  • 716
  • 1
  • 8
  • 20
7
votes
1 answer

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, but there are a lot of examples on how to read from…
7
votes
1 answer

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 framerate will drop). I couldn't get this done with…
Rogier
  • 346
  • 8
  • 19
6
votes
1 answer

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, width=2592, height=600 ! autovideosink -v Setting…
legit
  • 109
  • 1
  • 2
  • 4
6
votes
2 answers

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 takes its input from /dev/video0. The issue comes…
R.martinez
  • 131
  • 1
  • 1
  • 7
6
votes
0 answers

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. On software side, I'm running Yocto Linux and an…
Micha
  • 349
  • 3
  • 14
6
votes
0 answers

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 a ringbuffer. For initialization, buffers…
g3lux
  • 61
  • 2
6
votes
0 answers

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 parameter is device name, if one provides…
IBr
  • 1,359
  • 1
  • 11
  • 16
6
votes
3 answers

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 device as described mplayer cam I have done the modify…
Al3
  • 183
  • 1
  • 3
  • 11
6
votes
2 answers

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 tutorials, and managed to get a running program. My…
John WH Smith
  • 2,743
  • 1
  • 21
  • 31
6
votes
1 answer

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-format png vlc://quit --run-time=1 But when the cron…
LeMike
  • 3,195
  • 5
  • 25
  • 35
6
votes
2 answers

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 up time, etc: printf("image captured at %ld,…
Frankie
  • 653
  • 1
  • 9
  • 20
1
2
3
29 30