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.

About these ads

1 Response to “Find and convert”

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

    I found this nice explanation of find:
    which helped me figure that line out.

    btw pacpl is a monster audio converter perl script which does recursive batch conversions.
    There’s a fairly new deb file here:
    which makes installation a bit easier.
    Once it’s in usage is very simple, and it seems to be all-powerful. :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


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

Blog Stats

  • 3,963,764 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: