LaVOZs

The World’s Largest Online Community for Developers

'; linux - How to record webcam video signal with video4linux2? - LavOzs.Com

I need to record a video from my webcam with ffmpeg.

I tried with this command : ffmpeg -re -f video4linux2 -i /dev/video0 video.avi.

And I received that : The v4l2 frame is 24384 bytes, but 153600 bytes are expected.

When I try the same operation with avconv with this command : avconv -f video4linux2 -i /dev/video0 video.avi I received the same error.

But I can receive the video from my webcam with this command: gstreamer-properties.

How to configure v4l2 to get signal video from my webcam ?

The problem come from virtual box. It recognize my webcam the first time during my test but after just as a USB device. I set USB device to webcam and now I can stream or convert videos with ffmpeg.

Related
Write two webcam video with avconv
Unable to record webcam video in Google Chrome
How do I find all files containing specific text on Linux?
Best approach to real time http streaming to HTML5 video client
Use an IP-camera with webRTC