Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Converting FLAC to ALAC using Foobar (Read 66654 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converting FLAC to ALAC using Foobar

Using Win XP Pro SP3 and Foobar 1.0.3

After some research, I learned that Foobar is capable of converting FLAC files to Apple's lossless format, ALAC, so .....

I downloaded foo_input_alac.dll to the Foobar Components folder. In the Output format list of the Converter Setup window, neither ALAC nor ALE nor m4a appear.

Either I misunderstood what I read or Apple lossless is represented in another way.

Any ideas?

Thanks for your help.
EdP

Converting FLAC to ALAC using Foobar

Reply #1
The foo_input_alac component only allows foobar2000 to decode ALAC files (hence the "input" part of its name). To convert files to ALAC using foobar2000, you need an ALAC command line encoder and set up a custom converter preset.

Converting FLAC to ALAC using Foobar

Reply #2
...
I downloaded foo_input_alac.dll to the Foobar Components folder. In the Output format list of the Converter Setup window, neither ALAC nor ALE nor m4a appear.
...


You need an ALAC encoder. foo_input_alac is a decoder.

AFAIK the only non-apple encoder is part of ffmpeg. Furthermore, you'd have to use custom settings to get it to work. It wouldn't show up on the list.

[edit]Here's how to do it, since the site that had that tutorial isn't around anymore.
elevatorladylevitateme

Converting FLAC to ALAC using Foobar

Reply #3
Or you can take: qaac (uses Quicktime or QT Lite ALAC)
How to use in foobar2000: http://foobar-users.de/index.php?topic=188...g11377#msg11377 (in German)

Converting FLAC to ALAC using Foobar

Reply #4
Or you can use CUETools.ALACEnc.exe from CUETools (based on ffmpeg code, slower, but compresses a bit better).

Converting FLAC to ALAC using Foobar

Reply #5
Thanks for the quick replies.

EdP

Converting FLAC to ALAC using Foobar

Reply #6
2. You'll need the following Command-Line Encoder; QAAC
http://sites.google.com/site/qaacpage/cabinet
You want the TOP zip folder
Extract it to a plac that's easy to find.

3. Copy the address ( for example C:\Users\ASSFACE\Enc0d3rz\qaac_0.18_2\qaac_0.18_2\qaac.exe)

4. (Most of you will probably have this enabled, but just to cover the bases lolz)
    In foobar, go to PREFERENCES > CONTEXT MENU, and on the RIGHT SIDE, you will check the box for    CONVERT, then exit that menu.


5. Right-Click any one of the songs you wanna convert. JUST ONE, though.
        Select CONVERT.
        In the dialog box, select "..."

6. For OUTPUT FORMAT
   A. ADD NEW, then pull down the option to CUSTOM
   B. for ENCODER, press CTRL + V to paste the address of QAAC
   C. EXTENTION is m4a
   D. PARAMETERS
      For Apple Lossless, enter
      -A -o %d -
   E. BIT DEPTH CONTROL change these options to LOSSLESS and 24
   F. ENCODER NAME is QuickTimeAAC
   G. BITRATE (kbps) is                        (BLANK)
   H. SETTING is ALAC

7. For DESTINATION
   A. Output Path This one's entirely up to you. I use SPECIFY FOLDER, then something like this: 
      C:\Users\ASSFACE\Music\999\03 - AAC CONVERSIONS
      (I keep a shortcut to 999 on my desktop for easy access.)
   B. Output Style and file name formatting
      I do this:
      %album artist%/['['%date%']' ]%album%/ %track% - %title%
      Which yields, something like this
   C:\Users\ASSFACE\Music\999\03 - AAC CONVERSIONS\Joe Satriani\[1987] Surfing with the Alien (Remastered)\01 - Surfing With the Alien.m4a
   
8. For PROCESSING
   A. TURN THAT SHIT OFF!

9. For OTHER
   A. I set it to do nothing when finished.
10. SAVE Save your preset so you don't have to do this bullshit again.

CONGRATULATIONS! You now can use FOOBAR200 to tag and convert FLAC to ALAC!!!! Your iPod will thank you

Converting FLAC to ALAC using Foobar

Reply #7
CONGRATULATIONS! You now can use FOOBAR200 to tag and convert FLAC to ALAC!!!! Your iPod will thank you


Great!! -cheers dude it works a treat. One last question to polish the thread off:

Is it possible to use foobar to transfer embedded album art across to the FAAC encoder during this process? Or even possible to use foobar to embed album art?

If not I guess at that point you'll be better off just usinf Itunes to add cover art from now on as it will embed the art itself.

Converting FLAC to ALAC using Foobar

Reply #8
@kgad0831

Hi
I ´ve read your instrucctions but I get the following

1 out of 1 tracks converted with major problems.

Source: "C:\data\Music\La Reverdie\Speculum amoris\01-Anonymous - Laude novella sia cantata.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code -1073741515 (0xC0000135); please re-check parameters) : "C:\Users\MAPOTECA\Desktop\Test\01-Anonymous - Laude novella sia cantata.m4a"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 16bps
  Command line: "C:\Users\MAPOTECA\Downloads\qaac_0.25\qaac_0.25\qaac.exe" -A -o "01-Anonymous - Laude novella sia cantata.m4a" -
  Working folder: C:\Users\MAPOTECA\Desktop\Test\
 
  Conversion failed: The encoder has terminated prematurely with code -1073741515 (0xC0000135); please re-check parameters

I wonder What I am doing wrong. The encoder parameters are:

-A -o %d -

I get the error in a xp and win 7 machine using foobar 1.1

Thanks before hand

Antropoid

Converting FLAC to ALAC using Foobar

Reply #9
Turning processing off may not be a good idea at the moment, since the ALAC decoder doesn't support that on playback, and most other ALAC capable players are unlikely to support that stuff either.

Converting FLAC to ALAC using Foobar

Reply #10
@ Pensive
I use MP3TAG to embed artwork. I just google the album name and look for a jpg looks decent

Converting FLAC to ALAC using Foobar

Reply #11
Or you can use CUETools.ALACEnc.exe from CUETools (based on ffmpeg code, slower, but compresses a bit better).

What's the correct command line to achieve this? What files are needed to do this? ALACEnc crashes while trying to do it with CUETools.ALACEnc.exe, ...config and CUETools.Codecs.ALAC.dll in the same directory.

Converting FLAC to ALAC using Foobar

Reply #12
Incidentally guys, for those of you who are struggling with using foobar, I had to give up with QAAC.

With dual core's operating it crashed all the time, and with one core, the encoding was seriously taking forever, and I still got a crash or two (which is a pain when they occur 30 minutes after you fall asleep, and you were hoping to have most of the transcode done by morning).

For those who are interested, I have detailed my Foobar / MP3 Tag  FLAC > ALAC workflow here:
http://www.jonnypayne.com/index.php/musing...ital-rebellion/

thanks to kgad0831 for the MP3tag tip.

I ended up paying for DBPowerAmp R14 full licence and I'm glad I did. Not only is its apple lossless encoder more than twice as fast (with automatic binary compare enabled!), it automatically embeds art in the ALAC if it was in the FLAC already, for example. It's dead stable (never crashed yet in about 24 hours of transcoding, dual cores)

Another huge benefit - when you rip with DBPowerAmp it will automatically find the artwork, and tags, and securely rip your CDs direct into ALAC w/ embedded art and proper tags and filenames. I removed a lot of foobar-steps from my CD-rip workflow too (in fact, all of them).

It's not free, and its not open source, but if your time is precious (as mine is) it's probably worth paying for. Once QAAC is stable with multiple cores, it'll be a slightly different story though....it'll just be weighing up speed and ease of use vs money.

Not what people want to hear in the foobar support forum, I'm sure, but I'm such a happy customer It's only fair to say.

ps. No affiliation, just chuffed with my purchase.


Converting FLAC to ALAC using Foobar

Reply #13
I think I recall that FFMPEG also supports ALAC encoding, and that would support multi-thread encoding as well, since each command line encoder process is separate from any other.

Converting FLAC to ALAC using Foobar

Reply #14
I just switched to Windows 7 and am having the same problem.
1st time anyone will hear this, ever: I SWEAR IT WORKED BETTER WITH VISTA!

Converting FLAC to ALAC using Foobar

Reply #15
Ok, HERE's the issue.
"qaac also requires MSVC7.1's C/C++ runtime DLLs (msvcr71.dll and msvcp71.dll). They are usually installed under Windows system32 directory, but if they are not in your PC, you have to get them from somewhere."


Here's that Somewhere.

msvcp71.dll

msvcr71.dll



I put mine in the c:\windows\SysWOW64 directory, but you may be able just to put it in teh directory you put qaac in.

Converting FLAC to ALAC using Foobar

Reply #16
What's the correct command line to achieve this? What files are needed to do this? ALACEnc crashes while trying to do it with CUETools.ALACEnc.exe, ...config and CUETools.Codecs.ALAC.dll in the same directory.

You need 3 files: CUETools.ALACEnc.exe, CUETools.Codecs.dll and CUETools.Codecs.ALAC.dll.
Parameters: "-5 --quiet - -o %d".
Highest BPS mode supported: 16.

Converting FLAC to ALAC using Foobar

Reply #17
In order to succeed in foobar with kgad0831 instructions you must have installed quick time....I Tried in Xp, Vista and w7-32bits and the instructions work. One cautionary tale, though, after install/reinstall quick time in win 7 I had to reboot the system (I did it in two different machines) and after that IT does really work!!!

Converting FLAC to ALAC using Foobar

Reply #18
1. Download & Install
   A. Foobar:
   http://www.foobar2000.org/download

   B. QAAC
   http://sites.google.com/site/qaacpage/cabinet
      You want the TOP zip folder
      Extract it to a plac that's easy to find.
      Copy the address  ( for example C:\Users\ASSFACE\foobar components\qaac_0.18_2\qaac_0.18_2\qaac.exe)
   
   C. Get these 2 DLL files if you don't already have them
   http://www.dlldll.com/msvcp71.dll_download.html
   http://www.dlldll.com/msvcr71.dll_download.html
   I put them in my 'c:\windows\syswow64' folder, but you may get away with putting them in the qaac folder.
   D. MAKE SURE YOU HAVE QUICKTIME INSTALLED ON YOUR SYSTEM! The free version is sufficient.

3. Once you get foobar installed, go to PREFERENCES > CONTEXT MENU, and on the RIGHT SIDE, you will check the box for CONVERT

4. Right-Click any one of the songs you wanna convert. JUST ONE, tho. Select CONVERT.

5. In the dialog box, select "..."

6. For OUTPUT FORMAT
   A. ADD NEW, then pull down the option to CUSTOM
   B. for ENCODER, press CTRL + V to paste the address of QAAC
   C. EXTENTION is m4a
   D. PARAMETERS
      1. for Unconstrained VBR at about 300kbps-350kbps, enter this
      -V 127 --quality 2 -o %d -
        The 127 adjusts bitrate. Changing it to 59 will yield about 128kbps
      2. For Apple Lossless, enter
      -A -o %d -
   E. BIT DEPTH CONTROL] change these options to LOSSY if AAC, or LOSSLESS if ALAC       and 24
   F. ENCODER NAME is QuickTimeAAC
   G. BITRATE (kbps) is 320; for ALAC, just leave it blank.
   H. SETTING is True VBR Quality 127(or whatever you choose); or ALAC
