For example: "04 And Here We Test Our Powers of Observation.mp3" or "01 Moondance.mp3" or "05 500 Miles.mp3." You can specify as many files as you want on the command-line. It only works if the files are named with the two-digit track number followed by its name. id3tool works fine for labeling the artist, album, year, and genre, but setting the track number and song title can become tedious. I use id3tool to slap together id3 tags before importing them into iTunes because they get lost in my collection otherwise. flac).mp3" else echo >&2 "No such file: "$1"" exit 1 fi doneelse echo >&2 "Usage: "$(basename "$0")" INPUTFILE " exit 1fiNext comes the question of labeling the files. #!/bin/sh# flacmp3 - convert a flac file to mp3#if then for file do if then flac -c -d "$file" | lame -h -m s -b 192 - "$(basename "$file". It outputs the MP3 files to your current directory but the FLAC files needn't be in your current directory. aiff).flac" \ "$file" fi doneelse echo >&2 "Usage: "$(basename "$0")" /path/to/cd" exit 1fiAnd here's the way to get from FLAC to MP3 in one step. aiff).flac" \ "$file" else echo >&2 "No appropriate files exist in directory: "$1"" exit 1 fi done for file in "$1"/\ *.aiff do if then flac \ -endian=little \ -sign=signed \ -channels=2 \ -sample-rate=44100 \ -bps=16 \ -skip=20 \ -output-name="$(basename "$file".
#!/bin/sh# flacit - rip a cd to flac format#if then for file in "$1"/\ *.aiff do if then flac \ -endian=little \ -sign=signed \ -channels=2 \ -sample-rate=44100 \ -bps=16 \ -skip=20 \ -output-name="0$(basename "$file". aiff).mp3" fi doneelse echo >&2 "Usage: "$(basename "$0")" /path/to/cd" exit 1fiThis script does the same thing, but with FLAC. aiff).mp3" else echo >&2 "No appropriate files exist in directory: "$1"" exit 1 fi done for file in "$1"/\ *.aiff do if then lame -h -m s -b 192 "$file" "$(basename "$file". #!/bin/sh# lameit - rip a cd to lame-encoded mp3s#if then for file in "$1"/\ *.aiff do if then lame -h -m s -b 192 "$file" "0$(basename "$file". metaflacRead the rest of the hint for the scripts.Īnd away we go! The first script uses LAME to rip a CD to the current directory.
#CONVERT FLAC TO MP3 MAC COMMAND LINE INSTALL#
I reccomend you install them using fink or put them in your $HOME/bin directory.
What began as a simple hack for batch-encoding CDs and setting ID3 tags turned into a suite of programs aimed at streamlining the handling of MP3 and flac files from the command line. So I set out to accomplish the same task via the command line, which I did.
#CONVERT FLAC TO MP3 MAC COMMAND LINE SOFTWARE#
Despite the genorous comments on MacUpdate and VersionTracker, I found the software inelegent and generally rough around the edges.
I was, however, pretty underwhelmed by the product. When I first encountered the iTunes-LAME Encoder, I was excited about the idea of making the process of ripping CDs to LAME-encoded MP3s easier.