Skip to content

Instantly share code, notes, and snippets.

@twolfson
Last active March 17, 2016 02:16
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 twolfson/65f71c9739674ae96403 to your computer and use it in GitHub Desktop.
Save twolfson/65f71c9739674ae96403 to your computer and use it in GitHub Desktop.
Notes for future self on screen recording on Linux

I'm currently getting frustrated at screen recording on Linux again. However, I think I've finally found tools that will work:

  • ffmpeg/avconv for recording
    • https://trac.ffmpeg.org/wiki/Capture/Desktop
    • ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 output.mp4
      • Linux Mint/Ubuntu 14.04 need to use avconv instead of ffmpeg but they are the same damn thing -_-;;
      • Installed via apt: avconv-tools
  • xrectsel for selecting a screen area
  • ImageMagick or GraphicsMagick for serializing as a GIF
    • http://superuser.com/a/556031
    • mkdir frames - Create frames directory
    • avconv -i output.mp4 -r 10 frames/ffout%03d.png - Output 10 frames per second from input to keyed files
    • Cut frames by hand
    • convert -loop 0 frames/ffout*.png output.gif - Generate GIF with 0 delay between frames
    • imagemin output.gif > output.min.gif - Optionally minify GIF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment