Home > Computers, Howto, Linux > Burning .aiff files to CD in Ubuntu

Burning .aiff files to CD in Ubuntu

I had a very bad technology day yesterday. If there is such a thing as the opposite of the Midas touch, then I had it in spades. One of my jobs was to create audio CDs from a lot of .aiff files with Russian names. The files were spread down a large directory tree, and every folder represented an individual CD. Normally, this is not a problem. My desktop Windows PC at work has a CD burner, and so this should have been a every easy exercise, correct?

Wrong…on so many counts. For some reason the CD burner has decided to stop functioning altogether – not even as a CD-ROM drive any more. My only other burner is a SATA drive, and my desktop PC doesn’t have a SATA interface or power connectors. So, the easy thing to do would be to transfer the .aiff files via USB stick to my Ubuntu laptop and burn them from there, correct?

Nope. It seems that a special plug-in is required to burn .aiff files in Brasero. Try as I might, I could not find the plugin. Although I could add the files to the project, I always got an error when trying to burn them. I tried other programs, and gstreamer plugins, but all gave the same problem. After consulting the Ubuntu forums it seemed that the only suggestion was to convert the .aiff files to .wav using sox

A quick install of sox and a bit of scripting later, and the I had all of my files converted to wavs for burning to CD, which worked perfectly. I know this isn’t reallty a solution per se, I’d much rather have it working with .aiff files, but if you’re short of time and need to convert a large amount of files, then download my script and try the following:

  • Install Sox, by opening a terminal window and typing:
sudo apt-get install sox
  • Download and extract the script and then type:
chmod +x ./aif2wav
  • Now run the script by typing:
./aif2wav [path to files]

e.g.:

./aif2wav ./audio/Russian
  • If you don’t specify a starting directory, then aif2wav will assume that you want to start in the current directory. It recurses through subdirectories as it goes.

It’s a quick and dirty script, but when I find a more permanent solution, I’ll post it here!

Note: I encourage you to check the contents of any shell script before you execute it. I’m not trying to hide anything or do anything malicious, so if there’s anything you don’t understand or that looks suspicious, then let me know. It might seem like a strange thing to say, but I’m adding this note because I had a few bizarre trolling comments after posting my previous script.

  1. January 20th, 2011 at 20:14 | #1

    thank you !
    your script is awesome and really easy to use :)

    works great :)

  2. November 10th, 2011 at 14:30 | #2

    Googling “brasero aiff” gave me this page as first result, and I’m glad it did. You saved me a lot of trouble.

  3. November 11th, 2011 at 11:10 | #3

    Glad it helped you…thanks for the comment :)

  4. Mike
    November 27th, 2011 at 21:04 | #4

    Thanks very much! Your script worked wonderfully, but my files actually had the extension “aiff.” It was super easy to modify your script to convert these, but maybe consider adding that functionality, i.e., find all files with filename matching regex *\.aiff?

    Thanks again! Worked like a charm.

  5. December 5th, 2011 at 09:14 | #5

    Great stuff…glad it worked for you. Thanks for your comment :)

  6. Pete
    January 23rd, 2012 at 21:43 | #6

    Hi Matt,
    Does what it says on the tin, a big help thank you. Found it was also case sensitive on folder names, but again that’s no big problem.
    Cheers
    Pete

  7. January 23rd, 2012 at 23:02 | #7

    You’re welcome :) probably should have mentioned about the case-sensitive folder names, but documentation never was my strong point :P

  8. May 7th, 2012 at 13:36 | #8

    Matt Rudge :
    documentation never was my strong point

    Says guy who writes sort of documentary in his blog. :D ;) Thumbs up for your stuff (once more).

  9. May 13th, 2012 at 11:25 | #9

    @F-3000 Heh heh…true; however you should see some of my other source code. When I look at it again, even I can’t figure out what I was trying to do!! :D Thanks for the comment!

  1. No trackbacks yet.