Log in

View Full Version : E-AC3 7.1 Atmos Channel Layout Correction (Tfl/Tfr → Lb/Rb) – Beta


DRX-Lab
29th December 2025, 08:59
Hello everyone,
I have developed a Python script to correct the channel layout of E-AC3 7.1 Atmos tracks. The script converts:


L R C LFE Ls Rs Tfl Tfr

to:

L R C LFE Ls Rs Lb Rb


Purpose
The tool remaps Top Front Left/Right (Tfl/Tfr) to Back Left/Right (Lb/Rb) for correct playback on compatible decoders and speaker setups, addressing the incorrect channel layout that occurs when using DEE.

Features
Detects the first E-AC3 syncword (0x0B77).
Modifies each frame to:
Mark it as independent.
Set the fixed channel map (0b0110100000000000).
Recalculate the CRC16.
Saves the patched file as filename.patched.eac3.

Usage

python main.py -i input_file.eac3


Requirements
Python 3.x
colorama (pip install colorama)

Notes
The script is experimental (beta) and for testing purposes only.
Some files may produce invalid output; currently only the test file works correctly.
Part of the code is based on md71: https://github.com/HG3112/md71/blob/main/md71.cpp
Comments, suggestions, or collaboration to improve the tool are appreciated.

Repository
https://github.com/DRX-Lab/eac3-7.1-atmos-layout-corrector/

The script is provided for experimentation with E-AC3 7.1 Atmos tracks. Feedback, testing, and contributions are welcome :)

bredboi
29th December 2025, 17:32
you know this is something i've wondered getting these 8ch DDP Atmos outputs, is it actually 7.1, or is it intended to be 5.1.2? the official documentation ive read isn't clear on this topic, but surely Dolby's official tools wouldn't incorrectly label the channels like this?

DRX-Lab
11th January 2026, 08:59
Good question. These 8-channel E-AC-3 Atmos streams are not 5.1.2. In E-AC-3 JOC, Atmos is carried on a 7.1-compatible channel bed with object metadata on top.

Dolby’s tools are not wrong, but many non-Dolby decoders misinterpret the Tfl/Tfr chanmap and route it as height channels. This tool only fixes the chanmap so those channels are treated as Lb/Rb. The script has since been updated and now works reliably on E-AC-3 7.1 Atmos streams.

DRX-Lab
11th January 2026, 09:04
E-AC-3 7.1 Atmos Channel Map Fix (Tfl/Tfr → Lb/Rb)

Last update: January 11, 2026

Hello,

I am sharing a small Python tool that fixes incorrect channel map metadata in E-AC-3 JOC (Dolby Atmos) 7.1 streams.

It targets streams reported as:


L R C LFE Ls Rs Tfl Tfr


and patches the dependent substream so the layout becomes:


L R C LFE Ls Rs Lb Rb


Notes
- No audio data or Atmos objects are modified
- Only the E-AC-3 dependent substream channel map is corrected
- Intended to fix routing issues on standard 7.1 playback systems

Usage


python main.py -i input.eac3 -o output.eac3


Credits
Parts of the code are based on md71:
https://github.com/HG3112/md71/blob/main/md71.cpp

Repository
https://github.com/DRX-Lab/eac3-7.1-atmos-fix/

Feedback and test samples are welcome.

tebasuna51
12th January 2026, 19:32
Purpose
The tool remaps Top Front Left/Right (Tfl/Tfr) to Back Left/Right (Lb/Rb) for correct playback on compatible decoders and speaker setups, addressing the incorrect channel layout that occurs when using DEE.

And how do you know those channels are incorrect?
The Atmos data may take into account that the TFL-TFR channels are real in order to convert the audio to the speakers connected to the audio system. If we change their location, the conversion may be incorrect.

Are you suggesting that it's a known bug in DEE?

DRX-Lab
13th January 2026, 06:24
And how do you know those channels are incorrect?
The Atmos data may take into account that the TFL-TFR channels are real in order to convert the audio to the speakers connected to the audio system. If we change their location, the conversion may be incorrect.

Are you suggesting that it's a known bug in DEE?

This is not a claim that Dolby Atmos or DEE is incorrect. The issue is how the E-AC-3 JOC 7.1 channel map generated by DEE is interpreted by many non-Dolby decoders, which can cause incorrect routing on standard 7.1 systems.

These streams are 7.1-compatible beds, not 5.1.2 layouts, with Atmos objects handled separately. The correction does not modify audio or Atmos metadata, only the channel map of the dependent substream.

This behavior is also present in official Dolby material, such as the Dolby Atmos Blu-ray Demo Disc (2016), which uses a valid L R C LFE Ls Rs Lb Rb bed in E-AC-3 JOC. This confirms that rear surrounds are correct and expected in Atmos E-AC-3 Blu-ray profiles.

tebasuna51
13th January 2026, 08:55
If what you say is true, that can only be a bug in DEE.

If the channels in the dependent frame are marked as Tfl-Tfr when they should be Lb-Rb, it can only be a bug.
Remember that the Channel-Layout L R C LFE Ls Rs Tfl Tfr is perfectly valid in 8-channel EAC3 without Atmos data. Audition can encode EAC3 with that layout.

oniiz86
15th January 2026, 10:59
There had been some discussion of this behaviour on the Dolby forums https://professionalsupport.dolby.com/s/question/0D5QQ00000Vm7fT0AR/issues-with-channel-layout-when-encoding-dolby-atmos?language=en_US, is it possible at all for both channel layouts to be correct?

This post is interesting, perhaps it may be a bug,

"I am using .atmos master files from this source http://download.opencontent.netflix.com.s3.amazonaws.com/index.html?prefix=SolLevante/protools/
When I try to encode to an EAC3 JOC with the Blu-ray profile (because it provides 7.1 EAC3 with JOC) using DME, I end up with this channel layout: "L R C LFE Ls Rs Tfl Tfr" for 8 channels. However, the original layout without JOC was "L R C LFE Ls Rs Lb Rb".

I also tried many other Atmos master files, but they all result in the same layout.

I want to understand why the main channel layouts are changed when encoding with JOC for 7.1 channels. Also, DME does not offer any option to customize the channel layouts."

SeeMoreDigital
15th January 2026, 11:20
...However, the original layout without JOC was "L R C LFE Ls Rs Lb Rb"."
So this source does not actually contain any Atmos (JOC) meta-data then?

What's this guy wanting to do. Create an 7.1 DD+ encode with Atmos, a 5.1 DD+ encode with Atmos or a 7.1 DD+ encode without Atmos?

bredboi
15th January 2026, 16:44
There had been some discussion of this behaviour on the Dolby forums https://professionalsupport.dolby.com/s/question/0D5QQ00000Vm7fT0AR/issues-with-channel-layout-when-encoding-dolby-atmos?language=en_US, is it possible at all for both channel layouts to be correct?

ah nice find

near the end of the thread:

MichalM (Dolby)
4 months ago
Hi,

According to the standard that you are referring to by design it has been decided for the BluRay case of Dolby Digital Plus to keep coded channels as listed above with the left and right top speakers. While you are using Dolby Atmos Master file as an input this will always be like this. It doesn't mean that those channels you are looking for so the Left and Right back surrounds won't be feed with the signal. It is just organised in other way inside decoder where everything is decoded and then rendered using metadata as JOC or OAMD.

Because of the improvements that are added to the ecosystem results that you get from our software Dolby Media Encoder and Dolby Encoding Engine are the one you experienced while checking results.

so it seems that the intended layout is 5.1.2; considering TrueHD does offer a 7.1 downmix as opposed to 5.1.2, and streaming DDP offers 5.1, I'm assuming that either 7.1 or 5.1.2 are possible 8ch layouts and there's an encoder that was set up to use 7.1 for DDP at some point, but the current versions of Dolby's encoder only use the 5.1.2 layout for some reason or another.

I also did my own test, encoding a 5.1.2 Atmos test signal into TrueHD and DDP with DME (v3.7); they most certainly have different downmixes ( https://ibb.co/j9h3hcbR ). the TrueHD 7.1 downmix matches the 7.1 re-render well (with some swapped channels, the re-renders don't include channel layout metadata) but the DDP downmix looks closer to the 5.1.2 downmix i think, with some additional bleed into the Ls/Rs (which i'm guessing is either to do with the 5.1 AC3 core or to help decoding the objects?)

oniiz86
15th January 2026, 17:15
So this source does not actually contain any Atmos (JOC) meta-data then?

What's this guy wanting to do. Create an 7.1 DD+ encode with Atmos, a 5.1 DD+ encode with Atmos or a 7.1 DD+ encode without Atmos?

So sorry about that I forgot the all important part of that post that provided context, it has since been edited, the concern is creating a 7.1 DD+ encode with Atmos.

Another person that is also baffled by Dolby's decision to change the discrete 7.1 scheme to a 5.1.2 scheme, this is what was said,

"I checked the encoding in Dolby Media Encoder version 3.7.0 today and got the same result. Instead of the two rear channels (Lb and Rb) we have front top channels (Tfl and Tfr) that contain no information. On one of the demo Blu-ray discs I saw an E-AC3 7.1 JOC track with the channel mapping "L R C LFE Ls Rs Lb Rb." I would like to be able to select that exact option."

"I am looking at the text of the ETSI TS 103 420 document on the ETSI website. It is version 1.2.1 from October 2018. This document does not mention Blu-Ray. I also referred to your own demo disc. It is called "Dolby Atmos Blu-Ray Demo Disc" (released in 2016). This disc had a track with the channel configuration I needed. Could you please provide more information about when exactly the changes you are referring to took place and where I can find out more about it? Thank you!

2. Support for Dolby Digital Plus on Blu-ray discs is limited and specific. The only way to use tracks in this format is to get 7.1 sound. I know that modern Blu-ray players with Atmos support can play "5.X + 2" encoded tracks as 7.1. However, many people still have devices without JOC/Atmos support. Even if our home theater system has front top speakers, there is no information in the top two channels, so we have regular 5.1.

3. Using the "5.X + 2" scheme instead of "7.X" wastes bitrate for encoding two empty channels. However, this does not improve the sound quality of the Atmos mix. What is the point of using this particular encoding scheme? Atmos/JOC encoding is only possible with DEE and DME encoders. So I and other users of your software would like all the features provided by the specification."

"Regarding compatibility and older devices. I want to understand what led to this choice of standard encoding scheme for E-AC3 JOC for Blu-Ray. The option you offered on early demo discs allowed for Atmos and a full (discrete) 7.1 option for older devices without Atmos support at the same time. However, the option you are offering now limits owners of older devices without Atmos support to a 5.1 scheme. What is the reason for this choice and why is it currently the only option?"

tebasuna51
16th January 2026, 09:59
In my opinion, 7.1 2D audio (L R C LFE Ls Rs Lb Rb) was introduced to sell new equipment and speakers without improving the original 5.1 system in any way.

Since we only have one ear on each side of our head, it can be mathematically demonstrated that 2D audio can be reproduced just as effectively with 5.1 as with 7.1.

In less than 1% of a movie's runtime, we need more volume (4 speakers) for surround sound than for front speakers (3 speakers).

We're wasting power (and bitrate) with 7.1 2D audio.

It's time we forget the obsolete 7.1 and, if we want 3D audio, adopt the eight channels in 5.1.2 3D. Obviously, if we don't have a 3D source, it's pointless to try to generate Atmos audio since the upper channels will be empty.