Questions tagged [v4l2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
72 views

'v4l2' is not a suitable output format - why does this error appear?

I have created following script I've been using on Arch Linux to stream the camera feed to OBS #!/usr/bin/env bash set -euo pipefail sudo modprobe v4l2loopback exclusive_caps=1 max_buffer=2 gphoto2 ...
s1n7ax's user avatar
  • 181
0 votes
0 answers
102 views

ffmpeg with rtmp source and v4l2 loopback output: no stop after losing source after Ubuntu 20.04 to 22.04 upgrade

Over the last few years, my IP security cameras were converted into /dev/videoX loopback devices by ffmpeg, then processed further with motion and other tools on Ubuntu 20.04 LTS. An example command ...
takbal's user avatar
  • 1
0 votes
0 answers
583 views

Create an IP camera from a virtual camera (ubuntu)

We need to use an IP camera for streaming. First of all, I created a virtual camera from a usb cam using v4l2loopback with these two commands: sudo modprobe v4l2loopback video_nr=5 card_label="...
B.Mira's user avatar
  • 1
1 vote
1 answer
591 views

v4l2: Limit resolutions that a webcam offers

I'm using a HDMI capture card to use a regular mirrorless camera as a webcam. This works great at 1080p or 720p resolutions, but the capture card does not only offer resolutions with 16:9 aspect ratio,...
Danilo Bargen's user avatar
0 votes
0 answers
188 views

v4l2 camera device ID keeps changing after streaming for an extended period of time

I am trying to stream video with multiple cameras on the Jetson Nano Developer Kit. While streaming for a longer period of time, one of the cameras randomly kept freezing. So I checked the available ...
Enos jeba's user avatar
0 votes
0 answers
429 views

ubuntu ffmpeg -> v4l2 error -> not a video capture device

I've got a problem with a XILINX Ultrascale. Programable logic and device tree should be ok, cause I get /dev/video0. gstreamer also getting pictures/stream from the mipi camera interface. But ffmpeg ...
Frank Kuchenbrod's user avatar
0 votes
0 answers
501 views

FFmpeg Record videos every second and save them in individual files

I am trying to create video every one second. I have the following code below. It creates the first video correctly but the following does not create them correctly. Anyone know what I may be missing, ...
José Vicente R's user avatar
0 votes
1 answer
477 views

How could I run this process (v4l2rtspserver) in the background?

I am trying to run on Debian system (Dietpi on Raspberry Pi): v4l2rtspserver -H 1080 -W 1920 -F 30 -P 8555 /dev/video0 But it keeps running in the command console despite adding & disown I have ...
PlayerWet's user avatar
  • 138
1 vote
0 answers
880 views

How to trim a stream from an rtsp camera with ffmpeg?

I need to crop the image of a stream coming from a camera on a Raspberry pi. The camera is placed in a door peephole and I need to crop and enlarge the area of interest to see it full screen. I have ...
PlayerWet's user avatar
  • 138
1 vote
1 answer
438 views

Synchronize recording of three cameras with ffmpeg

I am trying to make the video that is recorded from three usb webcams be synchronized, I am using this command, but I still have differences by milliseconds or seconds. Any idea how to achieve it? ...
José Vicente R's user avatar
2 votes
0 answers
158 views

Strange video distortion capturing video from GV-USB2 on Linux using FFMPEG

I'm trying to capture video from a GV-USB2 (a popular composite/S-Video capture card) on a Raspberry Pi 4B running Raspbian Buster. I built and installed these V4L2 drivers for the GV-USB2, and when I ...
RK.'s user avatar
  • 121
0 votes
1 answer
895 views

Trying to emulate a hardware camera with a stream from a raspberry pi/picam?

I have a raspberry pi and pi cam v2 connected to wifi. I am trying to stream the camera feed to a laptop over wifi, then make that stream appear as if it were a hardware camera on the laptop. I want ...
John Doe's user avatar
0 votes
1 answer
537 views

Can't play video file to virtual camera and then webcam to virtual camera v4l2

When I try to play a video to a virtual camera it works but when I try to play webcam to virtual camera it doesn't do anything. What I do: Playing video to virtual camera:  ffmpeg -re -i "yt.mkv&...
Guack's user avatar
  • 11
0 votes
1 answer
390 views

Howto redirect cheese webcam effect to new video device

I am on ubuntu 20.04, but v4l2 package is not working: so I installed it from here git clone [email protected]:umlaeute/v4l2loopback make sudo insmod v4l2loopback.ko exclusive_caps=1 video_nr=1 ...
Leder's user avatar
  • 101
1 vote
1 answer
2k views

MJPEG stream from webcam not working

I have 5 HD Webcams (Creative Live Cam Sync 1080p) and want to stream the pictures with https://github.com/jacksonliam/mjpg-streamer on Debian Buster 4.19.0-11-amd64. All of them support MJPG, as you ...
ComanderKai77's user avatar
0 votes
1 answer
1k views

V4L2 Loopback: VLC can use it, but a web browser can't

I have a bunch of USB 3 capture devices feeding OBS, and V4L2 Loopback to provide OBS's output as another video input. (/dev/video99) I want to use that output in an online meeting, but neither ...
AaronD's user avatar
  • 181
2 votes
1 answer
258 views

FFmpeg/FFplay sometimes goes to sleep waiting on IO when webcam is unplugged

I made a webcam viewer out of a Raspberry Pi with Raspbian, FFmpeg/FFplay, and v4l2. I have a udev rule that automatically starts an FFmpeg stream and brings up FFplay to view it when my webcam is ...
SilentNightx's user avatar
0 votes
1 answer
41 views

Simultaneusly connecting several webcams

I have 4 webcams, plugged into a USB hub, that I would like to use with my computer. I can find out which devices are recognized by the computer with v4l2-ctl --list-devices. When I plug the entire ...
EtomicBomb's user avatar
0 votes
1 answer
574 views

Rename Devices in V4L2?

I have 4 identical HDMI -> USB 3 capture devices, meant to feed a live broadcast. That works just fine. After some one-time trial-and-error on the initial install, the broadcast production ...
AaronD's user avatar
  • 181
1 vote
1 answer
1k views

How do I stream JPGs to v4l2loopback with ffmpeg?

I'm trying to use ffmpeg to stream images into v4l2loopback, but it seems like only pngs work. Here's the command that I am using, where <image> is the path to an image, and /dev/video63 is a ...
vityavv's user avatar
  • 113
2 votes
0 answers
3k views

FFmpeg: synchronize streams from two webcams

Making an MP4 file with two video streams, each from a different webcam, like this: ffmpeg -f v4l2 -thread_queue_size 32 -video_size 1920x1080 -input_format mjpeg -i /dev/video6 \ -f v4l2 -...
Lasse Kliemann's user avatar
1 vote
1 answer
2k views

Stream linux destop as fake webcam to virtuabox windows guest

I would like to capture (a part of) my linux desktop (ubuntu 20.04), stream it as a webcam to a windows 10 guest VM running in Virtualbox. I found Using desktop as fake webcam on linux which got me ...
nick maxwell's user avatar
0 votes
1 answer
858 views

Green tinted flickering screen with FFmpeg + v4l2loopback-dkms

I have a Raspberry PI 4 with a Raspberry 7" touch screen, where buster is installed with Ffmpeg, Gstreamer, and v4l2loopback-dkms. To that I have attached a USB video grabber dongle, where I have ...
Costa's user avatar
  • 11
3 votes
0 answers
1k views

FFmpeg output sent to v4l2loopback video device won't be read by guvcview

I set a dummy camera /dev/video1 with v4l2loopback module. I can read the stream with ffplay, vlc or even zoom of this camera when I send to it contentwith ffmpeg: ffmpeg -re -i input-file.mp4 -f v4l2 ...
Amessihel's user avatar
  • 355
0 votes
1 answer
423 views

virtual webcam from dvcam input on firewire - linux

I'd like to use my dvcam as a webcam on linux (ubuntu 18.04). It works happily under windows showing up as a video source.. but on linux not so easy. It shows up on /dev/fw0 & fw1 as 720x576 ...
baradhili's user avatar
  • 113
0 votes
1 answer
1k views

Realtime overlay png image (with tansparency) over webcam output to feed to v4L2 loopback virtual video camera

I've been struggling with this for a few days and just can't get the final part of the FFmpeg command right. I'd be very grateful for any help please. I have studied similar questions and answers on ...
Sun Dial's user avatar
  • 101
2 votes
0 answers
3k views

"Non-monotonous DTS in output stream" when capturing video with ffmpeg

I'm trying to capture VHS video on Linux using a new USB capture device and FFMPEG.  I'm able to successfully capture either only audio (using Alsa), or only video (using v4l2) but when I try to do ...
Carini's user avatar
  • 31
1 vote
2 answers
2k views

Linux USB video capture issues

I purchased the Hauppauge USB-Live 2 capture device because several recent Amazon reviews suggest it should work with modern Linux kernels. When I plug it into my Raspberry Pi 4 running the latest ...
Carini's user avatar
  • 31
1 vote
0 answers
136 views

Synchronize multiple realtime inputs

I'm trying to record a video+audio using ffmpeg from 3 sources: x11grab (desktop), v4l2 (webcam) and alsa (microphone). I'm using this script: #!/bin/bash set -x out=$1 rm -vf $out rate=25 cam_size=...
g4s8's user avatar
  • 133
0 votes
1 answer
381 views

Merge x11grab with v4l2 into single output file

I'm trying to record a video using ffmpeg from two inputs: webcam (v4l2) and desktop (x11grab). I checked that both inputs are working fine: ffmpeg \ -f x11grab -s 1920x1080 -r 25 -i :0.0 \ -...
g4s8's user avatar
  • 133
1 vote
1 answer
3k views

gstreamer using h264 encoding with small video size

I need to record a video using my usb webcam in my linux based pc. I found gstreamer with h264 encoding for lower the cpu percentage. But i am new to gstreamer so i had errors when running some ...
Thoht's user avatar
  • 115
0 votes
1 answer
820 views

Piping mp4 video file to v4l2 devices lowers the frame rate in ffmpeg

I'm trying to play a 10fps video file on multiple v4l2 loopback devices. Although the following command outputs the video on the video devices, it does not maintain the framerate. The framerate (and ...
Ali Alavi's user avatar
0 votes
1 answer
587 views

Gstreaming - two web cams over tcp

I'm trying to stream two web cams on a single gstreaming command, I'm able to start a single camera with : gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! videoscale ! video/x-raw,width=...
Bruno Cerk's user avatar
1 vote
0 answers
2k views

V4L2 doesn't use a lower advertised frame rate

I'm capturing images on Linux (Pi 3B+, Stretch lite). The camera reports that it's capable of delivering images at 30 fps or 60 fps. Here's the output from v4l2-ctl v4l2-ctl --list-formats-ext ioctl: ...
Josh's user avatar
  • 132
1 vote
0 answers
1k views

How to inform vlc for sample rate change from device in linux

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 ...
Chakravarthi Pradeep's user avatar
3 votes
0 answers
1k views

What is the right ffmpeg output format for playing a video to webcam using v4l2-loopback in linux? [duplicate]

please can someone show me the new syntax for sending videos to webcam using ffmpeg and v4l2loopback? It used to work perfectly until I updated and upgraded recently the previous syntax i use is: ...
Adams Gray's user avatar
7 votes
1 answer
27k views

What is the right ffmpeg output format for a v4l2-loopback device?

Following the guide in this question I did: $ sudo modprobe v4l2loopback $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 The device ...
Nobody moving away from SE's user avatar
3 votes
0 answers
4k views

ffmpeg stream video file to fake webcam

I'm trying to set up ffmpeg to forward video stream from file to dummy video device created by v4l2loopback My command looks like following: ffmpeg -re -i video.mp4 -c:v rawvideo -pix_fmt yuv420p -f ...
Igor Piddubnyi's user avatar
0 votes
1 answer
122 views

Identify kernel module for analogue video capture card Multimedia video controller: Adaptec (formerly DPT) Device 9065

I'm trying to identify a kernel module to make an analogue video capture card work on video4linux. lspci: Multimedia video controller: Adaptec (formerly DPT) Device 9065 02:04.0 Class 0400: Device ...
Desmond Coertzen's user avatar
1 vote
0 answers
320 views

EM2860 based video converter captures corrupted frames (how to debug?)

I designed my own analog video to USB converter. This converter is based on the TI TVP5150AM and the Empia EM2860. Shortly the converter works as shown in the diagram below. +---------+ ITU-...
Pasquale van Heumen's user avatar
0 votes
1 answer
2k views

Compile Linux V4L-DVB media_build for a specific kernel (not the running one)

Is it possible to compile the LinuxTV.org V4L-DVB media_build for a kernel source contained in a specific path, instead of the running one (i.e. a different version)? I have the kernel sources and in ...
virtualdj's user avatar
  • 256
2 votes
2 answers
8k views

v4l2 Identifying /dev/video* via lsusb

I'm writing a script that must use a particular camera plugged in to my system. $ lsusb|grep C930e Bus 001 Device 011: ID 046d:0843 Logitech, Inc. Webcam C930e How can one programatically discover ...
lysdexia's user avatar
  • 169
5 votes
1 answer
8k views

FFmpeg build with V4L2

I want to use ffmpeg to access my webcam. I tried: ffmpeg -f v4l2 -i /dev/video0 output.mp4 but I am getting an error: Unknown input format: 'v4l2' Similarly with video4linux2 instead of v4l2. I ...
Jon G's user avatar
  • 307
0 votes
1 answer
2k views

No such input format: MJPEG

I want to convert my camera pixels format from YUYV to MJPEG. I tried to use v4l-utils but when i used this commend in terminal: ffmpeg -f video4linux2 -pixel_format MJPEG -i /dev/video0 but when I ...
shar's user avatar
  • 103
5 votes
0 answers
10k views

How to know which framerate should I use to capture webcam with ffmpeg?

I'm capturing video from my webcam with the following command: ffmpeg -r 30 -f v4l2 -video_size 160x120 -i /dev/video0 output.avi The -r option indicate the framerate I want. However, it's not that ...
chocopoche's user avatar
11 votes
3 answers
11k views

Can I use my DSLR as webcam through gphoto2 + v4l2loopback?

So, what i'm trying to do may be a little complicated, by i'm finding my way. Let me explain the basics: 1 - I have an DSLR camera and i want to use it as webcam (but v4l2 can't make a /dev/videoX ...
user2934303's user avatar
0 votes
1 answer
634 views

Video for Linux (V4L) generator driver

I would like to experiment with tvheadend but prior to investing in an actual capture card I was wondering if V4L supports a "generate" capture "card" that can just offer video stream of an image or ...
Friedrich 'Fred' Clausen's user avatar
2 votes
1 answer
3k views

Alternatives to Video4Linux2 for grabbing from webcam (Using FFmpeg)

I'm getting (two alternating) errors following this guide for streaming from a Raspberry Pi. Are there any other grabbers besides V4L2 that I can use with ffmpeg? Or are there any other streaming ...
Jodes's user avatar
  • 433
2 votes
0 answers
1k views

Analog Tv Tuner drivers for ubuntu

I was searching for the Analog usb (stick) tv tuner card for Ubuntu, but I have not found single such tv tuner card with ubuntu drivers available. I tried to search for the open source tv tuner ...
ganesh's user avatar
  • 131
1 vote
3 answers
6k views

v4l2 issues with webcam encoded to H.264

I am trying to send a H.264 webcam video feed over wifi to another computer using gstreamer. I am using this tutorial as a guide. I am using a Creative Live! Cam Connect HD as my webcam. The website ...
mashrur's user avatar
  • 11