AAC Profile for 5.1

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Post Reply
Message
Author
ramzman
Posts: 2
Joined: Tue Feb 24, 2015 4:33 am

AAC Profile for 5.1

#1 Post by ramzman » Tue Feb 24, 2015 4:39 am

I am trying to use the AAC profile but if I want to convert DTS-MA to 5.1 AAC not Stereo-2 Channel. Every time I change the mix settings the xml fails to load or I get an error with 5.1(Side) not supported. Can anyone suggest an approach to this?

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: AAC Profile for 5.1

#2 Post by ndjamena » Tue Feb 24, 2015 7:32 am

EAC3To and NeroAACEnc/Qaac

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: AAC Profile for 5.1

#3 Post by ndjamena » Tue Feb 24, 2015 8:16 am

"aac-gpl" seems to work with 5.1 but it uses FFMPEG AAC so you'd probably be better of with Nero.

Romansh
Posts: 873
Joined: Sat Jan 22, 2011 7:09 pm

Re: AAC Profile for 5.1

#4 Post by Romansh » Tue Feb 24, 2015 3:14 pm

I thought MakeMKV used libfdk? It definitely supports 5.1 encoding, though you might need to ask for 5.1(back) rather than 5.1(side) in FFmpeg?

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: AAC Profile for 5.1

#5 Post by ndjamena » Tue Feb 24, 2015 3:24 pm

channel_layout=5.1[FL][FR][FC][LFE][SL][SR]

or

:map=0.0-FL|1.0-FR|2.0-FC|3.0-SL|4.0-SR|5.0-LFE


Would be the FFMPEG commands that determine these things, if you can figure out how to add either of them, or even if you can.

Romansh
Posts: 873
Joined: Sat Jan 22, 2011 7:09 pm

Re: AAC Profile for 5.1

#6 Post by Romansh » Thu Feb 26, 2015 2:20 pm

That's 5.1 side though, 5.1 back would have BL and BR in place of SL and SR.

ramzman
Posts: 2
Joined: Tue Feb 24, 2015 4:33 am

Re: AAC Profile for 5.1

#7 Post by ramzman » Fri Feb 27, 2015 3:37 am

Thank you all for your fast response. I have just started working with the profiles. The current AAC stereo profile reads:
<outputSettings name="aac" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 AAC-LC</description>
<extraArgs>codec=libfdk_aac profile=LC</extraArgs>
<extraArgs>afterburner=1</extraArgs>
</outputSettings>

<outputSettings name="he-aac" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 HE-AAC</description>
<extraArgs>codec=libfdk_aac profile=HE-AAC signaling=explicit_sbr</extraArgs>
<extraArgs>afterburner=1</extraArgs>
</outputSettings>

<outputSettings name="aac-gpl" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 AAC-LC (ffmpeg encoder)</description>
<extraArgs>codec=aac -strict -2</extraArgs>
<extraArgs>aac_coder=twoloop</extraArgs>
</outputSettings>

How would I incorporate the commands described above into the XML?

rs182
Posts: 2
Joined: Wed Aug 26, 2015 10:12 pm

Re: AAC Profile for 5.1

#8 Post by rs182 » Wed Aug 26, 2015 10:25 pm

I have also been working on an AAC-LC multichannel conversion profile.

Does anyone know of a resource that details the basic syntax for the libfdk_aac codec as used within the XML conversion profile?

The codec is definitely able to encode in multichannel, it's just a matter of figuring out how to tell it to do so within the mmcp.xml file.

ant75
Posts: 20
Joined: Mon Nov 19, 2012 8:44 pm

Re: AAC Profile for 5.1

#9 Post by ant75 » Mon Mar 06, 2017 1:12 pm

I have also wanted multi channel AAC encoding and have succeeded in getting it to work for 5.1 channels. 7.1 channel is available in the MakeMKV GUI also and it will try to do it, but then returns with an error stating unsupported in ffmpeg. Do we need a new ffmpeg update? How can this be done?

Here is the xml file code I used to get AAC 5.1 encoding to work. It was modified from the current stereo AAC.



<?xml version="1.0" encoding="utf-8"?>
<profile>
<!-- profile name -->
<name lang="eng">AAC</name>

<!-- Common MKV flags -->
<mkvSettings
ignoreForcedSubtitlesFlag="false"
useISO639Type2T="false"
setFirstAudioTrackAsDefault="true"
setFirstSubtitleTrackAsDefault="true"
setFirstForcedSubtitleTrackAsDefault="true"
insertFirstChapter00IfMissing="true"
/>

<!-- Settings overridable in preferences -->
<profileSettings
app_DefaultSelectionString="-sel:all,+sel:(mvcvideo),-sel:(lossless),+sel:(favlang|nolang),-sel:(havemulti|havecore),+sel:(lossy),+sel:(attachment),=100:all,=90:rus,=80:ara,=70:chi,=60:spa,=50:eng"
/>

<!-- Output formats -->
<outputSettings name="copy" outputFormat="directCopy">
<description lang="eng">Copy track as is</description>
<description lang="ger">Track 1:1 kopieren</description>
</outputSettings>

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

<outputSettings name="he-aac" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 HE-AAC</description>
<extraArgs>codec=libfdk_aac profile=HE-AAC signaling=explicit_sbr</extraArgs>
<extraArgs>afterburner=1</extraArgs>
</outputSettings>

<!-- HE-AACv2 - stereo inputs only -->
<outputSettings name="he-aacv2" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 HE-AACv2</description>
<extraArgs>codec=libfdk_aac profile=HE-AACv2 signaling=explicit_hierarchical</extraArgs>
<extraArgs>afterburner=1</extraArgs>
</outputSettings>

<outputSettings name="aac-gpl" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 AAC-LC (ffmpeg encoder)</description>
<extraArgs>codec=aac -strict -2</extraArgs>
<extraArgs>aac_coder=twoloop</extraArgs>
</outputSettings>

<!-- Audio downmix settings -->

<audioMixSettings name="stereo16"
outputBPS="16"
outputChannelLayout="stereo"
mix="DolbyPrologic2">
<description lang="eng">Stereo 16-bit Dolby PrologicII downmix</description>
</audioMixSettings>

<audioMixSettings name="stereo16raw"
outputBPS="16"
outputChannelLayout="stereo"
centerMixLevel="-3dB"
surroundMixLevel="-6dB"
lfeMixLevel="0">
<description lang="eng">Stereo 16-bit downmix</description>
</audioMixSettings>

<!-- Default rule - copy as is -->
<trackSettings input="default">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>

<!-- For all audio tracks don't keep the original track and
produce additional AAC Track if Multi channel source -->

<trackSettings input="LPCM-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="LPCM-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>

<trackSettings input="TRUEHD-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="TRUEHD-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>
<trackSettings input="MLP-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="MLP-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>

<trackSettings input="DTSHDMA-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="DTSHDMA-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>

<!-- Save DTS-HD LBR (low quality) as AAC (just to decode),
do not keep original track -->
<trackSettings input="DTSHDLBR-stereo">
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="DTSHDLBR-multi">
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>

<trackSettings input="DTS-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="DTS-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>

<trackSettings input="AC3-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="AC3-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>
<trackSettings input="EAC3-core-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="EAC3-core-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>
<trackSettings input="EAC3-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="EAC3-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac-gpl"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>

<!-- Keep AAC unchanged -->
<trackSettings input="AAC-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="AAC-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>
</profile>

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: AAC Profile for 5.1

#10 Post by ndjamena » Mon Mar 06, 2017 3:31 pm

If you set the "outputChannelLayout" in an "audioMixSettings" to "5.1b" and add that to your "-multi" profile entries you can use the default AAC encoder (libfdk_aac) which has better compression than aac-gpl. It will also downmix 7.1 to 5.1. As to what it will do to 4.0 or 5.0... you'd have to deal with those kind of occurrences manually (there's "5.0b", but there are no named channel layouts for anything else, 6.1 and 7.1 included.)

ant75
Posts: 20
Joined: Mon Nov 19, 2012 8:44 pm

Re: AAC Profile for 5.1

#11 Post by ant75 » Tue Mar 07, 2017 12:16 am

Thank you for the help with the channel mapping. I have added the multi audio mix with 5.1b channel mapping. (Rear not side speakers) I confirm that 7.1 channels are not working. A shame as this is what I originally wanted to get happening.

