Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th December 2016, 17:55   #1  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
Encoding witth QAAC like CT AAC

Hello there,
I've been using Coding Technologies AAC from a long time, with WinAmp old dll, using BeLight and BeSweet. The parameters I used the most often are HE-AAC 2.0 64 kbps and LC-AAC 5.1 192 or 256 kbps, sometimes HE-AAC v2 with Parametric Stereo 32 kbps.


I'm very satisfied with the result since i'm just looking for medium quality audio for 700 MB movie rips.
I recently discovered QAAC, and the fact that it can be directly encoded through MeGui, without using BeSweet.
So my question is really simple, what parameters should I use in MeGui to have the same (or better ?!) results at the same bitrate using the QAAC encoder and MeGUI?

Thanks for your help!
LeMoi is offline   Reply With Quote
Old 12th December 2016, 21:56   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
You can use eac3to, BeHappy or MeGUI to encode to AAC with QAAC.

If you want fix a average bitrate you can use the 'Constrained VBR' mode, always better than ABR or CBR .
After you can select the Profile desired.
And, for movies, I recommend check the 'No Delay' option.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 12th December 2016, 22:21   #3  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
Thanks for your help!
So, for example, for my first stereo HE-AAC 64 kbps setting, should it be like that:

And for 5.1 LC-AAC 192 kbps setting:

What if the source is a 7.1 DTS, will the LC-AAC be 7.1 to, or is there an option to keep 6ch instead of 8 ? Or does the AAC only allow 6ch max?
I don't find an equivalent of Parametric Stereo for low bitrates (e.g. 32 kbps)...
And last question, sometimes, for a 6ch track, I used to check the "Mode Boost: LigH" option in BeLight, to boost the volume for people who listen to the track in on only stereo system, is there such an option for qAAC in MeGUI, or in BeHappy ?
LeMoi is offline   Reply With Quote
Old 13th December 2016, 15:17   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
My first answer was only related with QAAC encoder.
QAAC don't support HEv2 (Parametric Stereo), is very low quality not recommended for track movies.
EDIT: seems change automatically for low bitrates like herbert show in second next post
EDIT 2: I was right QAAC don't support HEv2

Other question is how decode, downmix or improve the audio before encode:

- Preferred decoder: Use always 'LWLibavAudioSource' for any input (DTS-HD, TrueHD, DTS, E-AC3, AC3, AAC, ...)

- Output Channels: Use 'Keep Original Channels' or 'Downmix multichannels to stereo' at your choice.
MeGUI don't offer 7.1 to 5.1, and encode to a 7.1 AAC is possible but not recommended.
Maybe you need BeHappy to do 7.1 (DTS-HD or TrueHD) -> AAC 5.1

- Apply Dynamic Range Compresión: recommended if 'Downmix multichannels to stereo' but only work with AC3 sources.

- Normalize Peaks to: 100% recommended if 'Downmix multichannels to stereo' (equivalent to BeLight OTA)

The BeLight (BeSweet) Boost filters aren't supported here, we can do some similar effects with AviSynth plugins, but is not easy to implement.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 15th December 2016 at 17:17. Reason: add info
tebasuna51 is offline   Reply With Quote
Old 14th December 2016, 00:04   #5  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
Thanks for the details. I only use HE-AAC v2 (Parametric Stereo) for commentary tracks, which don't need high or medium quality audio, it's just to save half the size of a track! I'll keep using BeLight for this, and for 6ch tracks (to be able to boost a little), too, thanks again for your help
LeMoi is offline   Reply With Quote
Old 14th December 2016, 01:25   #6  |  Link
herbert
Registered User
 
Join Date: May 2015
Posts: 7
Apple's encoder switches to HE-AAC v2 (PS) automatically for 32kbps or lower.

Code:
ffmpeg -i test.mp3 -f wav - | qaac64 --cvbr 64 -o lc.mp4 -
AAC-LC Encoder, CVBR 64kbps, Quality 96
Format profile                 : LC

ffmpeg -i test.mp3 -f wav - | qaac64 --he --cvbr 64 -o he.mp4 -
AAC-HE Encoder, CVBR 64kbps, Quality 96
Format profile                 : HE-AAC

ffmpeg -i test.mp3 -f wav - | qaac64 --he --cvbr 32 -o heps.mp4 -
AAC-HE Encoder, CVBR 32kbps, Quality 96
Format profile                 : HE-AACv2
herbert is offline   Reply With Quote
Old 14th December 2016, 01:39   #7  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by herbert View Post
Apple's encoder switches to HE-AAC v2 (PS) automatically for 32kbps or lower.
Good to know, I never test low bitrates.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 14th December 2016, 10:02   #8  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
Thanks for the precisions
LeMoi is offline   Reply With Quote
Old 14th December 2016, 11:35   #9  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 294
Cannot confirm: 'qaac64 --he --cvbr 32' still creates HE-AAC v1 files here.
lvqcl is offline   Reply With Quote
Old 14th December 2016, 15:10   #10  |  Link
herbert
Registered User
 
Join Date: May 2015
Posts: 7
Hmmm, interesting.

This was my test file: http://www.linguistik.uzh.ch/static/...en-2016-11.mp3

MediaInfo tab in MPC-HC lists this as HE-AAC v2 when encoded at or below 32kbps by QAAC.
herbert is offline   Reply With Quote
Old 14th December 2016, 16:58   #11  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Please list your exact QAAC command line and version.
sneaker_ger is offline   Reply With Quote
Old 14th December 2016, 21:56   #12  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Using qaac v2.61 the low bitrate supported is 32 Kb/s and the output is HE, not HEv2, with 2 standard channels +SBR

Using the mp3 uploaded or any input than I test.
Code:
angesprochen-2016-11.mp3_.m4a
AAC-HE Encoder, CVBR 32kbps, Quality 96
[9.0%] 24:23.222/4:30:31.923 (23.0x), ETA 10:42.577
64528128/715827840 samples processed in 1:03.679
Overall bitrate: 31.9982kbps
Optimizing...done
Don't show the "Format profile..." message.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 14th December 2016, 22:19   #13  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
Is MediaInfo really reliable? It is often wrong for detecting HE vs LC AAC in some of my rips made wit BeSweet, but I have not tried it yet for encodes made with QAAC
LeMoi is offline   Reply With Quote
Old 14th December 2016, 22:20   #14  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
I suspect he's using an old MediaInfo version.
sneaker_ger is offline   Reply With Quote
Old 14th December 2016, 22:47   #15  |  Link
herbert
Registered User
 
Join Date: May 2015
Posts: 7
Quote:
Originally Posted by sneaker_ger View Post
I suspect he's using an old MediaInfo version.
Quite possible, I'm using MediaInfo as shipped as part of MPC-HC 1.7.10.264.

ffmpeg version N-82225-gb4e9252, qaac 2.58, CoreAudioToolbox 7.10.7.0

I uploaded test encodes here: https://mega.nz/#!pYgTDQSI!6G1MQCAAd...EZO4jRg76326L0

testffmpeg.mp4 = ffmpeg -i angesprochen-2016-11.mp3 -f wav - | qaac64 --he --cvbr 32 -o testffmpeg.mp4 -

test.mp4 = qaac64 --he --cvbr 32 -o test.mp4 angesprochen-2016-11.mp3

The file generated by ffmpeg | qaac is identified as HE-AAC v2 by MediaInfo.
The plain qaac encode is identified as HE-AAC.

Is there any reliable way of identifying the actual version of HE-AAC employed here?

Edit: Changed host for files

Last edited by herbert; 14th December 2016 at 22:57.
herbert is offline   Reply With Quote
Old 15th December 2016, 01:24   #16  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
I have my own tool to check .m4a

This is a true HE v2 encoded with fdkaac:
Code:
File ........: D:\tmp\angesprochen-2016-11.m4a
Size ........:  5993053 bytes

---------------------------------------------- Header Info
Atom ID .....: ftyp
Audio format : AAC-HE v2 (LC+SBR+PS)
Channels ....: 2
SampleRate ..: 44100 Hz.
Total Frames : 31511
Total Samples: 32267264
Data Length .: 5853472 bytes
Duration trak: 1463.368 sec., (0h. 24m. 23.368s.)
BitRate .....: 32 Kb/s
And this I obtain with your uploaded samples:
Code:
File ........: D:\tmp\test.mp4    [testffmpeg.mp4]
Size ........:  5997310 bytes   [5999452 bytes]
---------------------------------------------- Header Info
Atom ID .....: ftyp
Audio format : AAC-HE (LC+SBR)
Channels ....: 2
SampleRate ..: 44100 Hz.
Total Frames : 31510
Total Samples: 32266240
Data Length .: 5857602 bytes       [5859844 bytes]
Duration trak: 1463.322 sec., (0h. 24m. 23.322s.)
BitRate .....: 32 Kb/s
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 15th December 2016 at 02:01.
tebasuna51 is offline   Reply With Quote
Old 15th December 2016, 19:22   #17  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by LeMoi View Post
I only use HE-AAC v2 (Parametric Stereo) for commentary tracks, which don't need high or medium quality audio,
Still you can use 32 Kb/s with HE-AAC v1 (without PS) for these tracks

Quote:
and for 6ch tracks (to be able to boost a little), too
I make some test about BeSweet Boost and I don't like very much.

First, never use the DspGuru mode, it is broken cutting and inversing peaks.

The LigH and Tera mode work amplifying low volume of all channels, and let high volume without changes.

If the problem is low dialog volume in 5.1 I think than is better amplify only the center channel

Also BeLight work only with AC3 input (for 5.1).

You can use a script like this:
Quote:
LoadPlugin("MEGUI\tools\lsmash\lsmashsource.dll")
LoadPlugin("MEGUI\tools\avisynth_plugin\AudioLimiter.dll")
LWLibavAudioSource("YOUR_SOURCE", stream_index=-1,cache=false)

a = ConvertAudioToFloat()

flr = Getchannel(a, 1, 2)
cen = Getchannel(a, 3)#.Amplify(2).SoftClipperFromAudX(0.0)
lfe = Getchannel(a, 4)

Getchannel(a, 5, 6)
(AudioChannels(a)==7) ? c61_51(a) : last
(AudioChannels(a)==8) ? c71_51(a) : last
sur = last

mergechannels(flr,cen,lfe,sur)
ConvertAudioTo16bit()

function c61_51(clip b) {
blr = Getchannel(b, 5, 5)
slr = Getchannel(b, 6, 7)
MixAudio(blr, slr, 0.7071, 1.0).SoftClipperFromAudX(0.0)
return last
}

function c71_51(clip b) {
blr = Getchannel(b, 5, 6)
slr = Getchannel(b, 7, 8)
MixAudio(blr, slr, 1.0, 1.0).SoftClipperFromAudX(0.0)
return last
}
(Change MEGUI with the full path to your megui install, and YOUR_SOURCE with the full path to your input file)

To accept any source even DTS-HD or TrueHD 6.1 or 7.1 than downmix to 5.1.

If you remove the '#' in:

cen = Getchannel(a, 3).Amplify(2).SoftClipperFromAudX(0.0)

you can amplify only the center channel at your desired level.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 16th December 2016 at 10:57.
tebasuna51 is offline   Reply With Quote
Old 16th December 2016, 03:14   #18  |  Link
herbert
Registered User
 
Join Date: May 2015
Posts: 7
Quote:
Originally Posted by tebasuna51 View Post
I have my own tool to check .m4a
That's a bummer about qaac! Thanks for double checking and the tool, will make use of it.
herbert is offline   Reply With Quote
Old 16th December 2016, 23:59   #19  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
Quote:
Originally Posted by tebasuna51 View Post
You can use a script like this:

(Change MEGUI with the full path to your megui install, and YOUR_SOURCE with the full path to your input file)

To accept any source even DTS-HD or TrueHD 6.1 or 7.1 than downmix to 5.1.

If you remove the '#' in:

cen = Getchannel(a, 3).Amplify(2).SoftClipperFromAudX(0.0)

you can amplify only the center channel at your desired level.
Thanks for the script, I'll try it next time I need to encode to AAC 5.1!
LeMoi is offline   Reply With Quote
Old 17th December 2016, 23:30   #20  |  Link
LeMoi
Registered User
 
Join Date: Sep 2004
Location: France
Posts: 367
OK my first try is not really succesfull ^^
Doing a simple DTS -> HE-AAC conversion with these settings

getting this error

Did I miss something?

BTW I tried the same file 2 days ago but I wasn't home when it finished. I closed MeGUI without seeing that there were errors and the file didn't encode at all, I got a .dts.lwi file and an empty aac file with the same filename but I couldn't see the log...
LeMoi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.