Skip to content

Instantly share code, notes, and snippets.

@nplusp
Created June 10, 2024 09:03
Show Gist options
  • Save nplusp/e665cadec807f3bfcd88b5a75b1df1b8 to your computer and use it in GitHub Desktop.
Save nplusp/e665cadec807f3bfcd88b5a75b1df1b8 to your computer and use it in GitHub Desktop.

Revisions

  1. nplusp created this gist Jun 10, 2024.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // install dependencies
    brew install ffmpeg
    brew install gifsicle

    // add alias
    alias gify='function _gify(){ ffmpeg -i "$1" -pix_fmt rgb8 -r 10 /tmp/{1%.*}_tmp.gif && gifsicle -O3 /tmp/{1%.*}_tmp.gif -o "${1%.*}.gif"; rm /tmp/{1%.*}_tmp.gif; unset -f _gify; }; _gify'

    // run it
    gify /path/to/file.mp4