Here is the modified xml file:


<?xml version="1.0" encoding="utf-8"?>
<profile>
<!-- profile name -->
<name lang="eng">AAC</name>

<!-- Common MKV flags -->
<mkvSettings
ignoreForcedSubtitlesFlag="false"
useISO639Type2T="false"
setFirstAudioTrackAsDefault="true"
setFirstSubtitleTrackAsDefault="true"
setFirstForcedSubtitleTrackAsDefault="true"
insertFirstChapter00IfMissing="true"
/>

<!-- Settings overridable in preferences -->
<profileSettings
app_DefaultSelectionString="-sel:all,+sel:(mvcvideo),-sel:(lossless),+sel:(favlang|nolang),-sel:(havemulti|havecore),+sel:(lossy),+sel:(attachment),=100:all,=90:rus,=80:ara,=70:chi,=60:spa,=50:eng"
/>

<!-- Output formats -->
<outputSettings name="copy" outputFormat="directCopy">
<description lang="eng">Copy track as is</description>
<description lang="ger">Track 1:1 kopieren</description>
</outputSettings>

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

<outputSettings name="he-aac" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 HE-AAC</description>
<extraArgs>codec=libfdk_aac profile=HE-AAC signaling=explicit_sbr</extraArgs>
<extraArgs>afterburner=1</extraArgs>
</outputSettings>

<!-- HE-AACv2 - stereo inputs only -->
<outputSettings name="he-aacv2" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 HE-AACv2</description>
<extraArgs>codec=libfdk_aac profile=HE-AACv2 signaling=explicit_hierarchical</extraArgs>
<extraArgs>afterburner=1</extraArgs>
</outputSettings>

<outputSettings name="aac-gpl" outputFormat="AAC">
<description lang="eng">Save as Mpeg-4 AAC-LC (ffmpeg encoder)</description>
<extraArgs>codec=aac -strict -2</extraArgs>
<extraArgs>aac_coder=twoloop</extraArgs>
</outputSettings>

<!-- Audio downmix settings -->

<audioMixSettings name="multi"
outputBPS="16"
outputChannelLayout="5.1b"
mix="DolbyPrologic2">
<description lang="eng">Multi Channel Encoding to AAC</description>
</audioMixSettings>

<audioMixSettings name="stereo16"
outputBPS="16"
outputChannelLayout="stereo"
mix="DolbyPrologic2">
<description lang="eng">Stereo 16-bit Dolby PrologicII downmix</description>
</audioMixSettings>

<audioMixSettings name="stereo16raw"
outputBPS="16"
outputChannelLayout="stereo"
centerMixLevel="-3dB"
surroundMixLevel="-6dB"
lfeMixLevel="0">
<description lang="eng">Stereo 16-bit downmix</description>
</audioMixSettings>

<!-- Default rule - copy as is -->
<trackSettings input="default">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>

<!-- For all audio tracks don't keep the original track and
produce additional AAC Track if Multi channel source -->

<trackSettings input="LPCM-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="LPCM-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>

<trackSettings input="TRUEHD-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="TRUEHD-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>
<trackSettings input="MLP-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="MLP-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>

<trackSettings input="DTSHDMA-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="DTSHDMA-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>

<!-- Save DTS-HD LBR (low quality) as AAC (just to decode),
do not keep original track -->
<trackSettings input="DTSHDLBR-stereo">
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="DTSHDLBR-multi">
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString"
audioMix="multi">
</output>
</trackSettings>

<trackSettings input="DTS-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="DTS-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>

<trackSettings input="AC3-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="AC3-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>
<trackSettings input="EAC3-core-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="EAC3-core-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>
<trackSettings input="EAC3-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="EAC3-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
<output outputSettingsName="aac"
defaultSelection="$app_DefaultSelectionString,-sel:all"
audioMix="multi">
</output>
</trackSettings>

<!-- Keep AAC unchanged -->
<trackSettings input="AAC-stereo">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString">
</output>
</trackSettings>
<trackSettings input="AAC-multi">
<output outputSettingsName="copy"
defaultSelection="$app_DefaultSelectionString,-sel:all">
</output>
</trackSettings>
</profile>

Post Reply