7. For DESTINATION
   A. Output Path This one's entirely up to you. I use SPECIFY FOLDER, then something like this: 
      C:\Users\ASSFACE\Music\999\03 - AAC CONVERSIONS
      (I keep a shortcut to 999 on my desktop for easy access.)
   B. Output Style and file name formatting
      I do this:
      %album artist%/['['%date%']']%album%/[%discnumber%-]%track% - %title%
      Which yields, something like this
   C:\Users\ASSFACE\Music\999\03 - AAC CONVERSIONS\Joe Satriani\[1987] Surfing with the Alien (Remastered)\1-01 - Surfing With the Alien.m4a
   
8. For PROCESSING
   A. TURN THAT SHIT OFF!

9. For OTHER
   A. I set it to do nothing when finished.   
10. SAVE Save your preset so you don't have to do this bullshit again.

CONGRATULATIONS! You now can use FOOBAR200 to tag and convert FLAC to AAC and ALAC!!!! Your iPod will thank you

Converting FLAC to ALAC using Foobar

Reply #19
Quote
2. For Apple Lossless, enter
-A -o %d -

I prefer --no-optimize --alac --silent --ignorelength - -o %d


Converting FLAC to ALAC using Foobar

Reply #21
--no-optimize --alac --silent --ignorelength - -o %d

what does no optimize and ignorelength mean?

Converting FLAC to ALAC using Foobar

Reply #22
I can guess two of those.

--silent - Encoder produces no text output, doesn't matter since foobar2000 isn't reading it anyway.

--ignorelength - Encoder ignores the length fields specified for the RIFF and data chunks, which can't be predicted without completely decoding the file first.


And --no-optimize, no idea. Maybe run the encoder with --help and find out?

Converting FLAC to ALAC using Foobar

Reply #23
http://sites.google.com/site/qaacpage/news/release016

Quote
Added --no-optimize option. By default, qaac optimizes the MP4 container after encoding has finished. "optimize" means arranging MP4 box in a better order for playing and eliminating unneeded free areas. However, when you run qaac from foobar2000(or something), it will rewrite the MP4 container afterward. In this case, optimizing with qaac will be useless and just a time consuming process.


This option was useful for qaac 0.16. For 0.37, there is almost no difference (just tested).

Re: Converting FLAC to ALAC using Foobar

Reply #24
I've been trying to transcode FLAC to ALAC using foobar and tried following this thread to get it to work.

I have been unable to get it to work on my Win10 PC using qaac.exe; presumably I don't have the required libraries (qaac --check returns ERROR: CoreAudioToolbox.dll: The specified module could not be found.). More info here.

Anyway, I tried refalac.exe (usgage here) and it works great. Parameters used: --ignorelength -s --no-optimize --alac -A -o %d -

ffmpeg also works (ffmpeg -i infile.flac -acodec alac outfile.m4a), but it's preferable for me to use foobar.

foobar provides the qaac.exe & refalac.exe files in the encoderpack.

I just wanted to add this info to this thread as it comes up as a high search result on HA and search engines and so may help others trying to do this.