Skip to content

Instantly share code, notes, and snippets.

@lux
Created January 9, 2018 15:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lux/b624d5cfeb2681a6ef5b8c5bdf5607b6 to your computer and use it in GitHub Desktop.
Save lux/b624d5cfeb2681a6ef5b8c5bdf5607b6 to your computer and use it in GitHub Desktop.
Quick script ot convert a folder of gifs to mp4 with web-optimal settings (note: requires ffmpeg)
#!/bin/bash
for i in *.gif; do
ffmpeg -i "$i" -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" "${i%.*}.mp4";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment