.FLAC to .AAC, Easiest way to do this? |
![]() ![]() |
.FLAC to .AAC, Easiest way to do this? |
Sep 4 2004, 04:57
Post
#1
|
|
|
Group: Members Posts: 20 Joined: 7-August 04 Member No.: 16078 |
I have ripped my CD collection into perfect quality .flac files and want to convert osme selections of music to AAC for my iPod. Is there a simple way to do this? What program should I use?
|
|
|
|
Sep 4 2004, 05:16
Post
#2
|
|
|
A/V Moderator Group: Members Posts: 841 Joined: 9-June 03 From: Brisbane, AUS Member No.: 7078 |
You could use foobar2000 to do this. You would also require a AAC codec. Nero or FAAC could do it. I think there's even a way to use the iTunes codec with foobar, but I use Nero so it doesn't worry me.
-------------------- www.sessions.com.au - Sessions Entertainment
|
|
|
|
Sep 4 2004, 05:39
Post
#3
|
|
|
Group: Members Posts: 20 Joined: 7-August 04 Member No.: 16078 |
QUOTE (kl33per @ Sep 3 2004, 10:16 PM) You could use foobar2000 to do this. You would also require a AAC codec. Nero or FAAC could do it. I think there's even a way to use the iTunes codec with foobar, but I use Nero so it doesn't worry me. I have tried Nero but the problem is when I try to play back the files in iTunes all of the tags are missing. |
|
|
|
Sep 4 2004, 06:48
Post
#4
|
|
![]() Group: Members Posts: 144 Joined: 7-April 04 From: Florida Member No.: 13283 |
If you want to use iTunes to ensure compatibility with your iPod, Otto42 has written a very nice tool which allows us to use iTunes to encode from command line, EAC, Foobar, etc. He has it available here: http://otto.homedns.org:8888/iTunes/iTunesEncode.zip
It comes with a text file containing usage options, or you can read the posts: http://www.hydrogenaudio.org/forums/index....showtopic=22391 Anyway, for your project, I think using this tool with Foobar would be your best option. I have tried it myself and was satisfied. -------------------- "The way we see our world is better than yours."
|
|
|
|
Sep 4 2004, 08:02
Post
#5
|
|
![]() Nero MPEG4 developer Group: Developer (Donating) Posts: 1218 Joined: 11-October 01 From: LA Member No.: 267 |
QUOTE (mikehartl @ Sep 4 2004, 05:39 AM) QUOTE (kl33per @ Sep 3 2004, 10:16 PM) You could use foobar2000 to do this. You would also require a AAC codec. Nero or FAAC could do it. I think there's even a way to use the iTunes codec with foobar, but I use Nero so it doesn't worry me. I have tried Nero but the problem is when I try to play back the files in iTunes all of the tags are missing. Rename the .mp4's to .m4a Menno |
|
|
|
Sep 7 2004, 03:34
Post
#6
|
|
![]() Group: Members Posts: 110 Joined: 31-December 03 Member No.: 10840 |
To convert from FLAC to Apple's *.aac you just install dbpowerAmp Music Converter (+ the FLAC and WMA 9 encoder!). Convert any FLAC-files to WMA lossless (e.g. Right-Mouse-Button).
Just Drag-and-Drop your WMA files into iTunes after you choose your favourite bitrate ... |
|
|
|
Sep 7 2004, 20:54
Post
#7
|
|
|
Group: Members Posts: 24 Joined: 9-June 04 Member No.: 14565 |
QUOTE (mikehartl @ Sep 3 2004, 07:57 PM) I have ripped my CD collection into perfect quality .flac files and want to convert osme selections of music to AAC for my iPod. Is there a simple way to do this? What program should I use? I have written a few batch scripts to convert all my flac files to m4a (aac), mp3, mpc, or ogg. Here are the steps and code to set it up. Assumptions: - All .flac files are in the same directory, not in subdirectories. (Example C:\music\song.flac) - All .flac files are properly tagged. 1. In your .flac file directory (see example above) make a "convert" directory (ie. C:\music\convert). 2. In this "convert" directory, make an "aac", "mp3", and "flac" directory (ie. C:\music\convert\aac & C:\music\convert\flac). 3. Copy itunesencode.exe, faac.exe, naacenc.exe, and tg.exe into the "aac" directory (from www.rarewares.org) 4. Copy flac.exe and metaflac.exe into the "flac" directory. Copy lame.exe into the "mp3" directory. 5. Create a file called "encode.cmd" in the "convert" directory. 6. Use notepad to open the file and copy and paste the code below into the file. Save. encode.cmd CODE @ECHO OFF rem :Check to see if path exists, if not create and encode. if exist ..\%ext% ( echo. ) else ( mkdir ..\%ext% ) rem :Grab the tag data from the .flac file and store it in temp.txt for now. flac\metaflac --show-vc-field=artist %1 > temp.txt flac\metaflac --show-vc-field=title %1 >> temp.txt flac\metaflac --show-vc-field=album %1 >> temp.txt flac\metaflac --show-vc-field=date %1 >> temp.txt flac\metaflac --show-vc-field=tracknumber %1 >> temp.txt flac\metaflac --show-vc-field=genre %1 >> temp.txt rem :Turn the tags into var's for later use. for /F "tokens=1,2 delims==" %%i in (temp.txt) do set %%i=%%j rem :Now delete the temp file. del temp.txt rem :If the track number is 9 or less, lets add a 0 in front for formatting. if %tracknumber%==1 set tracknumber=0%tracknumber% if %tracknumber%==2 set tracknumber=0%tracknumber% if %tracknumber%==3 set tracknumber=0%tracknumber% if %tracknumber%==4 set tracknumber=0%tracknumber% if %tracknumber%==5 set tracknumber=0%tracknumber% if %tracknumber%==6 set tracknumber=0%tracknumber% if %tracknumber%==7 set tracknumber=0%tracknumber% if %tracknumber%==8 set tracknumber=0%tracknumber% if %tracknumber%==9 set tracknumber=0%tracknumber% rem :Check the file type and goto proper encoder. if %ext% EQU mp3 goto MP3 if %ext% EQU mpc goto MPC if %ext% EQU ogg goto OGG if %ext% EQU aac goto AAC if %ext% EQU m4a goto AAC else echo Unknown Format: %ext% pause goto END :MP3 rem :Encode and tag the new file. if %program%==lame ( for %%I in (%1) do flac\flac -d -c %%I | mp3\lame - --preset extreme --id3v2-only --pad-id3v2 --ta "%artist%" --tt "%title%" --tl "%album%" --ty "%date%" --tn "%tracknumber%" --tg "%genre%" "..\%ext%\%%~nI.%ext%" goto END ) else if %program%==itunes ( for %%I in (%1) do flac\flac -d %%I for %%I in (%1) do aac\iTunesEncode -a "%artist%" -t "%title%" -l "%album%" -y "%date%" -n "%tracknumber%" -g "%genre%" -d -e "MP3 Encoder" -i "..\%%~nI.wav" -o "..\%ext%\%%~nI.%ext%" for %%I in (%1) do del "..\%%~nI.wav" goto END ) else ( echo Unknown Encoder: %program% pause goto END ) :MPC rem :Encode and tag the new file. for %%I in (%1) do flac\flac -d -c %%I | mpc\mppenc --quality 6 --xlevel --artist "%artist%" --title "%title%" --album "%album%" --year "%date%" --track "%tracknumber%" --genre "%genre%" - "..\%ext%\%%~nI.%ext%" goto END :OGG rem :Encode and tag the new file. for %%I in (%1) do flac\flac -d -c %%I | ogg\oggenc -q 7 -a "%artist%" -t "%title%" -l "%album%" -d "%date%" -N "%tracknumber%" -G "%genre%" -o "..\%ext%\%%~nI.%ext%" - goto END :AAC rem :Encode and tag the new file. if %program%==nero ( for %%I in (%1) do flac\flac -d %%I for %%I in (%1) do aac\naacenc -extreme -qh "..\%%~nI.wav" "..\%ext%\%%~nI.%ext%" for %%I in (%1) do aac\tg "..\%ext%\%%~nI.%ext%" --artist "%artist%" --album "%album%" --track "%tracknumber%" --title "%title%" --genre "%genre%" --year "%date%" for %%I in (%1) do del "..\%%~nI.wav" goto END ) else if %program%==itunes ( for %%I in (%1) do flac\flac -d %%I for %%I in (%1) do aac\iTunesEncode -a "%artist%" -t "%title%" -l "%album%" -y "%date%" -n "%tracknumber%" -g "%genre%" -d -e "AAC Encoder" -i "..\%%~nI.wav" -o "..\%ext%\%%~nI.%ext%" for %%I in (%1) do del "..\%%~nI.wav" goto END ) else if %program%==faac ( for %%I in (%1) do flac\flac -d -c %%I | aac\faac -q 150 -w --artist "%artist%" --title "%title%" --album "%album%" --year "%date%" --track "%tracknumber%" --genre "%genre%" -o "..\%ext%\%%~nI.%ext%" - goto END ) else ( echo Unknown Encoder: %program% pause goto END ) :END rem :All done with the var's, lets purge. set artist= set title= set album= set date= set tracknumber= set genre= 7. Create a file called "flac-m4a.cmd" in the "covert" directory. 8. Use notepad to open the file and copy and paste the code below into the file. Save. flac-m4a.cmd CODE @ECHO OFF rem :What program do you want to use to encode? rem :Choices are case sensitive: nero | itunes | faac set program=nero rem :Set the file extension and directory path. set ext=m4a for %%I in (..\*.flac) do encode.cmd "%%I" rem :Purge the vars. set ext= set program= for mp3 conversion flac-mp3.cmd CODE @ECHO OFF rem :What program do you want to use to encode? rem :Choices are case sensitive: lame | itunes set program=lame rem :Set the file extension and directory path. set ext=mp3 for %%I in (..\*.flac) do encode.cmd "%%I" rem :Purge the vars. set program= set ext= 9. Now just double click on the flac-m4a.cmd file and the batch conversion will begin. The directory structure should look like this: CODE C:\-- \Music\-- \convert\----- Song1.flac | Song2.flac | Song3.flac | \aac\-------- iTunesEncode.exe, faac.exe, naacenc.exe, tg.exe \mp3\------- lame.exe \flac\------- flac.exe, metaflac.exe encode.cmd flac-m4a.cmd flac-mp3.cmd If anyone would like the batch script code for mp3, ogg, or mpc just let me know. Once I get all the bugs worked out, I'll zip (or rar) it up and thought it out there for download somewhere. Edit: Revised code and instructions to add use of iTunes encoder via iTunesEncode.exe Edit: Revised code and instructions to add mp3 encoder This post has been edited by anticrust: Sep 13 2004, 23:49 |
|
|
|
Sep 7 2004, 21:36
Post
#8
|
|
![]() Group: Members Posts: 316 Joined: 27-April 03 Member No.: 6228 |
QUOTE (anticrust @ Sep 7 2004, 08:54 PM) 3. Copy faac.exe, naacenc.exe, and tg.exe into the "aac" directory (from www.rarewares.org) Using foobar with iTunesEncode is much easier than a huge mess of batch files. I am unconvinced about the quality of faac 1.24. At least on my music the Apple encoder in the latest version of Quicktime/iTunes is streets ahead of it. Specifically: 1) faac appears to produce distortion on certain vocal frequences (see my post in AAC-Tech) 2) faac appears to produces a "metalic sheen" on strings which isn't present using the apple encoder. It's a real pitty that the Apple AAC encoder isn't generally availible via the Quicktime API on Windows but I guess that would have cost Apple too much in license fees. I ripped all my music to flac using EAC then cross coded to aac for my iPod using foobar and faac. At some point I'll have to junk the faac encoded files and re-encode it all using iTunesEncode. |
|
|
|
Sep 7 2004, 21:41
Post
#9
|
|
![]() Group: Members Posts: 316 Joined: 27-April 03 Member No.: 6228 |
QUOTE (mikehartl @ Sep 4 2004, 05:39 AM) I have tried Nero but the problem is when I try to play back the files in iTunes all of the tags are missing. Foobar knows about how to extract tags from flac files and add them to AAC files after they have been encoded. Go to Preferences->Components->Diskwriter Then click the edit button for your output preset. Change tthe "Tag" drop down box from "none" to "default". |
|
|
|
Sep 7 2004, 21:49
Post
#10
|
|
![]() Server Admin Group: Admin Posts: 4810 Joined: 24-September 01 Member No.: 13 |
QUOTE (chelgrian @ Sep 7 2004, 10:36 PM) QUOTE (anticrust @ Sep 7 2004, 08:54 PM) 3. Copy faac.exe, naacenc.exe, and tg.exe into the "aac" directory (from www.rarewares.org) Using foobar with iTunesEncode is much easier than a huge mess of batch files. I would bet that using foobar with Nero AAC or FAAC is still easier than using it with iTunesEncode |
|
|
|
Sep 7 2004, 22:14
Post
#11
|
|
|
Group: Members Posts: 24 Joined: 9-June 04 Member No.: 14565 |
QUOTE (chelgrian @ Sep 7 2004, 12:36 PM) Using foobar with iTunesEncode is much easier than a huge mess of batch files. I am unconvinced about the quality of faac 1.24. At least on my music the Apple encoder in the latest version of Quicktime/iTunes is streets ahead of it. As are most things in life, the word "easier" is relative to the user. If the user is unfamiliar/uncomfortable with batch files, then this may not be the "easier" method for them. Although I can't see how double clicking on a single batch file can be perceived as difficult. I would prefer to have the same executables that created my flac files extract, tag, and encode my new files. This method is versatile in the sense that you could use faac.exe, Nero via naacenc.exe, or someday iTunes (if Apple allows). If a new version of an encoder comes out, I just replace the .exe in the appropriate directory and double click. "Easy" as pie. Also, my earlier message is not an endorsement of faac, even though the code is offered as an alternative to those who do not own or have Nero installed. I prefer Nero's encoder personally. Edit: Edited earlier post to include encoding with iTunes. It's all about choice. This post has been edited by anticrust: Sep 8 2004, 00:59 |
|
|
|
Sep 8 2004, 20:43
Post
#12
|
|
![]() Group: Members Posts: 316 Joined: 27-April 03 Member No.: 6228 |
QUOTE (Garf @ Sep 7 2004, 09:49 PM) I would bet that using foobar with Nero AAC or FAAC is still easier than using it with iTunesEncode And you'd be right. Although it's only really the difference between using one of the preset encoders or defining your own commandline encoder in foobar. The other problem is that you can only run one encoding job at once although for the vast majority of people who don't have dual processor machines on their desktop this is not a problem. |
|
|
|
Sep 9 2004, 00:44
Post
#13
|
|
![]() Group: Members Posts: 383 Joined: 31-March 03 From: Seattle, WA Member No.: 5771 |
QUOTE (henkersmahlzeit @ Sep 6 2004, 07:34 PM) To convert from FLAC to Apple's *.aac you just install dbpowerAmp Music Converter (+ the FLAC and WMA 9 encoder!). Convert any FLAC-files to WMA lossless (e.g. Right-Mouse-Button). Just Drag-and-Drop your WMA files into iTunes after you choose your favourite bitrate ... Why go to wma? Just go directly to aac. It will even keep the tags for you. Get the app here: dBpowerAMP Music Converter Get the flac component here: Codec Central - FLAC Get the Quicktime component and aac component here: Codec Central - Mp4 & AAC Details (You will need both the QuickTime m4a Encoder and the Mp4 & AAC decoder.) Just read the instructions that come with the QuickTime Encoder and transcode away! |
|
|
|
Nov 23 2004, 20:52
Post
#14
|
|
|
Group: Members Posts: 120 Joined: 25-May 02 Member No.: 2116 |
I'm in this situation too, thanks for the info guys.
Quite why apple don't either add input support for more major formats (especially free formats like flac, which won't cost them a dime), or allow people to write 3rd-party plugins is beyond me... |
|
|
|
Nov 23 2004, 21:15
Post
#15
|
|
![]() Group: Members Posts: 1394 Joined: 20-December 01 From: seattle Member No.: 693 |
for the linux searchers, convert using:
flac -dc filename.flac | faac - -o filename.mp4 -------------------- RareWares/Debian :: http://www.rarewares.org/debian.html
|
|
|
|
Feb 8 2005, 15:48
Post
#16
|
|
![]() Group: Members Posts: 302 Joined: 18-June 03 From: Europe/Germ./MA Member No.: 7255 |
|
|
|
|
Aug 2 2005, 04:01
Post
#17
|
|
|
Group: Members Posts: 9 Joined: 14-May 05 Member No.: 22046 |
I worked on these batch files a little, and incorporated them into an installer that writes registry entries, check it out:
FLAC Transcoder feedback is welcome, as always |
|
|
|
Oct 6 2006, 10:14
Post
#18
|
|
|
Group: Members Posts: 7 Joined: 21-January 04 Member No.: 11404 |
hi,
sorry i'm not too great with batch files can you tell me what each batch file does? basically i want one batch file that will turn one .flac file into 1 lossy file (including tagging) is that what the encode.cmd does? if so what are the parameters i need to feed it with? |
|
|
|
Oct 6 2006, 10:58
Post
#19
|
|
|
Group: Members Posts: 7 Joined: 21-January 04 Member No.: 11404 |
also what does the following bit of code doing in encode.cmd
"for %%I in (%1)" i can see int he other batch fuiles that is used for working on each file in the directory, but in encode, isn't %1 just one file? |
|
|
|
Oct 18 2006, 21:57
Post
#20
|
|
|
Group: Members Posts: 7 Joined: 21-January 04 Member No.: 11404 |
okay, i've blatantly had far too much time on my hands, so i ended up developign a vb.net app that goes through a root directory picking out all the files and recreates the fiel structure in a destination directory.
it can then transcode the flac files detected into the destination directories using whatever command line program / batch file you've got. the next time you run it, it compares the file list against the last run to find new / modified / deleted files and performs differing actions against some of them, long story short... i now have a way of 'synching' (1-way) my .flac library with my .m4a library freely available to anyone who wants it with source code if people want to mod it. it's probably a little more untested than i'd like at the moment, but i've just got it going through my 10000 flac file library at the moment... |
|
|
|
Oct 18 2006, 23:56
Post
#21
|
|
|
Group: Members (Donating) Posts: 612 Joined: 31-May 06 Member No.: 31326 |
Cool, I'd love to play with it!
-brendan -------------------- Hacking CD Robots & Autoloaders: http://hyperdiscs.pbwiki.com/
|
|
|
|
Apr 5 2008, 17:08
Post
#22
|
|
|
Group: Members Posts: 18 Joined: 15-April 05 Member No.: 21463 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th June 2013 - 02:51 |