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
0 answers

How to Forward MJPG Webcam to Virtual Video Device using FFmpeg?

I have a webcam that looks like this: $ ffmpeg -f v4l2 -list_formats all -i /dev/video0 [video4linux2,v4l2 @ 0x55fe6d48a240] Compressed: mjpeg : Motion-JPEG : 1920x1080 1280x720 640x480 320x240 [video4linux2,v4l2 @ 0x55fe6d48a240] Raw…
physiii
  • 209
  • 3
  • 12
0
votes
1 answer

Play MJPEG stream to v4l2loopback device

I have a RaspberryPi with a V1 camera. I want to use it as my camera for Zoom, Teams, and other virtual meetings. I have the RaspberryPi streaming motion JPEG over http using the application named "Motion". I created a v4l2 dummy device on my linux…
ahoffer
  • 6,347
  • 4
  • 39
  • 68
0
votes
0 answers

Getting error while opening file with gstreamer in OpenCV

I am getting error while opening file with gstreamer in opencv below is my pipeline. I have searched on internet any try all possible things but nothing is working for me. ERROR [ WARN:0] OpenCV | GStreamer warning: unable to query duration of…
Parag Jain
  • 612
  • 2
  • 14
  • 31
0
votes
1 answer

Opencv reverts back to a higher resolution than what I set

I am having an issue with saving images. I want to start with I do not want to resize the image after I receive it, I want the webcam to start with a native lower resolution which my camera supports. I am on Raspberry Pi OS. The supported…
0
votes
1 answer

V4L2 : control setting + software trigger

I am working on jetson TX2, with a FSM-IMX304M camera and I use V4L2 API. I would like to use software trigger. Does anyone have an idea about how to use it ? I didn't find anything about it. I need to synchronize the camera with a turntable. The…
user13162349
0
votes
1 answer

Capture image with V4L2 on jetson TX2

To explain my process, find below a diagram: I am working on computed tomography scanner. I use jetson TX2 for image acquisition and pre-processing. From the jetson, I control the turn table and the camera. The camera is the FSM-IMX304m. I need to…
user13162349
0
votes
0 answers

How to save a v4l2 buffer image using OpenCV 4.2

I'm using a Raspberry Pi 3B+ with an equivalent board to the Auvidea B101 which is a HDMI to MIPI bridge. The board works correctly and I can save images using the code from my gist (…
0
votes
1 answer

How to pipe rawvideo to v4l2loopback using ffmpeg?

I am trying to process a video by OpenCV in Python and then send each frame to a virtual camera (i.e., v4l2loopback). I have seen questions asked where OpenCV output is piped to ffmpeg and saved into a file, and other questions where a video file is…
sepehr78
  • 71
  • 2
  • 10
0
votes
0 answers

Testing a module/driver in linux kernel without device

I'm studying and developing a module to stream and control a CSI-2 camera, but I don't have device(It's being shipped). I added device tree, code for config, read/write on I2C bus, defined some v4l2 operator functions,.. Could you tell me how to to…
Thtam
  • 21
  • 1
  • 5
0
votes
0 answers

Mapping v4l2 pixel format codes to ffmpeg pixel format names

I'm building an app that is capturing frames from any v4l2 supported webcam. I'm controlling the camera with v4l2 (golang package https://github.com/blackjack/webcam) and one of the things I need is pixel format. However, what I get is uint32…
DekiChan
  • 375
  • 1
  • 4
  • 14
0
votes
2 answers

What it the expected behavior when using the input Framerate option (in FFmpeg) when the input is a real-time camera device?

As far as I know, the use of the Framerate option should be used only on an input files (like sequence of images or perhaps a video file that don't have a defined PTS). However, if I run the command below on my web-cam, the video still streams fine…
J.M.
  • 472
  • 1
  • 6
  • 15
0
votes
0 answers

Decode MJPEG image on live stream

I am trying to view live video from my webcam. I can draw the image to a window using OpenGL, get the frames in YUV and convert them on the fly into RGB. I can convert YUV colors into RGB easily, as well as I can get a pointer to the data from the…
0
votes
0 answers

Video For Linux 2 dequeuing is unbelieveably slow

What I do is: Open the camera by: query the capabilities set the format set the framerate request 4 buffers query all 4 buffers use mmap (I don't know anything about what this does) turn the streaming on queue all 4 buffers And then during every…
0
votes
0 answers

Image is greenish in opencv capture

I am using NanoPi-M4 board with friendly elec camera and in the guide manufacture tells to use rkisp not V4L2 in gstreamer pipeline in order to get the image. However, I encountered some problems install rkisp in docker container and want to use…
0
votes
1 answer

Gstreamer: How to play video from USB camera with spca561 driver?

I have a Logitech QuickCam Chat camera. When, I run the "v4l2-ctl" tool, I can see that uses the spca561 driver. I try to use "cheese" tool but it said "No device was found". However, If I run the following, if it works: vlc v4l2:///dev/video0 I…
Juan Solo
  • 359
  • 1
  • 5
  • 17