Friday, December 28, 2012

Convert .ogg to .mp3

Short recipe I found, but can't find the source for. Half my sound files are in .ogg form, and sometimes I need that to be .mp3. This is the extended version, useful for converting many files at once.
for x in *.ogg; do avconv -i "$x" -acodec libmp3lame "`basename "$x" .ogg`.mp3"; done
Note that on Linux Mint, I needed to install lame as well as some of the *extra* audio libraries from ubuntu-restricted-extras (and resolve conflicts with already installed libraries) for this to work.

No comments:

Post a Comment