Skip to content

Instantly share code, notes, and snippets.

View yhatt's full-sized avatar

Yuki Hattori yhatt

  • Japan
  • 03:18 (UTC +09:00)
  • X @y_hatt
View GitHub Profile
@yhatt
yhatt / mkgif.sh
Created December 23, 2017 07:17
mkgif
#!/bin/sh
usage() {
echo "Usage: ${0##*/} [-o output] [-r framerate] [-f ffmpeg-filter] [-s width:height] input" 1>&2
echo ""
echo "Examples:"
echo " ${0##*/} foo.mp4 : Output GIF to foo.gif"
echo " ${0##*/} -o bar.gif foo.mp4 : Output GIF to bar.gif"
echo " ${0##*/} -r 10 foo.mp4 : Set framerate as 10"
echo " ${0##*/} -s 320:-1 foo.mp4 : Resize width to 320px with fixed aspect-ratio"