Skip to main content

Questions tagged [v4l2]

v4L2 is the second version of Video4Linux, a collection of device drivers and an API for supporting realtime video capture.

Filter by
Sorted by
Tagged with
38 votes
8 answers
97k views

RasPi Camera Board and Motion

I just got my Camera Board and a Model A Raspberry Pi to use as a security camera for my house. I had been using Motion with a Logitech C170 USB camera on my Model B board and it worked great except ...
11chubby11's user avatar
  • 4,862
7 votes
2 answers
20k views

v4l2-ctl single frame capture produces image with green ending

I have a HDMI capture card and I'm using raspbian. I want to get one single frame with v4l2-ctl command, then convert it to something common: Get a frame: # v4l2-ctl --device /dev/video0 --stream-...
Daniel's user avatar
  • 279
4 votes
3 answers
12k views

Raspberry Pi 3 and V4L2 C++ Capture Code for JPEGs

I have a Raspberry Pi 3 with the latest Raspbian Stretch, and the Sony 8MB official camera. I can save a good looking JPEG with the following commands: v4l2-ctl --set-fmt-video=width=2592,height=...
PhilBot's user avatar
  • 71
4 votes
1 answer
10k views

Error loading bc2835-v4l2 driver, Raspberry Pi and OpenCV

disclaimer: I am new to OpenCV and Raspberry Pi, although I have a fair amount of experience with linux systems in general Here is what I am attempting to accomplish: I am trying to use a Raspberry ...
nuskita97's user avatar
4 votes
2 answers
4k views

Getting kernel headers for raspberry pi 2

I'm attempting to create a virtual video device on raspberry pi 2 using v4l2loopback and prior installation of the v4l2loopback on their website in the Dependencies section they say that the kernel ...
Rinaldi Segecin's user avatar
3 votes
2 answers
6k views

Setting camera module to /dev/video0 to scan QR Codes using zbar

I'm trying to use the library zbar to scan qr codes using Raspberry pi's camera module. I've connected and tested the camera, but I don't know how to access that from the library because it isn't on /...
rvcam's user avatar
  • 31
3 votes
1 answer
7k views

How do you set hardware video encoder options with V4L2 M2M?

TL;DR When using ffmpeg and the h264_v4l2m2m hardware-accelerated codec, how do I set the encoder options such as the bitrate and key frame interval? Details I am using these commands to capture raw ...
Malvineous's user avatar
  • 1,904
3 votes
3 answers
7k views

Hardware-encoding (h264_v4l2m2m) a MJPEG stream from a webcam

I have a 1080p webcam connected to a Raspberry Pi 4B over USB. The camera supports the following formats: Raw : yuyv422 : YUYV 4:2:2 Compressed: mjpeg : Motion-JPEG ...
Archimaredes's user avatar
3 votes
0 answers
1k views

Trying to use cec-compliance fails with open on /dev/cec0

I'm trying to use the hdmi cec tools that come with the latest Raspian. When I try and run cec-ctl or cec-compliance I get a fail to open /dev/cec0. The kernel modules I have from lsmod (partial): ...
Dave's user avatar
  • 31
2 votes
4 answers
3k views

Adjusting keyframe rate ffmpeg Logitech C920 to YouTube Live

I'm trying to use ffmpeg to stream output from a c920 webcam to YouTube live on a Raspberry Pi. Unfortunately, YouTube Live returns this error when I start the stream: Please use a keyframe ...
Dan's user avatar
  • 41
2 votes
2 answers
5k views

Problems using bcm2835_v4l2 module w/ ffmpeg

I've run into some problems using the native bcm2835_v4l2 module on my Raspberry Pi Zero W (running Raspbian Stretch). The module is loaded and the associated video device is visible: $ v4l2-ctl --...
larsks's user avatar
  • 673
2 votes
2 answers
5k views

Stream video from Raspberry Pi to PC using the Ethernet or USB port

I've got a v4l2loopback running on the Raspberry Pi and I can access the stream using MPlayer directly on the Raspberry Pi. However, I'd like to connect the Raspberry Pi to my Windows PC to access the ...
Julian Bloum's user avatar
2 votes
0 answers
196 views

Green frames when capturing webcam

We use RPI4 for automation. One of our use-cases is to capture image frames via webcam/HDMI grabber as fast as possible and do some analytics. We use python and opencv for capturing, but it's not ...
Maxxie's user avatar
  • 21
2 votes
0 answers
809 views

Does V4L2 driver support Raw Bayer capture with HQ camera?

I was under impression that current V4L2 driver supports raw capture, but: pi@raspberrypi:~ $ v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'YU12' (Planar YUV 4:2:0) ...
Paul Jurczak's user avatar
2 votes
0 answers
497 views

Jessie: v4l2 streaming works with RPi 1B+, but not with 2B or 3B

I just recently upgraded my series of Pi's (1B+, 2B, 3B) to Raspbian Jessie Lite. Now, when I try to setup a stream with my Pi NoIR Camera as I did in Wheezy, sudo modprobe bcm2835-v4l2 cvlc v4l2:///...
Christian's user avatar
1 vote
1 answer
13k views

What is the correct method for streaming video from the camera module to date? [closed]

I just started experimenting with a new Raspberry Pi 3 Model B with the latest Raspbian installed. I was looking for the best way to stream from the camera module and I have found different answers, ...
Phoenix87's user avatar
  • 113
1 vote
1 answer
7k views

RaspberryPi Camera - bcm2835-v4l2 kernel module source

I want to make some optimizations on camera kernel module so it can work better with a camera multiplexer module. There are 4 camera multiplexed by GPIO pins and some hardware. I have cloned the v4l-...
caffeine's user avatar
  • 113
1 vote
2 answers
8k views

ffmpeg video file with v4l2 driver

I want to save a video file from the raspberry camera, by using the v4l2 driver and ffmpeg. v4l2-ctl is able to capture the video, though ffmpeg is not. When i run the command: ffmpeg -f video4linux2 -...
k_kaz's user avatar
  • 113
1 vote
1 answer
15k views

Setting up RTSP using v4l2

Around one year ago I built some Raspberry pi streaming device fitting on a model train. Being unhappy with the setup process on how to receive the stream on windows (using MPlayer), I decided to use ...
Johannes Zelger's user avatar
1 vote
1 answer
3k views

Trouble using UV4L raspidisp

I'm having trouble using the UV4L raspidisp device driver from linux-projects. This is supposed to provide a V4L2 compliant device that provides the output from the Raspberry Pi's HDMI output at /dev/...
kwasmich's user avatar
  • 2,702
1 vote
2 answers
3k views

How to set the camera sensor mode with V4L2

I'm referring to the modes listed here. When capturing video with raspivid, the -md option allows overriding the default mode selection heuristic. I need to find out how to achieve the same when ...
Pedro Lopes's user avatar
1 vote
2 answers
394 views

Raspbian Jessie and OpenCV 2.4.9 "get_buffer() failed (-12 (nil))" error

I upgraded my RPI2 to use Raspbian Jessie. (NOOBS 1.9.0) I also installed OpenCV 2.4.9.1 package. (It is the default package from apt-get install) Now, I have a problem while recording video with ...
ssinfod's user avatar
  • 586
1 vote
1 answer
3k views

Gstreamer and Raspberry Pi 5

For a couple of days I'm trying to make the gstreamer work on my new RPI5 PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION=&...
Gnioco's user avatar
  • 11
1 vote
1 answer
2k views

UV4L and v4l2rtspserver

I am trying to stream with uv4l over v4l2rtspserver This is what I do: Start /dev/video0 $ uv4l -nopreview --auto-video_nr --driver raspicam --encoding h264 [core] Trying to loading driver '...
ekavet's user avatar
  • 33
1 vote
1 answer
9k views

How to increase usb webcam fps?

To record video from my USB webcam I use ffmpeg with v4l2 driver (command below). ffmpeg -f v4l2 -r 30 -s 640x480 -an -sn -i /dev/video0 -f avi temp Unfortunately fps is too low for 640x480 (around ...
Данил Вагапов's user avatar
1 vote
1 answer
4k views

Raspbian Stretch C920 webcam driver LED control regression?

In a previous Stack Overflow post (April 16th 2018), Raspberry Pi : use VLC to stream webcam : Logitech C920 [H264 Video without transcoding + Audio + LED control], I described how to use the Pi + ...
LoneWanderer's user avatar
1 vote
1 answer
7k views

How do I install v4l2loopback on raspbian Jessie

Normally I get v4l2loopback by simply git clone https://github.com/umlaeute/v4l2loopback cd v4l2loopback make && sudo make install sudo modprobe v4l2loopback video_nr=10,11 and now I get: ...
physiii's user avatar
  • 123
1 vote
1 answer
2k views

V4l2 video streaming on Arch with RPi2

I'm running an intentionally minimal Arch OS on my RPi2 (installed via ArchLinuxARM-rpi-2-latest.tar.gz dated 2015-08-14), and I'm trying to have it stream video from the camera. I followed the camera ...
Mike Lawrence's user avatar
1 vote
1 answer
203 views

ffmpeg consume 252% of raspberrypi CPU

I am using raspberry pi-4 8GB to take input from a video device /dev/video0 and output it over a network rtp://192.168.10.10:6001 I am using following ffmpeg command ffmpeg -f v4l2 -i /dev/video0 -c:v ...
Mubashir's user avatar
1 vote
0 answers
73 views

IR-Keytable support for the variable frequency & modulation

I am working on the RPI-CM4 with the ir-keytable library. I am using the TSMP97000 sensor to read the modulated data from the IR transmitter(Remote). it-keytable library is working successfully with ...
shiv patil's user avatar
1 vote
0 answers
217 views

Picamera on Ubuntu 18.04 64-bit

Is there any way to get picamera to work on Ubuntu 18.04 64-bit. I have tried: Compiling a non-official version of userland for 64-bit and it compiled, but the camera does not work I have tried using ...
Klemen's user avatar
  • 11
1 vote
1 answer
170 views

HQ Camera V4L2 - bad set of scene mode causes camera controls to become unresponsive

I have been playing with these cameras for some time using opencv/raspicam to control the camera. The raspicam/opencv interface allows setting the gain, this is dubious because there is no manual set ...
Nanaki's user avatar
  • 11
1 vote
0 answers
762 views

HQ Camera crashes OpenCV application on Raspberry Pi 4

I have been developing an object tracking application with OpenCV 4.3.0 and C++. I am using an actively cooled Raspberry Pi 4 2GB RAM and the HQ camera module. Twice when I ran the program, I ...
Jacobus Dens's user avatar
1 vote
0 answers
387 views

USB camera pipe error after a while

We have RPi3B+ with Raspbian Lite installed, 2.5A power supply. We need to connect a specific USB camera (LEPTON PureThermal 2) and display its image. The connection with the camera works, it gives ...
bigmuscle's user avatar
  • 241
1 vote
0 answers
591 views

Streaming HLS from a video4linux2 virtual video device

I'm trying to accomplish a few things at the same time with the raspberry pi camera; create an HLS live stream take regular interval jpg snapshots and save them to disk irregularly record short ...
Erik van der Leer's user avatar
1 vote
0 answers
2k views

/dev/video0 not created

I am having trouble getting a USB Camera to work with a Raspberry Pi 3 Model B. I cannot get /dev/video0 to be created. I have run sudo modprobe bcm2835-v4l2 and I can see bcm2835-v4l2 when I run ...
eurotech's user avatar
1 vote
0 answers
765 views

Multiple webcams - cannot open in openCV & corrupted image

I've connected four USB webcams via well powered USB hub to RasPi2. I want to use them in openCV. So I setup a simple program, where I opened the cameras using cvCaptureFromCAM, captured a cv::Mat and ...
yaqwsx's user avatar
  • 111
1 vote
1 answer
2k views

Tiny picture using opencv2 and v4l2 driver

I'm using opencv2 and V4L2 driver on my pi and have managed to get a tiny picture out of the Raspberry Pi Camera Module with the following script: #!/usr/bin/env python import cv2 camera_port = 0 #...
reggie's user avatar
  • 1,121
1 vote
0 answers
519 views

avconv version 9.14 streaming video (using UV4L driver RaspiCam) and video (using ALSA) to ustream, no audio

I'm using avconv to read from /dev/video0 (which is attached to my RPi camera via UV4L) and also reading audio from my microphone using ALSA and stream it live on ustream.tv. It works just fine to ...
Linus's user avatar
  • 529
0 votes
1 answer
481 views

How can I use older versions of raspbian on RPi 2 B?

By what I gather from various sources, I realize that the Rpi2 Model B does not support older versions of Raspbian. I wanted to make sure there is no work around for this. I am trying to install the ...
deppfx's user avatar
  • 103
0 votes
1 answer
1k views

Configuring camera with uv4l

I am using a USB camera and uv4l to stream the video to another machine. This is how I invoke uv4l: uv4l --driver uvc --device-id [bus:id] --config-file /etc/uv4l/uv4l-uvc.conf I want to configure ...
Connor Kenway's user avatar
0 votes
1 answer
3k views

fswebcam: Unable to find a compatible palette format

I am unable to use my webcam. Running fswebcam out.png, I get the error: Unable to find a compatible palette format. What would be the origin of the error and how to fix it? It can be a missing ...
user123456's user avatar
0 votes
1 answer
4k views

raspberry camera module feed is slow with Opencv using v4l2

i am trying to use Opencv to video capture from the raspi cam to do some operation on it, the problem is i am using v4l2 to capture the video and it is so slow (10 sec delay and 2 fps). what i have ...
Abdullah Ibdah's user avatar
0 votes
0 answers
67 views

Lepton 3.5 thermal camera is too bright and impossible to recognize object

i'm trying to display Lepton 3.5 thermal camera which is uvc on Raspberry pi 5. It can be displayed well using opencv but i need the maximum temperature of frame so this code is what i'm using. The ...
I have 10 fingers's user avatar
0 votes
0 answers
65 views

poorer quality and jagged lines issue when rotating camera

I am capturing video from my raspberry pi camera using v4l2rtspserver, but I need the image to be rotated 90 degrees. Rotating it makes the image appear to have less resolution and there is an ...
PlayerWet's user avatar
  • 101
0 votes
0 answers
422 views

Random disconnection of an USB Camera with Raspberry Pi 4

I've got a Raspberry Pi 4 with an USB2.0 camera connected through a slip ring. When I boot, there's no problem at all, but sometimes the Raspberry is unable to detect the camera while streaming (I'm ...
Adrián Álvarez's user avatar
0 votes
0 answers
110 views

v4l-utils Based IR remote control

After spending a lot of time searching how LIRC works on the raspberry pi. Found that LIRC is deprecated & will be replaced by the v4l-utils. I would like to know, Is there any library(git hub ...
shiv patil's user avatar
0 votes
1 answer
511 views

v4l2src zooms when I change resolution

I have a camera module v2, which supports 1080p@30. Following this answer, I am streaming it with gstreamer using: gst-launch-1.0 -e v4l2src do-timestamp=true ! video/x-h264,width=640,height=480,...
JonasVautherin's user avatar
0 votes
0 answers
431 views

Trying to interface OmniVision OV4689 with Raspberry Pi

I need to capture pictures on a Raspberry Pi (I'm using a Compute Module 3+) using a camera based on the OmniVision OV4689 image sensor. The datasheet for this image sensor can be found here https://...
Ramanewbie's user avatar
0 votes
0 answers
812 views

raspicam TCP video streaming over ssh - almost there.... but need help

I am trying to pipe raspivid over ssh to my main computer, and then via gstreamer send the stream to a dummy video device (thanks to V4l2loopback) environment : v4l2loopback version: 0.12.0 kernel ...
ghislain airieau's user avatar