Created
January 7, 2016 17:33
-
-
Save hancush/88ab796d0936c637f53a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| youtube-dl -o "_%(id)s.%(ext)s" $1 | |
| infile=$(ls | head -n1) | |
| palette="/tmp/palette.png" | |
| filters="fps=12,scale=500:-1:flags=lanczos" | |
| ffmpeg -v warning -ss $2 -t $3 -i $infile -vf "$filters,palettegen=stats_mode=diff" -y $palette | |
| ffmpeg -v warning -ss $2 -t $3 -i $infile -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse=dither=none" -y anim.gif | |
| rm $infile |
Author
Author
you gotta pip install youtube-dl also
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
other adjustable params (hard-coded, sry):