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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Sep 2025
Posts: 4
|
E-AC3 7.1 Atmos Channel Layout Correction (Tfl/Tfr → Lb/Rb) Beta
Hello everyone,
I have developed a Python script to correct the channel layout of E-AC3 7.1 Atmos tracks. The script converts: Code:
L R C LFE Ls Rs Tfl Tfr Code:
L R C LFE Ls Rs Lb Rb 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 Code:
python main.py -i input_file.eac3 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-...out-corrector/ The script is provided for experimentation with E-AC3 7.1 Atmos tracks. Feedback, testing, and contributions are welcome
|
|
|
|
|
|
#2 | Link |
|
Registered User
Join Date: Dec 2022
Posts: 15
|
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?
|
|
|
|
|
|
#3 | Link |
|
Registered User
Join Date: Sep 2025
Posts: 4
|
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. |
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Sep 2025
Posts: 4
|
E-AC-3 JOC 7.1 Atmos Channel Layout Correction (Tfl/Tfr → Lb/Rb)
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: Code:
L R C LFE Ls Rs Tfl Tfr Code:
L R C LFE Ls Rs Lb Rb - 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 Code:
python main.py -i input.eac3 -o output.eac3 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. |
|
|
|
|
|
#5 | Link | |
|
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 7,366
|
Quote:
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? |
|
|
|
|
|
|
#6 | Link | |
|
Registered User
Join Date: Sep 2025
Posts: 4
|
Quote:
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. |
|
|
|
|
|
|
#7 | Link |
|
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 7,366
|
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. |
|
|
|
|
|
#8 | Link |
|
Registered User
Join Date: Oct 2019
Posts: 92
|
There had been some discussion of this behaviour on the Dolby forums https://professionalsupport.dolby.co...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....ante/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." Last edited by oniiz86; 15th January 2026 at 17:06. |
|
|
|
|
|
#9 | Link | |
|
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,402
|
Quote:
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?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 15th January 2026 at 11:40. |
|
|
|
|
|
|
#10 | Link | ||
|
Registered User
Join Date: Dec 2022
Posts: 15
|
Quote:
near the end of the thread: Quote:
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?) |
||
|
|
|
|
|
#11 | Link | |
|
Registered User
Join Date: Oct 2019
Posts: 92
|
Quote:
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?" Last edited by oniiz86; 15th January 2026 at 17:17. |
|
|
|
|
|
|
#12 | Link |
|
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 7,366
|
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. |
|
|
|
![]() |
| Tags |
| 7.1 atmos, beta, channel layout, e-ac3, python |
| Thread Tools | |
| Display Modes | |
|
|