I've used Logitech 1280x720/30 camera on my Ubuntu 22.04.
I've set-up some Python code to use GStreamer to read video from the camera. However, I can only get 7.5 framerate, even though it is supposed to give 30 fps. This prompted me to do some research.
When I run v4l2-ctl --list-formats-ext
I get:
[0]: 'YUYV' (YUYV 4:2:2) Size: Discrete 1280x720 Interval: Discrete 0.133s (7.500 fps) Interval: Discrete 0.200s (5.000 fps)[1]: 'MJPG' (Motion-JPEG, compressed) Size: Discrete 1280x720 Interval: Discrete 0.033s (30.000 fps) Interval: Discrete 0.040s (25.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.200s (5.000 fps)
However, when I use Guvcview GUI, if offers me way more options for capturing the 1280x720 video:
- YUYV - max framerate 15/2- MJPG - max framerate 30- RGB3 - max framerate 30- BGR3 - max framerate 30 - YU12 - max framerate 30- YV12 - max framerate 30
Seems like only YUYV isn't capabe of 30 fps?
Why does v4l2-ctl
not give as many options as Gucview? In other words, which of those video outputs are really supported by my usb webcam?