Skip to content

Instantly share code, notes, and snippets.

@quat1024
Created January 21, 2021 00:47
Show Gist options
  • Save quat1024/98820a2db05de4244b4c04c9cd31768d to your computer and use it in GitHub Desktop.
Save quat1024/98820a2db05de4244b4c04c9cd31768d to your computer and use it in GitHub Desktop.
convert gifs from Zachtronics games to mp4 files and squirrel them away in a subfolder (place this on your desktop)
mkdir -p zach/conv
mkdir -p zach/orig
for file in *.gif; do
echo "Converting $file"
ffmpeg -y -hide_banner -loglevel error -stats -i "$file" -crf 15 -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" "./zach/conv/${file%.*}.mp4"
mv "$file" "./zach/orig/$file"
done
@quat1024
Copy link
Author

quat1024 commented Jan 21, 2021

uhh copypaste the thing and change line 4 to *.ogv to convert spacechem ogv's to the much more supported mp4 format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment