Skip to content

Instantly share code, notes, and snippets.

@paulodiovani
Created April 28, 2016 20:24
Show Gist options
  • Select an option

  • Save paulodiovani/308a77d8792b4029dba5b6c315aab842 to your computer and use it in GitHub Desktop.

Select an option

Save paulodiovani/308a77d8792b4029dba5b6c315aab842 to your computer and use it in GitHub Desktop.
Convert latest video on a directory to gif
#!/bin/sh
# Convert the latest *.webm video (works with other formats)
# in directory to *.gif
# At the end, ask for deletion of origina video
ffmpeg -i "$(ls -dt *.webm | head -1)" \
-filter_complex "fps=10,scale=1024:-1:flags=lanczos" screencast.gif &&
rm -i "$(ls -dt *.webm | head -1)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment