Skip to content

Instantly share code, notes, and snippets.

@abihf
Created May 16, 2020 19:40
Show Gist options
  • Save abihf/35782c1068e51e79326be7b26853c14a to your computer and use it in GitHub Desktop.
Save abihf/35782c1068e51e79326be7b26853c14a to your computer and use it in GitHub Desktop.
smooth screen recording with hevc/h265 hardware encoding
# need sudo
ffmpeg -device /dev/dri/card0 -f kmsgrab -framerate 60 -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=format=nv12' -c:v hevc_vaapi output-$(date +%s).mp4
# tested with amdgpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment