Page 1 of 1

Custom AAC profile with VBR

Posted: Fri Mar 29, 2019 3:21 pm
by Linx_
Greetings, all. I'm fairly new to MakeMKV and just discovered custom profiles. I've been using MeGUI for audio conversion, but if I can set up a profile the way I want, it will make my life a whole lot easier. What I want is a conversion of all audio tracks using FDK-AAC LC with VBR quality=4. No downmixing, resampling, or other funny business. Whatever it is, it is. Just in AAC.

I've had a look at aac-st.mmcp to use as a template, and frankly I can't make heads or tails of it. It looks like it's using fdk-aac as the default, although I do see some ffmpeg blocks as well, which I don't want. I also see some blocks for HE-AAC and HE-AACv2, and I don't want those either. I want to stick to AAC-LC for higher bitrate encoding. Is it safe to delete those blocks I don't want?

Lastly, I don't see any <extraArgs> examples for setting quality or mode. I assume it's using the FDK default of CBR 64k, but I can't really tell. If I were doing it on a command line, I would want the --bitrate-mode=4 argument. Is that what I would add to the <extraArgs> section, or would the syntax be different? Would I add it to an existing line after profile=LC, or would I make a new line for it like Afterburner is?

Re: Custom AAC profile with VBR

Posted: Sun Mar 31, 2019 8:33 pm
by Linx_
Well, after some futzing around, I *think* I figured out how to make it partially work, but unfortunately, it's not really usable in its current state for 2 reasons: 1) it only seems to compress the first audio track correctly and reverts to default values for others, and 2) it's far too sssssslooooooooooowwwwwwwwwww to be useful.

I deleted all the blocks I don't want that reference HE-AAC and HE-AACv2 and downmixing to stereo, and added the following to the output formats block:

<outputSettings name="aac" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 AAC-LC</description>
<extraArgs>codec=libfdk_aac profile=LC</extraArgs>
<extraArgs>vbr 4</extraArgs>

It seems to compress the first audio track correctly, although the extracted final track size is just very slightly different from the same file encoded with MeGUI fdk-aac at the same settings (i.e., 23.9mb vs 23.3mb). However, adjusting the vbr value up and down causes the track size to change, so I feel comfortable it's working correctly. However, tracks 2+ seem to still be encoded at something that appears to be around 160kb/s CBR. I have no idea where these settings are coming from, so I'm not sure, but commentary tracks are coming out at around 50% larger than the main track, when they should be about the same or slightly smaller.

The other issue is that DVD ripping speed goes from 8x to around .5x, whereas I can encode the same tracks with MeGUI at around 40x each. So not sure what's going on there to cause it to be so slow, when it should theoretically be using the same binary and the same settings.

So for now I'm sticking with MeGUI, but I'd still like to get this working if anyone has any thoughts.

Re: Custom AAC profile with VBR

Posted: Mon Apr 01, 2019 2:24 am
by Linx_
So after a bit more testing, it seems all the tracks are encoding properly at vbr 4 after all. I was operating under the flawed assumption that because all tracks are 2-channel AC3 they would be roughly the same transcoded size, and this is not the case. The commentary tracks are coming out larger because they are actually true stereo with different left and right channels, whereas the main track is presented as a "dual mono" track with identical left and right. Apparently FDK is smart enough to recognize this and treat it as mono.

So it does work correctly, but it's still slow as sin which makes it unusable for me at this point.