FFmpeg record my desktop
#!/bin/sh | |
SCREEN_SIZE="1920x1080" | |
ORIGIN="0,0" | |
# For dual screen setup where projected is on the right side of the desktop: | |
#ORIGIN="1920,0" | |
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