TheWitePony Posted July 24, 2005 Share Posted July 24, 2005 Ok so you've encoded you're ENTIRE iTunes library in Apple's ACC, like me :). But now you want to play those files on you're new Linux box. Problem is .m4a support is sketchy, at least for me it was. I could get the files to play with KPlayer but not with XMMS or amarok, amarok being what I really wanted to use. So I decided I'd just convert them instead of re-encoding them from the discs. WARNING!!: THE FOLLOWING SCRIPT CONVERTS .M4A'S TO .MP3'S. THE PROCESS CONVERTS .M4A'S TO .WAV'S FIRST, WHICH ARE QUITE LARGE(~400MB), SO BE SURE TO HAVE SOME EXTRA SPACE ON YOUR HARD DRIVE SO THE SCRIPT CAN COMPLETE. THE ORIGINAL FILES AS WELL AS THE .WAVS ARE DELETED AT THE END OF THE SCRIPT. IF YOU DON'T WANT THIS TO HAPPEN REMOVE THE APPROPRIATE LINES FROM THE BOTTOM. YOU HAVE BEEN WARNED!!! WARNING!!: THE FOLLOWING CONVERSION PROCESS STRIPS THE FILES OF ANY META-DATA(i.e Artists,Albums) ASSOCIATED WITH THEM. YOU WILL HAVE TO RE-APPLY THE META-DATA WITH SOME OTHER APP. YOU HAVE BEEN WARNED!! NOTE: This HOWTO assumes you have mplayer and lame installed. 1. First of of all make a file for the conversion script and call it whatever you please. Copy the following into that file. I named my allinone.sh #!/bin/bash # # Dump m4a to wav (first step in conversion) for i in *.m4a do mplayer -ao pcm "$i" -aofile "$i.wav" done #!/bin/bash # #Second step... use lame to convert into .mp3 for i in *.wav do lame -h -b 192 "$i" "$i.mp3" done #!/bin/bash # # Remove extrenuous extensions. for i in *.mp3 do x=`echo "$i"|sed -e 's/m4a.wav.mp3/mp3/'` mv "$i" "$x" done rm *.wav rm *.m4a 2. Now give the file execution access with chmod +x allinone.sh 3.Next get your .m4a files you want to convert organized. Mine are still in the directory structure that iTunes has, Artists as root directories with Albums as subdirectories. Or maybe you have all your music in one folder :). Whaterever your case may be cd to the directory that has the files that you want to convert. I recommend doing an album at a time because once an album is done thats when I re-apply my meta-data. Plus doing 1000 songs at once would take forever, not to mention the space taken up by the .wav files. albert@albert-linux ~/albert-drive/music/metallica/black album $ ls 01 enter sandman.m4a 05 wherever i may roam.m4a 09 of wolf and man.m4a 02 sad but true.m4a 06 don't tread on me.m4a 10 the god that failed.m4a 03 holier than thou.m4a 07 through the never.m4a 11 my friend of misery.m4a 04 the unforgiven.m4a 08 nothing else matters.m4a 12 the struggle within.m4a 4. Run the script from the location you saved it with ./allinone.sh 5. Depending on the size/number of files in the directory you run the script on it may take some time to complete. But the result is .mp3's from .m4a's!! 6. Re-apply meta-data if you wish....rinse/repeate/enjoy Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/ Share on other sites More sharing options...
kevcart3 Posted July 25, 2005 Share Posted July 25, 2005 Is there ANY way possible to have it delete the m4a file after each conversion, I say this because I tried this script earlier from linuxquestions.org (or a very similar script), and my hdd was filled up in no time. Thanks. edit: maybe i SHOULD just do one album at a time, but I have 3600 songs to convert from m4a :cry: :cry: :cry: Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586267513 Share on other sites More sharing options...
+Dick Montage Subscriber² Posted July 25, 2005 Subscriber² Share Posted July 25, 2005 A little bit of judicious editing of the above script should suffice? #!/bin/bash # # Dump m4a to wav (first step in conversion) for i in *.m4a do mplayer -ao pcm "$i" -aofile "$i.wav" rm "$i" done #!/bin/bash # #Second step... use lame to convert into .mp3 for i in *.wav do lame -h -b 192 "$i" "$i.mp3" rm $i done #!/bin/bash # # Remove extrenuous extensions. for i in *.mp3 do x=`echo "$i"|sed -e 's/m4a.wav.mp3/mp3/'` mv "$i" "$x" done Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586267528 Share on other sites More sharing options...
Gowcra Posted July 25, 2005 Share Posted July 25, 2005 Great guide mate. Thnx a bunch Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586267544 Share on other sites More sharing options...
kevcart3 Posted July 25, 2005 Share Posted July 25, 2005 njlouch said: A little bit of judicious editing of the above script should suffice? That should work. I'll try it. thanks Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586267552 Share on other sites More sharing options...
TheWitePony Posted July 25, 2005 Author Share Posted July 25, 2005 A side note, I recommed easytag for reapplying tags and changing file names. The interface and the options may seem overwelming at first but just give it a chance. Its a really robust program that allows you to modify a large number of files at once. It also can connect to CDDB to look up tags. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586268480 Share on other sites More sharing options...
kevcart3 Posted July 25, 2005 Share Posted July 25, 2005 TheWitePony said: A side note, I recommed easytag for reapplying tags and changing file names. The interface and the options may seem overwelming at first but just give it a chance. Its a really robust program that allows you to modify a large number of files at once. It also can connect to CDDB to look up tags. 586268480[/snapback] I installed it yesterday just for changing all my id3 tags, very cool program. :D Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586268738 Share on other sites More sharing options...
TheWitePony Posted July 25, 2005 Author Share Posted July 25, 2005 kevcart3 said: I installed it yesterday just for changing all my id3 tags, very cool program. :D 586268738[/snapback] Yes it is. Though it took me at least 30-45 minutes to figure out how to use it :). Before that I was ready to rip out my hair getting it to do what I wanted. But once I figured it out it made the conversion process move quite quickly. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586269017 Share on other sites More sharing options...
ryanstein Posted August 23, 2005 Share Posted August 23, 2005 Wouldn't it be easier to just install iTunes in WINE or similar application (Cedega...etc.)? Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586417872 Share on other sites More sharing options...
futb0l Posted October 9, 2005 Share Posted October 9, 2005 iTunes in Wine/Crossover Office is very slow, I wouldn't recommend it. Does anyone know a program that can organize the music library the way iTunes does in Linux? Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586644893 Share on other sites More sharing options...
Rockett15 Posted October 30, 2005 Share Posted October 30, 2005 :) Amarok would do that very well :) http://amarok.kde.org/ Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-586746235 Share on other sites More sharing options...
The_Decryptor Veteran Posted January 12, 2006 Veteran Share Posted January 12, 2006 Wouldn't the whole "converting m4a to wav, then compressing it to mp3" lower the quality alot? (if it doesn't though, tell me.) Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587054926 Share on other sites More sharing options...
Paul Posted January 14, 2006 Share Posted January 14, 2006 Good guide! Just what I needed! Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587061836 Share on other sites More sharing options...
phild_99 Posted February 11, 2006 Share Posted February 11, 2006 This is possibly the worst solution for this problem. It's time consuming, lowers the quality of your music files (transcoding of any type will always lower the quality), and it's completely unneccessary. I've been playing aac files in linux (using xmms) for years now (i.e. pre iTunes) using faad2 and libmp4. They are easily obtained in many distributions using the package management tools - whether it be rpm or deb based (I don't know if other packaging systems have them available). Other sources such as the rarewares website or the penguin liberation front (plf) may be of use. Of course, nothing in this post (or parent's) addreses DRM'ed music bought from the iTunes store. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587184739 Share on other sites More sharing options...
betamaxman Posted March 12, 2006 Share Posted March 12, 2006 futb0l said: iTunes in Wine/Crossover Office is very slow, I wouldn't recommend it. Does anyone know a program that can organize the music library the way iTunes does in Linux? I find JUK to be very much like itunes, and Amarok similar to Musicmatch. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587298851 Share on other sites More sharing options...
pdog Posted March 13, 2006 Share Posted March 13, 2006 i wish i could get all of my bought songs to regular mp3 or aac format, with fairplay removed. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587300706 Share on other sites More sharing options...
kingpunk Posted March 13, 2006 Share Posted March 13, 2006 betamaxman said: I find JUK to be very much like itunes, and Amarok similar to Musicmatch. GTKPod has all of those beat, hands down. heck, if you even use the .99.x builds.. it even has video support to sync up with your ipod video. and its rock solid. ..suprisingly. lol. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587300771 Share on other sites More sharing options...
fader Posted April 10, 2006 Share Posted April 10, 2006 I had this problem recently and went through various converters trying to convert from m4a to mp3, until I found the perfect one, which also keeps all tags right. http://www.dbpoweramp.com/ It's a freeware. You need to download it, then install the mp3 codec or plugin whatever it is. I converted about 2000 m4a's using this. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587400971 Share on other sites More sharing options...
The_Decryptor Veteran Posted April 10, 2006 Veteran Share Posted April 10, 2006 Honestly, i wouldn't convert AAC files to MP3, you loose quality. there is nothing wrong with AAC files, they are better quality than MP3 files are (designed to replace MP3), and they are also a open specification (AAC is MPEG-2 Part 7 and the newer version is MPEG-4 Part 3), same as MP3 (MPEG-1 Audio Layer 3), so it's not like they are a closed spec controlled by one company. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-587401934 Share on other sites More sharing options...
nobodysbusiness Posted January 17, 2008 Share Posted January 17, 2008 dbpoweramp is definitely a great program. I've used it before to do some big conversions. The only problem is that it's Windows only. For future reference, if you don't have a Windows box available, I wrote a little program to convert M4A files to MP3 files, keeping the artist, album, song name and track number tags. It's available here. Link to comment https://www.neowin.net/forum/topic/348354-how-to-migrate-your-itunes-library-to-linux/#findComment-589141336 Share on other sites More sharing options...
Recommended Posts