Skip to content

Instantly share code, notes, and snippets.

Last active August 3, 2018 08:38
What would you like to do?
FFmpeg record my desktop
# For dual screen setup where projected is on the right side of the desktop:
ffmpeg -vaapi_device /dev/dri/renderD128 -framerate 25 -video_size $SCREEN_SIZE \
-f x11grab -i :0+$ORIGIN -f pulse -ac 2 -i default -vf 'format=nv12,hwupload' \
-c:v h264_vaapi -c:a aac screencast-$(date +%H%M%S).mkv
## Variant without HW accelerated encoding
#ffmpeg -framerate 25 -video_size $SCREEN_SIZE \
# -f x11grab -i :0+$ORIGIN -f pulse -ac 2 -i default \
# -c:v libx264 -c:a aac screencast-$(date +%H%M%S).mkv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment