I have, at the moment, a rather huge mp3 collection that I would like to convert to ogg. I looked around sourceforge and came up with ttoogg
http://ttoogg.sourceforge.net/ . It is a perl script that takes in mp3s, calls up a bunch of programs, and spits out an ogg. It works nicely, save for the fact that I can't specify an entire root directory for it to do it's thing with. As it is now I would have to ttoogg each directory containing mp3s individually.
I have 4000 or so directories to do and I'm not going to do them individually.
The obvious solution is to then write a nice bash script to do the work for me. That's where my problem is. What I want to do is search through every folder recursively until an mp3 is found, convert the mp3 upon finding it, and then delete the original mp3 upon conversion. My idea was to find the mp3s was to use this in my script.
Code:
#encode all mp3s to ogg
find / -name '*.mp3' | ttoogg
The only problem is that I cannot get anything piped to ttoogg. I'm pretty sure got it to work earlier, but then walked off, did something else, and forgot how I got it to work. Now coming back to the problem I've gotten stuck in one of those infinite loop things. "Well, what I just did didn't work a few seconds ago, but what about now?"
Could someone explain to me why I can't get anything piped out?
I do realize that there is the -exec option for find, but ttoogg always places the oggs in the current working directory, which does me no good.
On a side note I'm still learning bash scripting, so anything I churn out probably isn't going to be the most elegant. If you can think up some better way, by all means tell me. I'll be very happy to get different solutions in. (Which I'm sure sounds like, "Do this for me!"

)