There are many reasons why I like Linux. I came up with a brilliant example of how it is the best today, though: the past few weeks, I’ve been uploading some sermons onto the Fordham Website. What I had been doing was ripping the CDs to hard disk [sermons are recorded directly at the church onto CD] using a graphical tool called Grip, converting them to one file using Sound eXchange (a command-line tool), then converting them to MP3 using Audacity, and then uploading them using a graphical FTP Client. As you can see, that’s quite a number of steps – it took ten to fifteen minutes of my time!
What I wanted to do was streamline the process — I didn’t want to have to jump through all those hoops! In addition, I wanted to have some basic formatting applied to the audio before being uploaded (i.e., normalised, converted to mono and to a low bitrate). I also wanted ID3 tag information (as this is how the website picks up what file you are looking at). Oh, and I wanted, if possible, to have the file uploaded to the website once the processing was complete. “Not much to ask!”, I hear you say.
Well, I accomplished it — using a shell script! Here’s what happens:
- I put the CD into the drive
- I start up my shell script
- It asks me the title of the sermon (for example, “Andy Saville – Daniel 6”) and the name of the file (for example, “20070708-as” — the .mp3 will get added by the script)
- It then rips the CD to hard disk using CD Paranoia. At this point CD tracks are stored separately as .wav files
- Then, Sound eXchange comes along and combines all the .wav files into one, and at the same time I normalise the volume (well, technically this takes two passes, but who’s being picky?)
- Afterwards, the script calls Lame which encodes the MP3 and converts it to mono, as well as applying the ID3 Tag
- Finally, the file is uploaded to the website using the command-line FTP client [Admittedly, this step is a bit hacky — but it works, so I’m not complaining!]
If anyone is curious, I will upload the script 🙂 I will be the first to admit that I am not an expert in shell scripts, but it just goes to show how powerful they are if someone like me (a relative beginner) can manage to save themselves 10-15 minutes of work without too much effort (well, a couple of hours).
(Side note: I would have used Python rather than a shell script, but at the moment I’m still more used to shell scripting – especially for things which involve starting up lots of other processes.)