Last active
August 17, 2021 17:29
-
-
Save tdhooper/b46bbc0ec814dd0784c149d8df678e4b to your computer and use it in GitHub Desktop.
ffmpeg instagram
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
#!/bin/sh | |
# usage: ./makemp4.sh export01 output01 | |
frames=`mktemp -d` | |
for i in 1 2 3; do | |
for file in $1/*.png; do | |
filename=$(basename "$file") | |
cp "$file" "$frames/$i-$filename" | |
done | |
done | |
ffmpeg -r 30 -pattern_type glob -i "$frames/*.png" -vf "scale=800:-1:flags=lanczos" -f mp4 -y -vcodec libx264 -pix_fmt yuv420p -crf 10 $2.mp4 | |
rm -r $frames |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment