Skip to content

Instantly share code, notes, and snippets.

@tony2nite
Created July 11, 2020 12:30
Show Gist options
  • Save tony2nite/dcdf9965e70ba695868d572327366156 to your computer and use it in GitHub Desktop.
Save tony2nite/dcdf9965e70ba695868d572327366156 to your computer and use it in GitHub Desktop.
convert old AVI to MP4 with good quality, keeping original date/time
for i in *.avi; do ffmpeg -i "$i" -metadata date="$(stat -f %SB -t "%Y-%M-%d %T" $i)" -vf yadif -c:v libx264 -preset slow -crf 22 "${i%.*}.mp4";touch -r "$i" "${i%.*}.mp4"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment