fix an audio conversion script to work through multiple directories and convert mp3s to ogg vorbis

Chris Hill chris at monochrome.org
Sat May 7 21:03:53 UTC 2011


On Sat, 7 May 2011, Antonio Olivares wrote:

> My question is the following:
> How can I run the script to recursively find all mp3's and convert them 
> to ogg vorbis(with ogg extension already in place/or rename them in one 
> step[instead of running two scripts] and deleting the mp3's) all in one 
> time?

I had a similar (but not identical) problem, and I wrote a script to solve 
it. I wanted to recursively go through a directory tree, find flac files, 
and make mp3s of them while transferring over the ID3 tags, while keeping 
a duplicate directory structure for the mp3s. And don't do the conversion 
if the file already exists.

My script is based on traverse2.sh by Steve Parker, which is at 
http://steve-parker.org/sh/eg/directories/. His tutorial site is extremely 
helpful, and I recommend it.

My script is at http://pastebin.com/77NRE6SZ - maybe you can adapt it to 
your needs.

HTH.

-- 
Chris Hill               chris at monochrome.org
**                     [ Busy Expunging </> ]


More information about the freebsd-questions mailing list