Glitchy video capture

You can find the latest version here:

There is also a fix for flickering that could be the problem:

If you wish you can try this small tool (Debian 11) that displays the contents of the camera or any v4l2 device on the screen with few resources (~5% CPU usage). It uses DRM, so you need to stop X11 and be in a console (CLI) or ssh session. It displays the contents on HDMI-1 only.

  • Unzip the capture tool and make it exec

    sudo chmod +x capture

  • Stop X11, log in to an ssh session, or type in a cmd line

    sudo systemctl stop lightdm

  • ALT+F1 and log in to CLI.

  • Run, this will display 2000 frames coming from your camera to HDMI-1, adjust to a higher number of frames so you can observe any glitches

[sudo] ./capture -d /dev/video0 -f NV16 -c 2000 -s 3840x2160
HDMI-A-1 -> connected
HDMI-A-2 -> not connected
DP-1 -> not connected
rga_api version 1.8.1_[4]

You can have a PrintScreen (png file) at the 100th frame (that gives you true FPS) with this command:

[sudo] ./capture -d /dev/video0 -f NV16 -K 100 -c 2000 -s 3840x2160

If your device is BGR3

[sudo] ./capture -d /dev/video0 -f BGR3 -K 100 -c 2000 -s 3840x2160

If your device is NV12

[sudo] ./capture -d /dev/video0 -f NV12 -K 100 -c 2000 -s 3840x2160

The screenshot file will be:

screenshot_3840x2160.png

Hope it helps

capture.zip (24.7 KB)