Skip to content

Instantly share code, notes, and snippets.

@lucascantor
Last active January 27, 2018 05:18
Show Gist options
  • Save lucascantor/bf72ec21b96c3d99682abe86afef35e1 to your computer and use it in GitHub Desktop.
Save lucascantor/bf72ec21b96c3d99682abe86afef35e1 to your computer and use it in GitHub Desktop.
Batch ffmpeg conversion of files in working directory
# ffmpeg batch conversion of files in working directory
# requires brew install ffmpeg
# $1: original file format
# $2: output file format
# usage: batchconvert m4a mp3
function batchconvert() {
for i in *."$1"; do ffmpeg -i "$i" "${i%.$1}.$2"; done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment