Skip to content

Instantly share code, notes, and snippets.

@Flushot
Last active December 28, 2015 17:49
Show Gist options
  • Select an option

  • Save Flushot/7538871 to your computer and use it in GitHub Desktop.

Select an option

Save Flushot/7538871 to your computer and use it in GitHub Desktop.
Creates a file output.gif from input file $1
#!/bin/sh
out_file=output.gif
cut_in="00:00:00.000"
cut_out="00:00:10.000"
[ -f $out_file ] && rm -f $out_file
ffmpeg -ss $cut_in -i $1 -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm -t $cut_out - | convert -delay 5 -loop 0 -layers optimize - $out_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment