Skip to content

Instantly share code, notes, and snippets.

@tdhooper
Last active August 17, 2021 17:29
Show Gist options
  • Save tdhooper/b46bbc0ec814dd0784c149d8df678e4b to your computer and use it in GitHub Desktop.
Save tdhooper/b46bbc0ec814dd0784c149d8df678e4b to your computer and use it in GitHub Desktop.
ffmpeg instagram
#!/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