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: Error on converting FLAC to AAC (Read 4903 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Error on converting FLAC to AAC

I'm trying to convert FLAC files to AAC using the Free Encoder Pack (version 2019-12-23), and getting error messages. I've searched around and other people having similar problems are generally trying to encode >2 channel audio, but in my case it's 2 channel, so not sure what the issue is. I get errors when I try using either the Itunes encoder or the Winamp encoder, so I'm guessing the problem doesn't lie in either of these.

Also, all the software is the latest versions: Itunes, Winamp, foobar2000, Free Encoder Pack. I'm pretty much using defaults in the conversion settings, other than bumping up to 256 kbps.

Thanks for any help anyone can provide. Error messages are shown below.

Error message when using Itunes encoder:
1 out of 1 tracks converted with major problems.

Source: "D:\Music\Organized\Pink Floyd\1970_04_29_San_Francisco\Grantchester Meadows.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code 2 (0x00000002); please re-check parameters) : "D:\Music\AAC\Grantchester Meadows.m4a"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 16bps
  Command line: "D:\Software\foobar2000\encoders\qaac.exe" --ignorelength -s --no-optimize -V 109 -o "Grantchester Meadows.m4a" -
  Working folder: D:\Music\AAC\
 
  Conversion failed: The encoder has terminated prematurely with code 2 (0x00000002); please re-check parameters

Error message when using Winamp encoder:
1 out of 1 tracks converted with major problems.

Source: "D:\Music\Organized\Pink Floyd\1970_04_29_San_Francisco\Grantchester Meadows.flac"
  An error occurred while writing to file (The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters) : "D:\Music\AAC\Grantchester Meadows.m4a"
  Additional information:
  Encoder stream format: 44100Hz / 2ch / 16bps
  Command line: "D:\Software\foobar2000\encoders\fhgaacenc.exe" --ignorelength --quiet --vbr 6 - "Grantchester Meadows.m4a"
  Working folder: D:\Music\AAC\
 
  Conversion failed: The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters

Re: Error on converting FLAC to AAC

Reply #1
The error from fhgaacenc means it can't load enc_fhgaac.dll. It could mean your Winamp couldn't be found.
Wouldn't surprise me if QAAC error means that iTunes couldn't be found. QAAC can't for example use Microsoft Store version of iTunes.

You can copy enc_fhgaac.dll and libmp4v2.dll from Winamp's install dir into D:\Software\foobar2000\encoders and that should fix fhgaacenc problems.

Re: Error on converting FLAC to AAC

Reply #2
Thanks for the help! I didn't find the enc_fhgaac.dll in my Winamp directory but looking a bit online, I needed to download an older version of Winamp and that had both dll's you mentioned, and I'm able now to convert to aac successfully.

Followup question, what would be the right version of iTunes to download for a Windows 10 PC, as I do have the Microsoft store version? Supposedly iTunes has the best aac encoder so if I can download the right iTunes I will, but if not the Winamp version should be fine for me.

 

Re: Error on converting FLAC to AAC

Reply #3
To use qaac as an encoder WITHOUT needing to actually install iTunes:

1.  Be sure you have the latest Foobar Free Encoder pack installed, which includes qaac.exe

2.  Download the iTunes installer from Apple but do NOT install it; also download "makeportable.zip" at https://sites.google.com/site/qaacpage/cabinet/makeportable.zip?attredirects=0&d=1

3.  Extract "makeportable.cmd" from makeportable.zip to wherever you downloaded the iTunes installer from step #2

4.  Run makeportable.cmd;  it will make a folder named "QTfiles", which contains everything you need from iTunes to use qaac without having to install iTunes.

5.  Put the folder "QTfiles" in your foobar2000/Encoders folder

6.  Done!  You can delete the ITunes installer you downloaded in step #2.