Created
June 9, 2020 15:42
-
-
Save pavel-kirienko/7d4482d310eed847ef096b896425d1ef to your computer and use it in GitHub Desktop.
Convert video to gif
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/bash | |
# Convert all video files in the current directory into gifs. | |
# Silently overwrite existing files. | |
# This is useful for working with matplotlib animations. | |
for src in *.mp4 | |
do | |
bn="${src%.*}" | |
echo "$src $bn" | |
ffmpeg -y -i "$src" "${bn}.gif" || exit 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment