Find and convert

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.

1 Response to “Find and convert”


  1. 1 johnraff 2008/10/12 at 2:09 AM

    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. :)


Leave a Reply




Welcome!

Some recent desktops


July 16, 2009
Openbox 3.4.7.2 on Crux Linux
1Ghz Pentium III 512Mb PC133


July 11, 2009
screen-vs on Crux Linux
550Mhz Celeron 192Mb PC100


Feb. 13, 2009
Awesome 2.3.4 on Crux Linux
100Mhz Pentium 16Mb PC66 120Gb

A recent game


Warzone 2100
IceWM 1.2.37 on Arch Linux
1Ghz Pentium III 512Mb PC133

Be counted!

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Downloads

Blog Stats

  • 1,220,789 hits

Categories

Archives

Calendar

October 2008
S M T W T F S
« Sep   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031