Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4943

General discussion • Best FPS screen recording on Pi5 Bookworm

$
0
0

Code:

sudo ffmpeg -framerate 60 -device /dev/dri/card1 -f kmsgrab -i - -vf 'hwdownload,format=bgr0' -c:v ffv1 -b:v 2500k -maxrate 4000k -y output.mkv
This was the best I could get after about a day of work - around 31fps of 1080p video streamed to a lossless uncompressed video file.
Frame rate is reduced to around 20 with light encoding.

Code:

sudo ffmpeg -framerate 60 -device /dev/dri/card1 -f kmsgrab -i - -vf 'hwdownload,format=bgr0' -c:v libx264 -b:v 2500k -maxrate 4000k -preset veryfast -x264-params qp=0 -tune animation -y output.mkv
This is not ideal due to needing root, and it cannot capture the mouse pointer, but it is a higher framerate than wf-recorder, which is what most people suggest for screen recording on Wayland. I could not get wf-recorder to reliably stay above 15fps.

Any ideas? I have tried and failed getting a gstreamer/pipewire/xdg-desktop-portal route working. Has anyone had good success with that?

Notes:
This was my best wf-recorder command:

Code:

yes | wf-recorder -a --codec mjpeg --pixel-format yuv420p -p qmax=5 --file output.mkv
This should allow using ffmpeg with kmsgrab without sudo:

Code:

sudo setcap cap_sys_admin+ep /usr/bin/ffmpeg

Statistics: Posted by Botspot — Sun Jan 05, 2025 3:22 am



Viewing all articles
Browse latest Browse all 4943

Trending Articles