Skip to content

Instantly share code, notes, and snippets.

@wmantly
Created July 12, 2018 19:11
Show Gist options
  • Select an option

  • Save wmantly/b72b6d35794d0c6218fe964eb799f02d to your computer and use it in GitHub Desktop.

Select an option

Save wmantly/b72b6d35794d0c6218fe964eb799f02d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
for file in *.avi;
do name=`python3 -c "import re; print(re.sub(r'\.[^\.]+$', '.mp4', '''$file'''))"`;
echo $name;
ffmpeg -i "$file" -movflags +faststart "${name}" && rm "$file";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment