Mass-convert ALAC to OGG with an AppleScript?

Discussion in 'Mac Programming' started by wrldwzrd89, Mar 27, 2011.

  1. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #1
    There's gotta be some sort of newer solution than OggDrop for this purpose, or if there isn't, surely an AppleScript can be created to automate this task. I have the Ogg components for QuickTime installed, as well as QuickTime 7 Pro. I've tested the export function in QuickTime also, which works perfectly - creating a nice Ogg Vorbis file. Surely there's a way to automate a mass-convert job of over 12,000 files using this approach... Google searches have proved fruitless.
     
  2. sero macrumors member

    Joined:
    Aug 28, 2008
    #2
    You could script this with ffmpeg. If you have that installed you can just run a simple script like this (assuming all m4a are in one dir, otherwise I'd just make symlinks in one dir)

    Code:
    for fn in *.m4a; do
    	echo "converting $fn"
    	songName=$(echo "$fn"|rev|cut -c5-|rev|sed s/\ /_/g)
    	ffmpeg -i "$fn" ${songName}.ogg 
    done
     
  3. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #3
    Can't you just use iTunes to do this? Change preferences to use Ogg for importing music, then select everything and convert to Ogg. Or doesn't that work?
     
  4. wrldwzrd89 thread starter macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #4
    Alas, iTunes doesn't detect the Ogg plugin and won't give Ogg as an option. The method posted above, however, should work. I will give that a try.
     
  5. monsieurpaul macrumors regular

    Joined:
    Oct 8, 2009
    #5
    Have you tried Max?

    I used it (among others things) to transcode FLAC files in AAC. It is a good ripper too.
     

Share This Page