HydrogenAudio

Lossy Audio Compression => AAC => AAC - General => Topic started by: Rentom on 2020-06-03 18:24:10

Title: Channel Layot of Fdk AAC Encoder
Post by: Rentom on 2020-06-03 18:24:10
Good afternoon.

I used FDK aac encoder to create 7.1 m4a sound from the sourcel 7.1 wav file. The source file has standard 7.1-channel layout.
When I look at the created mediainfo M4 file, I see a channel layot: C L R Ls Rs Rls Rb LFE. I am confused by two channels: "Rls Rb". Which channel 7.1 layout does this apply to?

I read that the libfdk-aac supports two 7.1ch layout. One is AAC standard C+Lc+Rc+L+R+Ls+Rs+LFE (7.1ch front), and another is C+L+R+Ls+Rs+Rls+Rrs+LFE (7.1ch rear).

I understand correctly, that my channel layout from m4a file : "C L R Ls Rs Rls Rb RFE LFE" refers to "7.1ch rear" channel layout?

Please tell, how can i activate "7.1ch front" channel layout?
Title: Re: Channel Layot of Fdk AAC Encoder
Post by: nu774 on 2020-06-04 12:51:54
I used FDK aac encoder to create 7.1 m4a sound from the sourcel 7.1 wav file. The source file has standard 7.1-channel layout.
What do you mean by the "standard"? What MediaInfo says?
For 7.1ch front WAV, MediaInfo will say "L R C LFE Lb Rb Lscr Rscr".
For 7.1ch rear WAV, It should be "L R C LFE Lb Rb Ls Rs".
Channel layout of a WAV file is described in the dwChannelMask field in the WAVEFORMATEXTENSIBLE structure.
If it is not present, fdkaac picks 7.1ch rear as default (for 7.1ch source).

Quote
When I look at the created mediainfo M4 file, I see a channel layot: C L R Ls Rs Rls Rb LFE. I am confused by two channels: "Rls Rb". Which channel 7.1 layout does this apply to?
It should be "C L R Ls Rs Lb Rb LFE". Otherwise, just update MediaInfo.
Quote
I read that the libfdk-aac supports two 7.1ch layout. One is AAC standard C+Lc+Rc+L+R+Ls+Rs+LFE (7.1ch front), and another is C+L+R+Ls+Rs+Rls+Rrs+LFE (7.1ch rear).

I understand correctly, that my channel layout from m4a file : "C L R Ls Rs Rls Rb RFE LFE" refers to "7.1ch rear" channel layout?
Yes. Difference of "Lb" and "Rls" (or "Rb" and Rrs") is not important. It's just a matter of wording.
Quote
Please tell, how can i activate "7.1ch front" channel layout?
You need to provide fdkaac with a source file with a correct channel mask.
Title: Re: Channel Layot of Fdk AAC Encoder
Post by: Rentom on 2020-06-07 22:52:33
Thank you for responding.

Quote
What do you mean by “standard”? What does MediaInfo say?
By “standard” channel layout, i mean this: L, R, C, LFE, Lss, Rss, Lsr, Rsr (according DTS-HD Encoder)
My source 7.1 waw file have this channel layout in mediainfo : L R C LFE Lb Lr Ls Rs

Quote
Channel layout of a WAV file is described in the dwChannelMask field in the WAVEFORMATEXTENSIBLE structure. [Макет канала WAV-файла описан в поле dwChannelMask в структуре WAVEFORMATEXTENSIBLE.]
If it is not present, fdkaac picks 7.1ch rear as default (for 7.1ch source).
I suspect this may be the reason. How can I switch the default rear channel layout?
I did not find the key "channel layout" from fdkaac help. I tried add the key  "--raw-channels 7.1 (front)". Encoding process was done, without warning. But it did not help me.
The key "raw channels" maybe help for this? How can I write forcibly a 7.1 (front)? 

Quote
It should be "C L R Ls Rs Lb Rb LFE". Otherwise, just update MediaInfo.
I understand that should be that. I want to achieve this.

Quote
You need to provide fdkaac with a source file with a correct channel mask.
Source w64 file was made by decoding from dts-hd 7.1 file, with original "channel layout : C L R LFE Lb Rb Lss Rss" ( via eac3to)
Title: Re: Channel Layot of Fdk AAC Encoder
Post by: nu774 on 2020-06-09 01:32:20
My source 7.1 waw file have this channel layout in mediainfo : L R C LFE Lb Lr Ls Rs
Isn't it L R C LFE Lb Rb Ls Rs?
Anyway, it's 7.1 rear.
Quote
How can I write forcibly a 7.1 (front)? 
I don't understand your idea. If the source file is 7.1 rear, why do you want to encode it as 7.1 front?
They are VERY different layout and it's simply wrong.

To answer your question, fdkaac doesn't provide a way to re-map channel layout.
Therefore you have to prepare a wave file with 7.1 front layout.