[[!meta title="mkogg"]] I keep my music organized by Genre→Artist→Album→Song and try to keep as much as possible in [FLAC][] format. When it comes time to wedge this music onto a smaller device, I want to recode the music in [Ogg Vorbis][ogg]. [SoX][] is a useful tool for converting between all sorts of audio formats, but I wanted the ability to excercise a bit more control over maintaning metadata (e.g. via [mutagen][]). To this end, I've put together a little [[Python]] script, [[mkogg.py]], which mirrors a source directory of mixed-format music as Ogg-encoded files (or other formats via `--target-extension`) in a target directory. You can use the [[cdrtools]] to burn CDs with your recoded music. [FLAC]: http://flac.sourceforge.net/ [ogg]: http://www.vorbis.com/ [SoX]: http://sox.sourceforge.net/ [mutagen]: http://code.google.com/p/mutagen/ [[!tag tags/code]] [[!tag tags/fun]] [[!tag tags/python]]