Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Created January 28, 2024 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstellanova/163be260cfbd323d1454f61b8dac076a to your computer and use it in GitHub Desktop.
Save tstellanova/163be260cfbd323d1454f61b8dac076a to your computer and use it in GitHub Desktop.
ffmpeg one liners to capture a portion of the screen and save to video file using x11grab
# x11grab from the default device at offset x=70, y=65
ffmpeg -video_size 1280x720 -framerate 30 -f x11grab -i :0.0+70,65 -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 out6.mkv
# use x265 output encoding instead
ffmpeg -video_size 1280x720 -framerate 30 -f x11grab -i :0.0+70,65 -c:v libx265 out7.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment