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 can I output to a v4l2 driver using FFMPEG's avformat_write_header?

I'm trying to use PyAV to output video to a V4l2 loopback device (/dev/video1), but I can't figure out how to do it. It uses the avformat_write_header() from libav* (ffmpeg bindings). I've been able to get ffmpeg to output to the v4l2 device from…
Yousif
  • 1
  • 1
0
votes
0 answers

Get physical address of memory allocated with dma_alloc_coherent

I'm writing a linux driver and to store the frames into the RAM I used the function dma_alloc_coherent(struct device *dev, size_t size,dma_addr_t *dma_handle, gfp_t flag). The first physical address of that area it's returned by the function…
Andrea
  • 21
  • 1
  • 7
0
votes
1 answer

WebRTC H264 connection - strange profile-level-id

I'm trying to establish WebRTC connection between an RTSP camera and a browser. The cam creates a nice h264 stream which plays well in VLC player. For WebRTC I'm using Janus. The camera stream is not playing in either Chrome, either FF, because it…
Daniel
  • 2,318
  • 2
  • 22
  • 53
0
votes
2 answers

Video capture doesn't work with all supported caps

I am using Python 3.6 on Ubuntu 18.04 on an NVIDIA Jetson TX2. All software is up to date. The Linux kernel is 4.9.140-tegra. GStreamer is version 1.14.1. I have a UVC Capable webcam that shows the following capabilities and I need to stream with…
PhilBot
  • 748
  • 18
  • 85
  • 173
0
votes
0 answers

How to decode MJPEG with FFmpeg

I am trying to decode a MJPEG stream with libav. The stream comes from V4L2 driver. When working with high resolutions the following code works fine. However, when using low resolutions (For instance 320x190) it produces strange artefacts void…
oierlauzi
  • 167
  • 2
  • 7
0
votes
0 answers

How to inform vlc regarding audio sample rate of the device in ubuntu

I'm working in FPGA device, which can provide raw video and pcm data. I'm using v4l2 and alsa framework for video and audio respectively. Audio flow path is using ALSA framework and video flow path is using v4l2 framework. Device can generate…
0
votes
1 answer

how to get physical address of V4L2 DMA virtual address?

I have a typical V4L2 driver that I use configured for memory mapped IO method. This driver hands off a virtual address to my user space app. All of this is working fine. I have another driver that expects as input a kernel physical address. I want…
Andres Gonzalez
  • 2,129
  • 5
  • 29
  • 43
0
votes
1 answer

Gstreamer : 'src' element task going to PAUSE state when one of the elements in pipeline is added dynamically

I have the following pipeline : v4l2src -> queue -> h264parse -> avdec_h264 -> identity -> imagefreeze(added/removed dynamically) -> glupload -> glcolorconvert -> gltransformation -> glimagesink I have a added a probe on the element identity…
gst
  • 1,251
  • 1
  • 14
  • 32
0
votes
1 answer

Streaming UYVY video using SDL

I am trying a program to capture image data from a camera using v4l2. I have grabbed 4 frames and stored them in a buffer of continuous memory. The data format of the image in the buffer is UYVY. I need help in knowing the steps to be followed to…
Arv
  • 23
  • 4
0
votes
0 answers

wait_event_interruptible and wake_up_interruptible take 20milliseconds to 30milliseconds

I'm working on PCIe card.When MSI interrupt is raised by PCIe card,ISR handler gets called. In ISR routine, wake_up_interruptible will wake up V4L2 thread. However time duration between wake_up_interruptible in ISR and wait_event_interruptible in…
0
votes
1 answer

VIDIOC_ENUMINPUT Not returning any video standards

I have been playing around with a userspace application based on uvc driver based on v4l2. I have been trying to get the capabilities of my integrated webcam (this is a laptop), and then I got into one problem. My driver does not set any video…
C--
  • 16,393
  • 6
  • 53
  • 60
0
votes
1 answer

Select more than one channel in V4L2

I'm using a custom Linux built using Buildroot for a SoC Allwinner A20. This SoC have 4 analog video inputs which I need to use. The problem is that there is not a decent driver for this video input, so I'm fixing the single one I was able to find…
naggety
  • 166
  • 1
  • 10
0
votes
1 answer

directing gstreamer NV12 video to v4l2loopback sink

I want to direct a video with the NV12 pixel format to a v4l2loopback device but I failed in all my attempts to do so. I tried this pipeline gst-launch-1.0 videotestsrc ! videoconvert ! video/x-raw,format=NV12 ! v4l2sink device=/dev/video1 and…
0
votes
1 answer

Transferring video stream (/dev/video0) from Linux device to Windows device

I've got a video stream running on my Raspberry Pi. I'd like to get the video stream on my Windows device by hooking up the Pi with my Windows laptop. I know there are two standards which sound promising: GigE Vision and USB Vision. However, I don't…
0
votes
1 answer

Pi Camera with v4l2 OpenCv - can't get 2592x1944 Resolution

I am using pi camera v1 (5 MP) on raspberry pi3 with v4l2 driver. When I use the commands below, it captures 5 MP image but I can't get the same image when I capture it from OpenCV. Captured image from OpenCV is always 480x480. sudo modprobe…