Questions tagged [v4l2]

61 questions
23
votes
2 answers

ffmpeg open webcam using YUYV but i want MJPEG

I need ffmpeg to open webcam (Logitech C910) in MJPEG mode, because the webcam can give ~24 fps using the MJPEG "protocol" and only ~10 fps using the YUYV. Can I choose between them using the ffmpeg command line? xx@(none) ~ $ v4l2-ctl…
11
votes
3 answers

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 device with it, so no internet application can use…
8
votes
2 answers

Linux (v4l) webcam - make settings "stick"

My Logitech camera (C300) is properly detected and present at /dev/video0. However, by default the image has contrast and saturation set to maximum, which significantly degrades the image quality. I can change the settings using guvcview but after…
petr
  • 625
7
votes
1 answer

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 /dev/video0 shows up as expected but the ffmpeg…
6
votes
1 answer

Poor image quality and high CPU usage while streaming in high resolution using webcam and VLC in Linux

I'm trying to do some some streaming with a webcam, but so far the results are not good: everything I stream in 320x240 looks good, but as soon as I choose a higher resolution, the image quality gets terrible and CPU usage is going through the…
Jeroen Jacobs
  • 343
  • 1
  • 5
  • 12
5
votes
0 answers

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 I want 30 FPS, it's just that otherwise it does…
5
votes
1 answer

Why can’t two programs access my webcam simultaneously?

I first launch cheese and my webcam turns on. I then run vlc to grab the output of /dev/video0 but it fails with: [0x7f3ea40012e8] v4l2 demux error: cannot set input 0: Device or resource busy [0x7f3ea40012e8] v4l2 demux error: cannot set input 0:…
qdii
  • 1,107
5
votes
1 answer

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 therefore assume my build of ffmpeg is missing…
Jon G
  • 307
3
votes
2 answers

How Video4Linux and ALSA work with Codecs

My understanding is that a codec is both a decoder and a specification for decoding. So some group writes a codec which explains how to decode from their format back into the raw bitstream, and they leave the encoding implementation up to anybody…
pnongrata
  • 2,982
3
votes
0 answers

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 /dev/video1 Redirecting a real camera to the…
Amessihel
  • 355
3
votes
0 answers

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

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: sudo modprobe v4l2loopback ffmpeg -an -re -i…
3
votes
0 answers

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 v4l2 -s 640*360 /dev/video0 However if I try to…
2
votes
1 answer

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 setups I could try? I gave 'motion' a go but it was…
Jayy
  • 443
2
votes
0 answers

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 drivers for linux and then what I found is this. Does…
ganesh
  • 131
  • 6
2
votes
3 answers

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 claims that the webcam has on-board H.264 encoder.…
mashrur
  • 21
1
2 3 4 5