Skip to main content

Topic: QAAC: discussion, questions, feature requests, etc. (Read 384783 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Ludo13B
  • [*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1025
Hi!

I discover the Apple AAC encoder yesterday (use Nero's a few years ago), and am really interested in using it for movies audio.

I read a lot of this thread, but am lost for a few things, I would be glad if you could help me. :)

Two categories, qaac options (to use with eac3to to convert my .dts or .ac3 to .wav) and foobar2000. I tried foobar2000, but I want to use eac3to if possible.

QAAC options:
- are these options required for movies audio? --rate keep, --adts, --no-delay, --no-optimize (I even saw a --limiter?)
- when is --ignorelength - used? Whith piped .WAV input?
- does the use of .m4a or .aac output change anything ? It is to remux with MKVToolNix (mkvmerge), video in .mkv container.
- options are they different to encode stereo, 5.1, downmix stereo, etc channels? Or from different types of DTS (ES, HDMA, etc)?

I am not sure how to handle the "iTunSMPB" tag in my case. With the --no-delay option? Or nothing?


foobar2000:
- I suppose I will have the same result with the same version of QAAC? Or the different DTS or AC3 decoder may result of slightly different output files?
I use foo_input_dts and foo_ac3 here: http://kode54.foobar2000.org/
- I locate the qaac.exe in C:\Program Files (x86)\foobar2000\encoders, but not libsoxr.dll and libsoxconvolver.dll. Are they required? Can I only replace qaac.exe to update it?
- are options used differents when using only eac3to, or exactly the same in foobar?

Thanks a lot!

Ludo

[Edit] Option --adts.
  • Last Edit: 07 May, 2016, 11:50:15 AM by Ludo13B

  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1026
Quote
- are these options required for movies audio? --rate keep, --adts, --no-delay, --no-optimize (I even saw a --limiter?)
Well, nothing is required. However, you might find --no-delay to be useful for the purpose.

Every MDCT codec including AAC has encoder delay by design.
qaac, when encoding to .m4a, writes delay information in the container metadata called iTunSMPB.
As long as you don't remux the resulting file and you are using players such as fb2k that is capable of gapless playback, delay is not an issue (player can trim them using the information from iTunSMPB).

OTOH, in case of movie you remux the resulting .m4a to another container file. So, the delay information can be lost in the remuxing process. Even when it is not lost, player might not take care of the audio delay very well. Therefore, --no-delay comes as the easiest way to avoid tiny A/V sync issue due to the delay (it is 40ms or so). --no-delay option simply compensates the delay.
However, using --no-delay means that necessary priming samples are not encoded in the result, so first 20ms or so cannot be correctly reconstructed. If you know that the very beginning of the sound track is silence (usually yes), it should do no harm.
As for mkvmerge, it seems to be able to handle iTunSMPB in .m4a. So, you might not need --no-delay. Try yourself.

Using --adts means no metadata (including iTunSMPB). Therefore, there's no chance of avoiding A/V sync issue unless you specify --no-delay. Other than that, as long as the remuxer is capable of reading both of .m4a and .aac, choice of intermediate format is not important.

Finally, if you are remuxing to another format, optimizing .m4a is nonsense. Therefore you can safely skip the optimizing process with --no-optimize.
Quote
- when is --ignorelength - used? Whith piped .WAV input?
Yes, but it's not always needed. If you are piping from ffmpeg, it is totally unnecessary.
qaac can detect "invalid" length in the WAV header in some ways, in which case qaac automatically switches to ignorelength mode anyway. You can easily tell if qaac is running in ignorelength mode (in which case qaac doesn't print total time and ETA in the progress, since it is unknown). And if something goes wrong, it should be obvious from resulting duration. Therefore, it's not something you should worried about too much.
Quote
options are they different to encode stereo, 5.1, downmix stereo, etc channels? Or from different types of DTS (ES, HDMA, etc)?
No.

  • Ludo13B
  • [*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1027
nu774, thanks a lot for your clear explanations. :)

I will make some tests with these information in mind.

Thanks again, and for your great work too. :)

  • Brazil2
  • [*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1028
New version 2.59:
https://sites.google.com/site/qaacpage/news/qaacrelease259

Quote
    Fix: Was failing encoding mono AAC to AAC.
    Support Wavpack v5 interface (with large file support)

Wavpack version 5 is still in alpha state, and DLL is not officially provided. If you want to try it, you have to build it yourself from the source code.

This version of qaac supports both of old and new Wavpack DLL (they are binary compatible). When new functions provided in version 5 library are detected, qaac will use them.

  • eahm
  • [*][*][*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1029
makeportable gives a console error with the latest version of iTunes 64-bit (12.4.0.119). All good with the 32-bit version. Using 7-Zip 16.00 64-bit (installed and copied same error).

7-Zip issue, 15.14 can extract just fine. 7-Zip developer notified.
  • Last Edit: 17 May, 2016, 12:29:24 PM by eahm

  • eahm
  • [*][*][*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1030
...aaand 7-Zip 16.01 fixes the issue.

  • sundance
  • [*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1031
Just out of curiosity:
Why is qaac's output directed to stderr when you supply --check as parameter?
(other messages like help screen goes to stdout...)

  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1032
Just out of curiosity:
Why is qaac's output directed to stderr when you supply --check as parameter?
(other messages like help screen goes to stdout...)
Well actually, only the help (usage) messages goes to stdout, since it's so long that you most likely want to pipe to a pager or redirect to a file or something to view it, in which case you'd need more typing if it were going to stderr, such as :
Code: [Select]
qaac 2>&1 | more


  • asbjbo
  • [*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1033
Hi,

I use qaac embedded in a Python script to create and maintain AAC copies of a well-tagged FLAC library of some ~30000 songs. It works very well - thanks!

However, some portable AAC players are not very smart in their handling of tags. The player in my car generates an "artist" list containing everyone and everything mentioned as artist, album artist, ensemble, composer or conductor in the file. That becomes rather unwieldy. Even worse, the "album" list splits by artist, generating multiple entries for albums with multiple artists. An album like "100 Country Hits" generates 100 entries in the album list, each with a different artist and one track. Setting a common album artist or the compilation flag does not help.

So I would like to generate AAC files with only the most basic tags, deleting all the others. By default, qaac copies the tags from source to target. I can partially override this by using the command line option --artist to set the track artist to the value of album artist (even when this is factually incorrect!).

This still leaves tags like composer or conductor to clutter up the player artist list. I have not found an easy way to strip extended tags like these from the conversion. First converting the FLAC file to a tag-less WAV, and then again to an AAC file with tags given on the command line works, but is a slower, two-stage process. I imagine it would be easy to add an option to ignore any tags in the source file and only use those provided on the command line.

Is there an easy way to do this in qaac?

  • Rollin
  • [*][*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1034
asbjbo, you can do mass removal of unneded tags after conversion, using foobar2000 or mp3tag.

  • asbjbo
  • [*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1035
Yes, that is possible, but since this runs as an automated script I would prefer not to need any manual post-processing. Also, opening 30000 server files in mp3tag over the network is extremely slow and crash-prone. An automated two-stage process via WAV is preferrable, but still slow and not very elegant. Is there an even better way?

  • sundance
  • [*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1036
@nu774:
According to QAAC's wiki it is save to use --normalize with aac/mp4, although that may result in samples above 0dbFS.
Did I understand that correctly? Or is an additional --limiter recommended? And how much is "near 0dbFS", where the limiter is activated?

edit: Just did a quick test (with 4 mp3 files being concatenated to one mp4 file) with --normalize alone and together with --limiter.
Both mp4 files had peaks above 0dbFS (1.044) when checked with foobar's replaygain scanner...
  • Last Edit: 05 September, 2016, 04:55:20 AM by sundance

  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1037
First converting the FLAC file to a tag-less WAV, and then again to an AAC file with tags given on the command line works, but is a slower, two-stage process. I imagine it would be easy to add an option to ignore any tags in the source file and only use those provided on the command line.

Is there an easy way to do this in qaac?
If you are scripting in python, I think you can fetch tags in FLAC files first (with metaflac command or Python's mutagen library), filter them as you like (in the script), then apply them.
And you don't have to use an intermediate, temporary WAV file for that purpose. Just use pipe instead.

  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1038
@nu774:
According to QAAC's wiki it is save to use --normalize with aac/mp4, although that may result in samples above 0dbFS.
Did I understand that correctly? Or is an additional --limiter recommended? And how much is "near 0dbFS", where the limiter is activated?

edit: Just did a quick test (with 4 mp3 files being concatenated to one mp4 file) with --normalize alone and together with --limiter.
Both mp4 files had peaks above 0dbFS (1.044) when checked with foobar's replaygain scanner...
Both of --normalize and --limiter works on PCM before encoding.
Peaks of the resulting AAC can easily go above 0dBFS (when decoded) but there's nothing I can do for it.
(It is quite normal for lossy codecs to have peaks above 0dBFS when decoded, and you won't hear those "clipping" anyway),
 

  • audiophool
  • [*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1039
When trying to extract the necessary QTfiles from itunes6464setup.exe (latest iTunes 12.5.1) using makeportable, I get a bunch of errors. makeportable doesn't create QTfiles64, either.

It says it cannot find the commands "findstr" and "reg". I tried with the latest makeportable.cmd on Win 10 x64 and 7-zip 16.02.

  • Brazil2
  • [*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1040
Quote
Changed 7.1ch rear channel layout in favor of Apple QuickTime.
qaac was using 3 front + 2 side + 2 back for 7.1ch rear output. However, it turned out that Apple QuickTime cannot handle this, and only recognizes 3 front + 4 back.

I have encoded 8_Channel_ID.wav with QAAC v2.58 and v2.60 and it looks like MediaInfo 0.7.88 doesn't make any difference between the two encodings and always reports:
Code: [Select]
Channel(s)                               : 8 channels
Channel positions                        : Front: L C R, Side: L R, Back: L R, LFE

Am I missing anything ? MediaInfo or QAAC problem ?

  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1041
In my PC, MediaInfo reports like this for 2.60:
Code: [Select]
Channel(s)                              : 8 channels
Channel positions                        : Front: L C R, Side: 4, LFE

Actually, your result is better than this, and it should be.
7.1ch file encoded by 2.60 should be decoded in exactly the same way as before into L+R+C+LF+BL+BR+SL+SR.
Recent ffmpeg just treats both of them as "7.1ch".

What is diffrent (in 2.60) is how channel layout is described in the AAC program config element, where channels are described in a completely different manner compared to WAV's channel mask.

  • Brazil2
  • [*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1042
In my PC, MediaInfo reports like this for 2.60:
Code: [Select]
Channel(s)                              : 8 channels
Channel positions                        : Front: L C R, Side: 4, LFE
I can get this result with the 24-bit version of the file but not with the attached 16-bit version.

  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1043
Well, channel mask of the attached WAV file is 0xFF, which is  7.1ch front layout ( L + R + C + LF +  BL + BR + FLC + FRC).
This is the default AAC 7.1ch layout, and is completely diffrent from 7.1ch rear layout (L + R + C + LF + BL + BR + SL + SR).

It seems that channel layout printed by MediaInfo is questionable on these files.

As is written at the wiki ( https://github.com/nu774/qaac/wiki/Multichannel--handling ), qaac treats these two channel layouts differently, and resulting file have actually different AAC channel layouts.
Also, note that ffmpeg needs "-strict 1" switch to decode 7.1ch AAC with default (front) layout correctly. It is written here: https://sites.google.com/site/qaacpage/news/qaacrelease235refalac135
  • Last Edit: 22 September, 2016, 11:54:52 AM by nu774

  • tebasuna51
  • [*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1044
What is diffrent (in 2.60) is how channel layout is described in the AAC program config element, where channels are described in a completely different manner compared to WAV's channel mask.

Encoding a wav FL,FR,FC,LF,BL,BR,SL,SR to .aac with qaac 2.60 and decoded by itself we obtain a wav FC,FL,FR,FC,SL,SR,BL,BR,LF
Others decoders have also problems with qaac 2.60: http://forum.doom9.org/showthread.php?p=1782018#post1782018

  • Anakunda
  • [*][*][*][*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1045
Quote
[qaac] release 2.61
posted 16 minutes ago by nu 774

Fix 7.1ch PCE: was incorrectly writing object_type(2) instead of profile(1). AFAIK, this doesn't seem to actually affect decoders because decoders are only interested in channel layouts in PCE, but still it was incorrect, and should be fixed.


  • nu774
  • [*][*][*][*][*]
  • Developer
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1046
Encoding a wav FL,FR,FC,LF,BL,BR,SL,SR to .aac with qaac 2.60 and decoded by itself we obtain a wav FC,FL,FR,FC,SL,SR,BL,BR,LF
Others decoders have also problems with qaac 2.60: http://forum.doom9.org/showthread.php?p=1782018#post1782018

Thanks, I noticed one issue in 7.1ch PCE and released 2.61 just now. However,  this release wouldn't fix your problem.

It may sound strange that qaac cannot correctly decode 7.1ch AAC created by itself.
Actually, Apple encoder only supports 7.1ch front layout, but not 7.1ch rear layout. (qaac supports encoding 7.1ch rear layout by manually inserting PCE that describes 7.1ch rear channel configuration).
Therefore, it is not too strange that Apple's AAC decoder doesn't correctly handle 7.1ch rear layout.
(Although it seems that QuickTime player (not CoreAudio) recognizes the correct channel layout)

Because of complexity and too much of flexibility in the PCE based channel configuration, poor handling in the decoder side is to be expected, and there's nothing I can do for it.
These days, at least libavcodec has good support on the PCE based AAC channel configuration, but it was far worse before.

Instead of PCE, I could use new standard ISO/IEC 14496-3:2009/Amd 4:2013 where ChannelConfiguration for 7.1ch rear layout is defined, but I suppose it's even worse in compatibility, since it's rather new standard that is used by no encoder AFAIK.

As a matter of fact, qaac 2.61 now writes exactly the same PCE as FDK-AAC encoder.
Therefore, those results should also apply to FDK-AAC encoder.

  • tebasuna51
  • [*][*]
Re: QAAC: discussion, questions, feature requests, etc.
Reply #1047
Thanks, I noticed one issue in 7.1ch PCE and released 2.61 just now. However,  this release wouldn't fix your problem.
Yep, 2.61 is the same.

Quote
Because of complexity and too much of flexibility in the PCE based channel configuration, poor handling in the decoder side is to be expected, and there's nothing I can do for it.
Ok, thanks for your interest.

Well we can survive with this.
I don't like very much 7.1 and 5.1 work fine always.
And we have libavcodec decoders (like Foobar2000) than work with 7.1.

Thanks.

Re: QAAC: discussion, questions, feature requests, etc.
Reply #1048
Used QAAC (via fb2K) to make some AAC files for my iPod, and they all had the same problem: After a track had finished playing, the next file would not only stop playing, it would cause the iPod to shut down. Specifically, the beginning of the next file would shut down after a second (maybe a little less), and the the Apple symbol pops up on the iPod's screen.

Now here's the werid part: I ended using the lossless source files to create ALAC files, imported them into iTunes, then used them to create AAC files...that worked on my iPod! WTF?!?! Both times (the last time I checked) Apple Application Support was used to create both sets of AAC files. Yet the iTunes version worked and the fb2/QAAC files didn't.

I thought the defaults for QAAC prevented this type of problem. Here's the unaltered default fb2k command line that QAAC uses to create AAC files:

--ignorelength -s --no-optimize -V 127 -o %d -

Any ideas about why this is happening?

Re: QAAC: discussion, questions, feature requests, etc.
Reply #1049
Ended up creating another batch of AAC files with QAAC via command line (used -V 127), and they still wouldn't work correctly on my iPod at all. Both iTunes and QAAC are using Apple Application Support to make the AAC files, but iTunes has the edge??? At this point, I'm starting to wonder if there's a bug in QAAC that's causing this, because when I can't even create AAC files via command line with QAAC without having this problem, something is clearly going on. At this point, I guess I have to use stupid iTunes to get what I want, because, at this point, QAAC is failing at getting the job done.