Questions tagged [v4l2]

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

54 questions
38
votes
8 answers

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 for the quality. I was expecting the Raspberry Pi…
11chubby11
  • 4,872
  • 5
  • 26
  • 32
7
votes
3 answers

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-mmap --stream-to=frame.raw --stream-count=1 Convert…
Daniel
  • 291
  • 1
  • 2
  • 11
4
votes
3 answers

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=1944,pixelformat=3 v4l2-ctl --stream-mmap=3…
PhilBot
  • 71
  • 3
  • 7
  • 25
4
votes
2 answers

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 headers must be the same as the kernel where you…
Rinaldi Segecin
  • 141
  • 1
  • 2
4
votes
1 answer

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 Pi with OpenCV (version 3.0.0) to read a live…
nuskita97
  • 71
  • 1
  • 1
  • 6
3
votes
0 answers

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): videobuf2_dma_contig 20480 1…
Dave
  • 31
  • 2
3
votes
2 answers

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 /dev/video0 or any location I can find. So I went…
rvcam
  • 31
  • 1
  • 2
3
votes
3 answers

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 I would like to use ffmpeg to stream the footage…
Archimaredes
  • 139
  • 1
  • 3
3
votes
1 answer

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 video from the Pi camera, draw the time and the…
Malvineous
  • 2,109
  • 15
  • 25
2
votes
0 answers

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 the correct image but after a while it stops and no…
bigmuscle
  • 251
  • 2
  • 6
2
votes
2 answers

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 --list-devices mmal service 16.1…
larsks
  • 685
  • 1
  • 6
  • 19
2
votes
2 answers

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 videostream (not necessarily the complete X…
Julian Bloum
  • 21
  • 1
  • 2
2
votes
4 answers

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 frequency of four seconds or less. Currently, keyframes…
Dan
  • 41
  • 1
  • 5
2
votes
0 answers

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:///dev/video0 --v4l2-width 640 --v4l2-height 480…
Christian
  • 21
  • 1
2
votes
0 answers

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 really important, as out tests shows that capturing…
Maxxie
  • 21
  • 1
1
2 3 4