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
0
votes
1 answer

How to open a builtin device

I am trying to come up to speed on writing device drivers for embedded Linux, specifically a V4L2 Media Controller driver for a video interface. I can write the device driver using the typical V4L2 model for a non-builtin driver, that is, a module…
Andres Gonzalez
  • 2,129
  • 5
  • 29
  • 43
0
votes
0 answers

YUV420 to grayscale in C++

I'm trying to write a function to convert a camera stream with a YUV420 pixel format to grayscale. To my understanding, I only need to extract the Y values since these are the luminance of the image frames. I am using this page as a reference…
trixr4kdz
  • 324
  • 2
  • 12
0
votes
1 answer

USB3.0 v4l2 "no space left on device" error with multiple cameras

I have an application that needs several USB cameras. I know about the limitations of USB2.0's bandwidth, and have worked through a misunderstanding I had regarding USB2.0 devices on the USB3.0 bus (see my previous question: How to run USB2.0…
Ed.
  • 928
  • 1
  • 10
  • 23
0
votes
1 answer

Physcial contiguous vs virtually non contiguous in linux

I have a requirement for large video frame buffer that needs to be physically contiguous. So my question is when kernel driver request physical contig memory, the virtual address returned by kernel will be contiguous or non-contig? Update: My…
kudi
  • 1
  • 2
0
votes
2 answers

issue working with HARDWARE acceleration / gstreamer on odroid XU4

i try to have a v4l source from my c920 logitech camera with gstreamer . I have an odroid XU4 with ubuntu 14.04 version 4.9 . I 'm trying to use the hardware acceleration to avoid using a lot of CPU . I installed gstreamer from source since version…
Maxence
  • 11
  • 2
0
votes
0 answers

Accessing webcam using python

Trying to access webcam (video 0) using opencv, python and I get the following error: cap = cv2.VideoCapture(0) pos_frame = cap.get(cv2.CAP_PROP_POS_FRAMES) I0626 11:31:59.156796 18887 net.cpp:744] Ignoring source layer…
Priya Narayanan
  • 1,197
  • 2
  • 10
  • 16
0
votes
1 answer

How to put data from v4l2 to a c++ vector

I'm currently trying to read video from a MJPEG UVC webcam using C++. Using this tutorial, I'm able to retrieve a JPEG image and to save it on disk. Now, I try to use the JPEG image data without writing it on disk ; I want to use a C++ vector to…
Damien Picard
  • 381
  • 4
  • 12
0
votes
3 answers

What causes "resource temporarily unavailable" in v4l2

I have compiled adv7180 driver available here. I am unloading the ov5642 cameradriver(which in my case is built-in) and loading the adv7180_tvin module and after I am loading mxcv4l2_capture module which creates video0 in /dev/. (dmesg command says:…
S.Seba
  • 121
  • 1
  • 11
0
votes
1 answer

Why doesn't V4L2 API display correct pixel-format/width/height parameters?

I'm trying to set a V4L2 camera's parameters according to the V4L2 API. However, seems the API does not display the correct parameters as were set by the OS. Can you suggest how to debug this issue to figure if the failure of the camera to show the…
boardrider
  • 5,882
  • 7
  • 49
  • 86
0
votes
1 answer

v4l2 documentation's sample code as is (with open as 'rw')?

I've just started using v4l2 (for Python 3) on Ubuntu 16.04. I'm trying to run the sample from the v4l2 Python documentation, namely: $ cat demo4SO.py #!/usr/bin/env python3 import v4l2 import fcntl vd = open('/dev/video0', 'rw') #vd =…
boardrider
  • 5,882
  • 7
  • 49
  • 86
0
votes
0 answers

How to pipe pygame camera data to ffmpeg in python?

I'm trying to pipe pygame camera output to FFmpeg in ubuntu. But it is showing Broken pipe error. Here is my code: proc = Popen(['ffmpeg', '-y', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-r', '24', '-i', '-', '-vcodec', 'mpeg4', '-q:a', '5',…
Chakri
  • 49
  • 5
0
votes
1 answer

raspbbery pi pi4j could not work by v4l2(camera driver)

in the a project, a NOIR pi camera and work it by java and eclipse true. and need to turn on IR-LED when camera is start to preview. so use pi4j in a new class for turn on and turn off LED. but when call it the pi4j class in source of camera panel,…
0
votes
1 answer

How to rec video from v4l2 and decode to vp9 with gstreamer?

My pipeline gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! avdec_vp9 ! filesink location=vid.webm It will error: WARNING: erroneous pipeline: could not link v4l2src0 to avdec_vp9-0 Whats wrong?
Maxim Lis
  • 173
  • 2
  • 11
0
votes
1 answer

Opencv stereo cameras capture and framerate limits

I am trying to get pairs of images out of a Minoru stereo webcam, currently through opencv on linux. It works fine when I force a low resolution: left = cv2.VideoCapture(0) left.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH,…
Gnurfos
  • 980
  • 2
  • 10
  • 29
0
votes
1 answer

x11 zbar compilation issue for ARM platform

I require a help regarding the building process of Zbar. I am trying to cross compile zbar-0.10 source for i.Mx6DualLite platform and When I give the below configure, X11 is throwing error "unable to find XvQueryExtension in -lXv!". Please help to…
sarjoon
  • 41
  • 6