[FFmpeg-user] Can FFmpeg Record Video On Linux Using V4L2 in V4L2_CAP_VIDEO_CAPTURE_MPLANE Mode?
barsnick at gmx.net
Wed Apr 28 17:05:14 EEST 2021
On Wed, Apr 28, 2021 at 13:17:25 +0000, FFmpeg user discussions wrote:
> $ ffmpeg -f v4l2 -list_formats all -i /dev/video1 # Look at device information
> $ ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 output.mkv # save the video
You'll have to use the same device for both commands, but I assume
that's a typo or a copy/paste mistake.
> I get the following output with both commands
> [video4linux2,v4l2 @ 0xcbbd4f0] Not a video capture device.
> /dev/video1: No such device
You should show us the complete, uncut console output of the command
using the correct device.
Can you also use a tool such as v4l-info, and post its output here?
> I see here (https://github.com/FFmpeg/FFmpeg/blob/master/libavdevice/v4l2.c#L172) that v4l2 devices need to support V4L2_CAP_VIDEO_CAPTURE to open. My device does not support V4L2_CAP_VIDEO_CAPTURE but it does support V4L2_CAP_VIDEO_CAPTURE_MPLANE. Does FFmpeg have support for V4L2_CAP_VIDEO_CAPTURE_MPLANE?
I'm not really too knowledgable about these "newer" devices, but I
believe they are supported by the v4l2_m2m codec(s). Someone else may
need to explain why your device isn't recognized, after you have
provided the requested output.
Here is a check for MPLANE:
More information about the ffmpeg-user