Definitely in the note-to-self category, I needed to convert several subfolders of mp3 files to ogg format, and it took a little while to find a combination of find
and mp32ogg
that would play nice together. In the end, it was this combination, along with xargs
, that did the trick.
find . -print0 -iname *mp3 | xargs -0 mp32ogg --delete --verbose --preserve-timestamp
Not pretty, but it saves me endlessly changing directories to convert all those subfolders.
I know what you’re thinking — it’s just a script, and it supposedly will recurse directories. For whatever reason, all my attempts to push the script itself to step down through the file structure were not working, and hence the creepy CLI solution.
And I know what you’re thinking — I’ve degraded the quality by converting between lossy formats. Doesn’t matter; these are voice recordings, and rather poor quality to start with. I’m not losing anything.
I found this nice explanation of find:
http://wooledge.org:8000/UsingFind
which helped me figure that line out.
btw pacpl is a monster audio converter perl script which does recursive batch conversions.
http://pacpl.sourceforge.net/
There’s a fairly new deb file here:
http://kubuntuforums.net/forums/index.php?topic=3093565.0
which makes installation a bit easier.
Once it’s in usage is very simple, and it seems to be all-powerful. 🙂