Created
January 17, 2020 08:29
-
-
Save totetmatt/e2f300e86a9e1891b7db5dc03d236e87 to your computer and use it in GitHub Desktop.
Grab a video and create a gif from selected timestamp
This file contains 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
# $1 = Video URL | |
# $2 = Time to start (format 00:00:00) | |
# $3 = Duration of sample (format 00:00:00) | |
# $4 = Output file | |
youtube-dl -f mp4 \ | |
$1 \ | |
-o - \ | |
| ffmpeg -i pipe: \ | |
-ss $2 \ | |
-t $3 \ | |
-vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse"\ | |
-loop 0 -y \ | |
$4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment