Skip to content

Instantly share code, notes, and snippets.

@totetmatt
Created Jan 17, 2020
Embed
What would you like to do?
Grab a video and create a gif from selected timestamp
# $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