Encoding all files in a directory using ffmpeg

The wonderful folks in the Django community have uploaded all the videos from Djangocon 2009. I’ve downloaded them but needed to convert them to mp3 so I could listen to them on my commute.

I used the ever awesome ffmpeg

for f in *.ogv; do ffmpeg -i “$f” -acodec libmp3lame -ab 256k “${f%.ogv}.mp3”; done