Skip to content

Instantly share code, notes, and snippets.

@bmegli
Created January 3, 2023 13:39
Show Gist options
  • Save bmegli/3ebbf397c8afbe70d6ef00aa983cc2dc to your computer and use it in GitHub Desktop.
Save bmegli/3ebbf397c8afbe70d6ef00aa983cc2dc to your computer and use it in GitHub Desktop.
FFmpeg script for capturing desktop
cat record.sh
set -x
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -draw_mouse 0 -i :1 -c:v libx264 -crf 0 -preset ultrafast ~/Videos/$1

To use:

  • chmod +x record.sh
  • ./record filename.mp4
    • adapt filename and extension as needed
  • hit q when done
  • the video is recorded to ~/Videos/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment