Last active
August 3, 2018 08:38
-
-
Save oskar456/e887539e66af8cd045f1180f1969fab3 to your computer and use it in GitHub Desktop.
FFmpeg record my desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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