ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I recently installed a ALAC decoder for my Apple Lossless audio file's. I'm using it to decode all of my .m4a file's into a .wav format. Then I'm planning on using Lame to encode all of my .wav files into .mp3 file's.
Still with me... ?
Ok, this is extremely redundant executing the .alac script over and over again and entering song name after song name. I haven't even started with the Lame portion of things yet.
I was wondering if someone could help me out with a script (maybe someone's already thought of this) for this task. I was thinking of something along the lines of pointing the script toward an entire directory and using variables for the song names.
I'm having problem's with the song name portion, I'm not good with variables.
#!/bin/bash
if [ -d "$1" ]; then
cd $1
fi
for file in *.m4a; do
base=`basename $file .m4a`
/path/to/alac -f $base.wav $file
lame -h $base.wav $base.mp3
rm $base.wav
done
Thanks for the links, but unfortunately they're no help to me. I don't have a load of numbered files to convert - they all have different names by which they're identified, and they're all in different folders.
The folder hierachy is: ~/iTunes/Artist/Album/Song
Use SoundJuicer or banshee to import CDs to FLAC
SoundJuicer ships with ubuntu...Banshee is available here banshee-project.org/
then use SoundKonverter to convert flac to mp3
it has a gui (its a frontend for many encoders such as LAME)
so you can convert multiple files at once
my assumption is that converting alac to flac then to mp3 will cause some serious quality loss
or just rip to mp3 direct from the cd with sound juicer
a good profile for getting hi quality VBR mp3s out of it is :
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc mode=0 vbr=4 vbr-quality=0 vbr-min-bitrate=192 vbr-max-bitrate=320 ! xingmux ! id3v2mux
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.