Closed 350d closed 2 years ago
My C920 only supports 1920x1080@5fps in YUYV mode. Check out with v4l2-ctl --list-formats-ext
. Fortunately you can use the C920's H264 encoder for higher fps with the capture_format = H264
. Or you can use Pi4 with an USB3 webcam in YUYV mode and use the pi's encoder.
1920x1080 listed under H264 and MJPG but both not available for capture_format
for some reason.
Errors for other than YUYV
:
ERROR:root:/dev/video11: H264 input format not available
OR
ERROR:root:/dev/video11: MJPG input format not available
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'YUYV' (YUYV 4:2:2)
...
Size: Discrete 1920x1080
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 2304x1296
Interval: Discrete 0.500s (2.000 fps)
Size: Discrete 2304x1536
Interval: Discrete 0.500s (2.000 fps)
[1]: 'H264' (H.264, compressed)
...
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.042s (24.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
[2]: 'MJPG' (Motion-JPEG, compressed)
...
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.042s (24.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
My config:
[server]
listen =
port = 8000
[/dev/video0]
width = 1920
height = 1080
fps = 30
capture_format = MJPG
encoder = /dev/video11
focus_auto = 0
power_line_frequency = 50 Hz
[/dev/video11]
h264_profile = High
h264_level = 4.2
h264_i_frame_period = 15
uvcx_h264_i_frame_period = 1000
uvcx_h264_profile = High
try with this config:
[server]
listen =
port = 8000
[/dev/video0]
width = 1920
height = 1080
fps = 30
capture_format = H264
focus_auto = 0
power_line_frequency = 50 Hz
uvcx_h264_i_frame_period = 1000
uvcx_h264_profile = High
The /dev/video11 is the H264 encoder on a Pi. You can use that if your camera doesn't support H264.
It works!
Cool! :)
I have C920 here and 1920x1080@30fps doesn't work. Raspberry Pi Zero W + OS Buster Lite version. Only I can get is 5 fps with
capture_format = YUYV