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 (platform:bcm2835-v4l2):
/dev/video0
$ ffmpeg -f v4l2 -list_formats all -i /dev/video0
[...displays all the expected formats...]
But when I try to capture from this device, I am getting an error message:
$ ffmpeg -f v4l2 -input_format h264 -framerate 30 -video_size 1024x768 -i /dev/video0 -c copy -t 10 video.mp4
[video4linux2,v4l2 @ 0x1053250] ioctl(VIDIOC_STREAMON): Operation not permitted
/dev/video0: Operation not permitted
Despite the error message, this doesn't appear to be a permissions issue. I see the same behavior if I run the ffmpeg
command as root
.
There are a number of web pages out there that appear to be running substantially the same command with the error (and remarkably few results when I search for the error message). What could be going on here?