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 read video file using v4l2

I want to read a video file using v4l2, say an AVI file. And read it frame by frame. As far as I can tell I need to use the read() function. But how isn't very clear to me. There are also hardly any examples available. So maybe a simple example on…
user3379159
  • 111
  • 2
  • 12
0
votes
0 answers

How to capture the video frames from the decoder while Playing a Youtube movie on Android 4.4?

I need to get the youtube movie while it's played frame by frame, as they are drawn to the screen. Is there a way using v4l2 / /dev/ion or something else, to get the frames as they are displayed? I know, there is the new screenrecord binary. But I…
user3387542
  • 611
  • 1
  • 8
  • 28
0
votes
1 answer

V4L2: Set Control Value without executing callbacks

I have a system with lots of custom controls via V4L2 (exposure, gain, etc).. However, I need the ability for some of these controls (like a regularly repeated initialization sequence) to reset the current values of these without executing the…
Yeraze
  • 3,269
  • 4
  • 28
  • 42
0
votes
1 answer

Command fails in python, but not in terminal

I'm running python on linux, and when I run my script with: os.system('v4l2-ctl -c exposure_auto=1') I get this: VIDIOC_S_EXT_CTRLS: failed: Input/output error exposure_auto: Input/output error When I run this command from terminal with my default…
0
votes
1 answer

OpenCV update messing up CaptureFromCAM on Raspberry Pi

I recently updated my opencv to version 2.4.6.1 . and i installed with following commands and settings on my raspberry pi. wget downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.3.1/OpenCV-2.4.6.1.tar.gz tar -xvf OpenCV-2.4.6.1.tar.gz cd…
chaithu
  • 509
  • 2
  • 7
  • 29
0
votes
3 answers

Gstreamer- failed to enumerate video formats and Inappropriate ioctl for device Error

I need to stream a video using gstreamer. After giving media-ctl commands correctly When I give this command LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv driver=v4l2:device=/dev/video6 -vo png -fps 1 , it is successfully capturing…
Zafrullah Syed
  • 1,170
  • 2
  • 15
  • 38
0
votes
1 answer

Video capturing on ARM

I have a problem using a web camera (defender c-110) on mk802ii with debian armhf from here: $ avconv -f video4linux2 -r 5 -s 640x480 -i /dev/video0 out.avi avconv version 0.8.6-6:0.8.6-1, Copyright (c) 2000-2013 the Libav developers …
Dev
  • 117
  • 3
  • 11
0
votes
1 answer

Play video stream from RaspberryPI on Android

I have a problem with playing video stream on Android device. I am using Raspberry PI Camera Board. On RaspberryPI I run RTSP server: uv4l --driver raspicam --auto-video_nr --framerate 12 cvlc v4l2:///dev/video0 --v4l2-width 176--v4l2-height…
luke
  • 13
  • 4
0
votes
1 answer

Run C code of V4L2 on Android Device

I want to execute some c code of v4l2 on my android tablet. One is Nexus 7 and the other is Samsung GT-P5100. Anyway, I meet some difficulties. I run these C code via NKD. And my function is: jint…
Brendon Tsai
  • 1,267
  • 1
  • 17
  • 31
0
votes
1 answer

rule of picture/preview size in Android Camera

someone tells me that the size(both width and height) of picture/preview should be divided by 16 with no remainder. In daily scenario, we also always see this kind of resolution, e.g. 1920x1088, 2688x1520. Could anybody show me who makes this…
Hai
  • 56
  • 2
  • 6
0
votes
1 answer

v4l2 multiple devices trouble

I open two webcams using v4l2. With 30 fps everything works fine. With 60 fps, begining troubles. FPS on first cam about 20, FPS on second cam about 0-3. I try to run in different threads(and different processor kernels) - the same problem. I think…
herolover
  • 733
  • 3
  • 9
  • 18
0
votes
1 answer

v4l2 / streamer unstable in operation

I am making an online webcam for my parents, using raspberry pi. I want it to capture a photo, upload it to a webserver, then upload a copy to a different server for archiving. I use the script streamer to snap a still from the webcam. It works, the…
GrixM
  • 215
  • 2
  • 4
  • 20
0
votes
1 answer

Enabled links from a given media entity

In Linux V4L2 and media controller architecture, we treat media devices as media entities and establish connections between them dynamically on the go..!! For example, demux0(demuxer 0) can be connected to Vid_plane1(Entity name given to the main…
Sandeep
  • 18,356
  • 16
  • 68
  • 108
0
votes
1 answer

ioport.h errors when compiling v4l2 program

I wanted to follow this article about v4l2's driver writing. But my first basic try failed when I include media/v4l2-dev.h (because I want to access some macro like VFL_TYPE_GRABBER). media/v4l2-dev.h includes linux/device.h which includes…
roro
  • 131
  • 1
  • 2
  • 8
-1
votes
2 answers

porting virtual video driver in linux kernel

I am trying to build vivi driver in linux kernel.. I tried using make menuconfig but i didnt see any option to enable vivi driver. Can someone tell me the process to enable vivi drivers in kernel -kiran
1 2 3
29
30