Skip to content

Instantly share code, notes, and snippets.

@rriemann
Created November 22, 2011 13:16
Show Gist options
  • Save rriemann/1385642 to your computer and use it in GitHub Desktop.
Save rriemann/1385642 to your computer and use it in GitHub Desktop.
Convert all audio/video files recursively to another format
# inspired by: http://yogsototh.wordpress.com/2007/10/24/bash-script-loop/
# this probably only works within the zsh. So you might enter it first by execute 'zsh'
# also works with whitespaces in filenames
for file in ./**/*.wma; do
ffmpeg -i $file -f ogg -acodec libvorbis -ab 128k ${file%.*}.ogg
mkdir -p ./old_wma/${file%/*}
mv $file ./old_wma/${file}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment