View Full Version : Looking for a eac3 7.1 encoder
guest
26th August 2021, 08:41
Seeing as the title of this thread is "Looking for a eac3 7.1 encoder", I figure this is on-topic:
Building on my idea above, I wrote a UNIX/macOS only bash script that manages various audio conversions in MKVs using FFmpeg/FFprobe and EasyAudioEncoder (TrueHD 7.1/DTS MA 7.1 to EAC3 7.1 encoding included). It requires some resource gathering from your Plex installation on your machine to the script’s folder, but once setup its fairly powerful and straight forward. Script and instructions are macOS only, though with some tweaking of the script, and a little exploration of your Plex installation, you could probably configure it on Linux.
Requires up-to-date Plex Media Server, FFmpeg, and FFprobe (as of writing).
https://github.com/ymgenesis/AudioTool
Why not a Windows build ???
ymgenesis
28th August 2021, 14:38
Because I don't develop/script for Windows. No experience. The script and concept is open on Github. If someone has the necessary experience they can adapt it.
Lollaskates
5th September 2021, 08:09
EasyAudioEncoder appears to use MainConcept's Dolby Digital Plus Pro SDK, statically compiled. Pretty neat.
bokeron2020
8th September 2021, 01:24
EasyAudioEncoder appears to use MainConcept's Dolby Digital Plus Pro SDK, statically compiled. Pretty neat.
In Plex Media Server for Windows it looks like they've compiled a custom ffmpeg with eae encoder/decoder enabled ("Plex Transcoder.exe"), though it needs dlls.
Is it the same thing?
Balling
16th September 2021, 09:24
In Plex Media Server for Windows it looks like they've compiled a custom ffmpeg with eae encoder/decoder enabled ("Plex Transcoder.exe"), though it needs dlls.
Is it the same thing?
Yes. It is -c:a eac3_eae, truehd_eae. See: https://github.com/ymgenesis/AudioTool/blob/904d3f56abd13e01857a686deb611a0ef8103e8f/audiotool.sh#L333
Lollaskates
17th September 2021, 14:52
The ffmpeg in the transcoder is old, and it doesn't decode dtshdma 7.1 :(. After testing of it's decoding and looking at the resulting audio, its only decoding 5.1 DTS core. This also means when plex thinks its transcoding DTSHDMA -> AAC 7.1, its actually taking 5.1 DTS and upmixing it to 7.1 (probably just copying the side channels to rear). Modern ffmpeg does decode DTSHDMA correctly, so to maintain all channels we can decode 7.1 dtshdma to FLAC or similar lossless with modern ffmpeg, then input the FLAC to Plex transcoder/eae to encode 7.1 EAC3.
eae doesn't seem to respect the bitrate you set with ffmpeg args, it'll always encode at 1024kbps. I'm looking into it too.
I've also written a windows equivalent in powershell (that accepts args) and has an accompanying batchfile with drag and drop functionality. It only works with audio: drop in audio and get out eac3 7.1. that's all I'd use it for, I'd use modern ffmpeg for any other operation. There's no need to pass the transcoder ffmpeg video related information, can just do simple audio conversion.
truehd_eae seemed to decode and produce the same file that modern ffmpeg decodes with its truehd codec, so no issue there. The only useful thing here imo is eac3_eae. After I polish up this powershell implementation i'll look into hooking it nicely into Staxrip or something for ease of use.
ymgenesis
1st October 2021, 02:49
The ffmpeg in the transcoder is old, and it doesn't decode dtshdma 7.1 :(. After testing of it's decoding and looking at the resulting audio, its only decoding 5.1 DTS core. This also means when plex thinks its transcoding DTSHDMA -> AAC 7.1, its actually taking 5.1 DTS and upmixing it to 7.1 (probably just copying the side channels to rear). Modern ffmpeg does decode DTSHDMA correctly, so to maintain all channels we can decode 7.1 dtshdma to FLAC or similar lossless with modern ffmpeg, then input the FLAC to Plex transcoder/eae to encode 7.1 EAC3.
Bummer. I had a feeling it was too good to be true when it just seemed to work in the same manner as TrueHD. Maybe Plex will update this one day. I use/rip TrueHD 7.1 sources whenever I can, so it doesn't affect me too much. Plus, my LG TV doesn't support DTS at all, so a 5.1 upmix to 7.1 isn't that bad at the moment.
eae doesn't seem to respect the bitrate you set with ffmpeg args, it'll always encode at 1024kbps. I'm looking into it too.
I noticed this as well when I tried to up the quality to see if it would change the poor audio limiting in some instances.
The only useful thing here imo is eac3_eae. After I polish up this powershell implementation i'll look into hooking it nicely into Staxrip or something for ease of use.
Very cool!
tebasuna51
1st October 2021, 08:56
... so a 5.1 upmix to 7.1 isn't that bad at the moment.
I can't understand, upmix 5.1 to 7.1?
Any AVR 7.1 do so on the fly without need a previous upmix wasting time and space.
I noticed this as well when I tried to up the quality to see if it would change the poor audio limiting in some instances.
Poor quality with a bitrate of 1024 Kb/s?
With 640 Kb/s is already 'transparent' for many speakers and ears.
BTW I can help to do a GUI if there are a free eac3 (for windows) encoder with 7.1 support.
ymgenesis
3rd October 2021, 15:30
Poor quality with a bitrate of 1024 Kb/s?
With 640 Kb/s is already 'transparent' for many speakers and ears.
To elaborate, EasyAudioEncoder limits/compresses loud audio (much like a limiter, compressor, or maximizer in audio production does). In some particularly loud instances it can cause some awful volume fluctuation/flutters. I originally thought it was a side effect of the bitrate, however I learned it was the encoder's normalization process itself. More here (https://forums.plex.tv/t/striking-volume-fluctuation-pulsing-artifacts-when-converting-truehd-7-1-to-eac3-7-1/737767).
BTW I can help to do a GUI if there are a free eac3 (for windows) encoder with 7.1 support.
I guess EasyAudioEncoder is technically free, but it is packaged and licensed to Plex Media Server and its users. It requires a license file that comes with the installation. So while not exactly a paid tool, it is still licensed. Also, I paid for PlexPass, so I'm not 100% sure if its available to free users. Maybe someone can confirm this.
tebasuna51
3rd October 2021, 18:55
About your post in plex forum:
- The -filter_complex' '[0:a:0] aresample=async=1:ocl='\''7.1''\'':rematrix_maxval=60.000000dB:osr=48000[0]' '-map' '[0]'
do absolutly nothing over the TrueHD decoded audio because is already 7.1 and 48 KHz. Don't exist resample or rematrix.
[- I can't know if there are fluctuations but in your sample the EAC3 7.1 is -15 dB less volume than TrueHD or EAC3 5.1 track.
The sample have high volume but without clip and a encoder with this behaviour is usseless to transcode audio tracks.]
- The ffmpeg eac3 track is limited to 5.1 but do a aceptable recode with the same volume than the TrueHD.
EDIT: I was wrong in the second point.
The problem is the DRC data included in the EAC3 stream, the 3 tracks in your MKV play at same level if the player don't apply the Dynamic Range Compression.
Decoded the track with the ffmpeg parameter -drc_scale 0 output the full audio volume.
File: C:\tmp\Bsid12.eac3
Size: 1302528 bytes
----------------------------------------- First Frame Info
StrmTyp .....................: 0 (0=Ind, 1=Dep, 2=AC3)
SubStreamID .................: 0
FrameSize....................: 2292 bytes (573 Kb/s)
SampleRate ..................: 0 (48000 Hz)
NumBlksCod ..................: 3 (6 Blocks)
Audio coding mode (acmod) ...: 7 (3/2 - L, C, R, SL, SR)
Low frequency effects channel: 1 (Present)
Version (bsid) ..............: 12 (Other sintax)
Dialogue normalization ......: -31 dB
Dynamic Range gain ..........: -0.27 dB
Mixing metadata .............: 0 (Not exist)
Informational metadata ......: 0 (Not exist)
Additional Bsi ..............: 0 (Not exist)
----------------------------------------- Revised EAC3 Info
Dyn. Range min/max : -18.06/3.34 dB
Frames Tot/Ind/AC3.: 636 / 318 / 0
Bitrate average... : 1024 Kb/s
Duration ..........: 10176 ms (0 h. 0 m. 10.176 s.)
------------------------------------------------- End Info
Like you can see the DRC force to attenuate the volume until -18 dB or amplify 3 dB, it's normal listen fluctuations.
Then the problem in the PLEX forum is solved configuring the player to don't apply DRC (like is always recommended, use 'Night mode' or similar in the AVR)
tebasuna51
3rd October 2021, 23:35
Other problem with the EAC3 generated by EasyEncoder.
If you load the sample.mkv in MKVToolNix the EAC3 7.1 is not recognized.
By eac3to:
sample.mkv:
------------------------------------------------------------------------------
MKV, 1 video track, 3 audio tracks, 0:00:10, 24p /1.001
1: h265/HEVC, English, 3840x1600 24p /1.001 (12:5), 10 bits
2: TrueHD (Atmos), English, 7.1 channels, 48kHz, 5ms "TrueHD 7.1"
3: EAC3, English, 7.1 channels, 32 bits, 48kHz, 5ms "EAC3 7.1 from TrueHD"
4: EAC3, English, 5.1 channels, 16 bits, 48kHz "EAC3 640kbps"
But the mkvmerge -i (info) show:
File 'C:\Temp\audacity_temp\sample.mkv': container: Matroska
Track ID 0: video (HEVC/H.265/MPEG-H)
Track ID 1: audio (TrueHD Atmos)
Track ID 3: audio (E-AC-3)
The track ID 2 is not recognized.
Maybe is because all the frames have the header field 'bsid' with the value 12. The well know values are: 8 for Standard Syntax, 6 for Alternate Syntax and 16 for Enhanced Syntax.
But is a valid value:
Annex E: Enhanced AC-3
bsid – Bit Stream Identification – 5 Bits
The bsid field has a value of ‘10000’ (=16) for bitstreams compliant with this Annex. Values of bsid smaller than 16 and greater than 10 are used for versions of E-AC-3 which are backwards compatible with version 16 decoders. Decoders which can decode version 16 will thus be able to decode version numbers less than 16 and greater than 10. Additionally, E-AC-3 decoders shall also be able to decode AC-3 bitstreams with bsid values 0 through 8. Decoders compliant with this Annex are not able to decode bit streams with bsid=9 or 10.
ymgenesis
4th October 2021, 16:01
Great research! I definitely don't have the knowledge to do that kind of digging.
I know Plex has issue with compatibility when it comes to these EAC3 7.1 tracks. Also, It uses an older build of ffmpeg/ffprobe which only recognizes these 7.1 tracks as 5.1 in their GUI. During playback they do playback Dolby Digital 7.1. The current versions of ffmpeg/ffprobe recognize the tracks as 8 channel (7.1).
Interesting about the DRC. Thanks for that info. I do use "night mode" sometimes in my setup, but it squashes the dynamic range. No more lows as they're basically mixed in to ensure less of an offending output. But, that's what it's supposed to do, so I can't complain.
Also interesting about bsid 12. I noticed eac3to does a good job of recognizing and handling these EasyAudioEncoder-encoded tracks. mkvnix and tsmuxer seem to have some issues handling the tracks. Mediainfo usually shows the right information.
Balling
5th October 2021, 11:59
Great research! I definitely don't have the knowledge to do that kind of digging.
EAC3 and Atmos specs are publically available from ETSI in pdf.
I can paste the docx files which are only available to members though. Atmos metadata in EAC3 is decoded using Hafmann tables which are also available.
https://portal.etsi.org/webapp/workprogram/Report_WorkItem.asp?WKI_ID=52775 here top right corner, pdf, docx, and zip with tables.
tebasuna51
5th October 2021, 12:17
To resume the situation:
To elaborate, EasyAudioEncoder limits/compresses loud audio (much like a limiter, compressor, or maximizer in audio production does). In some particularly loud instances it can cause some awful volume fluctuation/flutters.
Seems EasyAudioEncoder create DRC metadata in eac3 stream with undesired results.
But the problem can be override instructing the player to don't apply DRC to AC3/EAC3 (the only than have these normally, DTS can have also but don't use it).
I always recommend do so on players, we can use instead AVR functions like 'Night mode' than can be applied to any audio, (not only AC3/EAC3) with a button in the remote control instead changing the player configuration.
Seems also than recode only until 1024 Kb/s. But I think is enough
More here (https://forums.plex.tv/t/striking-volume-fluctuation-pulsing-artifacts-when-converting-truehd-7-1-to-eac3-7-1/737767).
The samples you create was using '/usr/lib/plexmediaserver/Resources/Plex Transcoder'? Like it was the old ffmpeg compiled with the EasyEncoder lib.
Do you need to be connected to Internet at this moment? To obtain some permission for instance.
I guess EasyAudioEncoder is technically free, but it is packaged and licensed to Plex Media Server and its users. It requires a license file that comes with the installation.
Then who need recode to eac3 7.1 in windows must install Plex Media Server and then recode it with:
"C:\Program Files (x86)\Plex\Plex Media Server\PlexTranscoder.exe" -i INPUT7.1 -c:a eac3_eae -b:a 1280k OUTPUT.eac3
Where INPUT7.1 can be a TrueHD (if the ffmpeg version is too old maybe need before the input the parameter -c:a:0 truehd_eae) or a DTS-HD (if the ffmpeg version is too old maybe don't support DTS-HD and need a previous decode to .W64/WAV) or a WAV (or W64 if is greater than 4 GB).
Any volunteer to check if is really free?
ymgenesis
5th October 2021, 18:35
The samples you create was using '/usr/lib/plexmediaserver/Resources/Plex Transcoder'? Like it was the old ffmpeg compiled with the EasyEncoder lib.
Do you need to be connected to Internet at this moment? To obtain some permission for instance.
Yes, the sample I created in that post was using the "audiotool" I wrote here (https://github.com/ymgenesis/AudioTool). The command would be the same as I quoted in the Plex forum post. I don't believe an internet connection is needed. On Mac, it requires the structure from here (https://github.com/ymgenesis/AudioTool#dependencies-and-folder-structure). Variables for the Codecs and Encoder folder need to be set properly (folder with dylibs, probably dlls in Windows, and the Plex Transcoder executable). It needs EasyAudioEncoder executable and the license file. This license file is the permission file to be able to use EasyAudioEncoder executable, so I don't think an internet connection is needed. Keep in mind all these resources (including EasyAudioEncoder and its license file) are insalled when installing Plex. They get updated every once and a while when Plex updates. EasyAudioEncoder must be running for the encode to work, as you can see I execute EasyAudioEncoder first in the background here (https://github.com/ymgenesis/AudioTool/blob/904d3f56abd13e01857a686deb611a0ef8103e8f/audiotool.sh#L329) before executing the Plex Transcoder executable here (https://github.com/ymgenesis/AudioTool/blob/904d3f56abd13e01857a686deb611a0ef8103e8f/audiotool.sh#L331) a couple lines later. Of course, this is Unix.
Sorry I can't be more help with Windows. The process isn't exactly clean, as it requires the proper environment variables, and needs a running EasyAudioEncoder instance before executing the Plex Transcoder (ffmpeg) command.
And as I mentioned before, I paid for Plex Pass, which may have allowed me EasyAudioEncoder for 7.1 transcoding when playing on Plex (existence of EasyAudioEncoder and license file). BUT, I don't know that 100%, I actually suspect it is included with the free version. So, if someone wants to try, they can sign up for a free Plex account at plex.tv and download my sample from here (https://www.mediafire.com/file/sicv8mizm2tsnov/sample.mkv/file) (same sample as on the Plex forums), add it to your server once setup, and see if it'll transcode the first audio track (TrueHD) to EAC3 7.1 when playing back on your 7.1-capable TV/box & AV setup. If it does, EasyAudioEncoder exists and can be used in a manner like my "audiotool".
Krautmaster
18th October 2021, 19:00
tried the same with my plexserver and get this:
C:\Program Files (x86)\Plex\Plex Media Server\Plex Transcoder.exe" -i "C:\tmp\cut.mkv" -map v:0 -map a:0 -c:v copy -c:a:0 eac3_eae -b:a:0 1280k plex_convert.mkv
[truehd_eae @ 02a6f400] No EAE watchfolder set!
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (truehd (truehd_eae) -> eac3 (eac3_eae))
Error while opening decoder for input stream #0:1 : Generic error in an external library
ideas?
tebasuna51
18th October 2021, 22:33
@Krautmaster
Sorry, seems don't work because:
...
Sorry I can't be more help with Windows. The process isn't exactly clean, as it requires the proper environment variables, and needs a running EasyAudioEncoder instance before executing the Plex Transcoder (ffmpeg) command...
Milka
23rd November 2021, 22:55
so, Is Dolby software (Dolby suite and Dolby encoding engine) the only apps for encode 7.1 DD+ (in any bitrate) for now?
filler56789
24th November 2021, 05:51
so, Is Dolby software (Dolby suite and Dolby encoding engine) the only apps for encode 7.1 DD+ (in any bitrate) for now?
OR ""any"" :rolleyes: Dolby-licensed software, such as Rovi's TotalCode Studio.
szabi
18th December 2021, 20:16
This 7.1ch DD+ encoding does not developing quickly.
My first post near 6 years old (https://forum.doom9.org/showpost.php?p=1754063&postcount=170) asking it.
FuzzyNutz
2nd February 2022, 22:39
Adobe Audition 2018 and below includes support for EAC3 encoding up to 7.1 1024 Kbps, but is not Blu-ray compatible.
AC3/EAC3 encoders are not present in the 2018 version of Adobe Audition. They're in the 2017 version. Apparently, getting the 2017 version from Adobe, at present, will yield a version that has had the Dolby encoders removed. Thus, acquiring an existing version of Adobe Audition 2017, or possibly earlier, may be necessary.
The 2017 version can encode 7.1 EAC3 up to 1024. It can also enable the surround EX flag for AC3 and EAC3. Audition's Dolby encoding is accessible via File -> Export -> File, after double-clicking the loaded source file. The plethora of studio-level configuration options suggests Audition's AC3/EAC3 encoders are the no-compromise, professional version(s).
Lossless sources in TrueHD and dts-HD formats won't load into Audition, but .w64 and FLAC versions, created with eac3to or similar, will.
Audition outputs EAC3 files with .ec3 extensions. Though the .ec3 will need to be changed to .eac3 to be recognized by some software, MKVToolNix correctly outputs EAC3 tracks from .ec3 or eac3. Matroska files containing EAC3, including 7.1, created with Audition, are playable with VLC, MPC-HC, KODI, Microsoft Movies & TV and Windows Media Player. -My playback tests were done on various Windows 10 PCs outputting in 2-channel stereo via HDMI and DisplayPort.
tebasuna51
3rd February 2022, 20:00
I make a test with the EAC3 encoder in Audition 2017.
Like FuzzyNutz say we can access it with the menu: File -> Export -> Export File
And we can configure all settings like I explain here (see the attached image) with some considerations:
3) Change Sample type
By default put 5.1 and we need change to Same as source for 7.1 EAC3 output.
But seems there are a bug and we need remap (swap BL-BR with SL-SR) the input file to obtain a correct channel mapping output.
If we want recode a DTS-MA 7.1 we need obtain a remaped W64 file for instance with eac3to:
eac3to 8v341.dtshd 8v341.dtshd_R.w64 -0,1,2,3,6,7,4,5
5) Codec Mode: only Dolby Digital Plus can output eac3 7.1 and not BluRay compliant. The rest if for AC3 until 5.1
6) Channel Configuration: the standard wav 7.1 order is FL,FR,FC,LFE,BL,BR,SL,SR to output L R C LFE Ls Rs Rls Rls we need the remap mentioned in 3)
7) The max bitrate offered is 1024 like was already mentioned.
8) Pre-Procesing: there are other values by default, but if we are recoding from a source already processed maybe is better uncheck all the options.
9) Dynamic Range Control: by default is Film Standard, but I recommend set to None to avoid volume problems already mentioned in this thread.
Other settings can be let at defaults.
FuzzyNutz
4th February 2022, 00:28
tebasuna51:
Should all 7.1 w64 files, (to be encoded in EAC3 7.1 with Adobe Audition 2017), be remapped regardless of whether the source was dts-ma, TrueHD, FLAC, LPCM etc.?
Have you confirmed Audition's Dolby encoding is not automatically remapping (map correcting) when creating EAC3 7.1 from w64?
tebasuna51
4th February 2022, 00:39
Must be remaped always, seems a problem with the Audition included encoder, can't recognize the standard WAV/W64 channel order FL,FR,FC,LFE,BL,BR,SL,SR and asign BL,BR to Ls,Rs instead to Rls,Lls.
FuzzyNutz
4th February 2022, 01:04
Must be remaped always, seems a problem with the Audition included encoder, can't recognize the standard WAV/W64 channel order FL,FR,FC,LFE,BL,BR,SL,SR and asign BL,BR to Ls,Rs instead to Rls,Lls.
Off thread topic yet related, I've assumed eac3to remaps as needed. Is this correct?
tebasuna51
4th February 2022, 01:16
Nope, it is not a eac3to job (maybe only for LPCM) the decoders (libav, arcsoft, ...) must decode to standard WAV/W64 channel order and the encoders (libaften, libflac and externals like ffmpeg) must know that order and convert to internal channel order of the codec.
We only need remap when a decoder or encoder is wrong.
Here Audition show the correct WAV/W64 channel order, but the encoder don't correct the order to the internal order.
FuzzyNutz
4th February 2022, 01:24
Nope, it is not a eac3to job (maybe only for LPCM) the decoders (libav, arcsoft, ...) must decode to standard WAV/W64 channel order and the encoders (libaften, libflac and externals like ffmpeg) must know that order and convert to internal channel order of the codec.
Therefore, effectively, eac3to conversions, (from dts-ma, TrueHD, wav, w64, flac to ac3, aac, flac etc.), are remapped as needed?
tebasuna51
4th February 2022, 02:22
All eac3to decoders (libav, libdcadec.dll, arcsoft,...) output correct WAV/W64 channel mapping, and all eac3to encoders (libaften, libflac, neroAacEnc.exe) read that channel order and change to internal equivalent channel order.
Also, if you use external decoders (ffmpeg.exe, flac.exe, Lame.exe, NeroAacDec.exe, opusdec.exe, oggdec.exe, wma2wav.exe, and others) always can output WAV/W64 with the correct channel order, no mather the internal channel order of the codec.
And, if you use external encoders (fdkaac.exe, ffdcaenc.exe, ffmpeg.exe, flac.exe, lame.exe, neroAacEnc.exe, oggenc2.exe, opusenc.exe, qaac.exe, and others) always accept WAV/W64 files and know the input channel order, and is a job of the encoder convert to internal order if is different.
tebasuna51
4th February 2022, 02:55
To test the correct channel order you can use a Channel test like the attached.
Obtain a w64 with:
ffmpeg -i "7.1_Channels.aac" -acodec pcm_s24le "7.1_Channels.w64"
And encode the w64 with EAC3 Audition 2017
Now remap and encode:
ffmpeg -i "7.1_Channels.aac" -filter_complex "pan=7.1|c0=c0|c1=c1|c2=c2|c3=c3|c4=c6|c5=c7|c6=c4|c7=c5" -acodec pcm_s24le "7.1_Channels_R.w64"
And listen the two eac3 in a 7.1 audio system.
FuzzyNutz
4th February 2022, 03:08
To test the correct channel order you can use a Channel test like the attached.
Obtain a w64 with:
ffmpeg -i "7.1_Channels.aac" -acodec pcm_s24le "7.1_Channels.w64"
And encode the w64 with EAC3 Audition 2017
Now remap and encode:
ffmpeg -i "7.1_Channels.aac" -filter_complex "pan=7.1|c0=c0|c1=c1|c2=c2|c3=c3|c4=c6|c5=c7|c6=c4|c7=c5" -acodec pcm_s24le "7.1_Channels_R.w64"
And listen the two eac3 in a 7.1 audio system.
I got rid of my 5.1/7.1 setups. My rigs are 2.0/2.1. I'll assume you've confirmed the mapping of Audition's 7.1 w64 to EAC3. -Despite my stereo setups, I don't downmix my encodes to stereo.
Thank you for your insight and efforts.
FuzzyNutz
4th February 2022, 03:48
The option to enable the surround EX mode is available for ac3 and eac3, in Adobe Audition (2017), whether the source is 5.1, 6.1 or 7.1 and whether the output of eac3 is 5.1, 6.1 or 7.1. So... what is the EX accomplishing, especially when the source is 5.1?
junh1024
4th February 2022, 04:40
AFAIK It just enables a flag to tell your AVR it's EX, so it can treat the sound accordingly.
FuzzyNutz
4th February 2022, 04:53
AFAIK It just enables a flag to tell your AVR it's EX, so it can treat the sound accordingly.
What does that accomplish if the source is 5.1?
tebasuna51
4th February 2022, 10:06
From the manual:
D2.3.8 dsurexmod: Dolby Surround EX Mode, 2 bits
This 2-bit code, as shown in Table D2.7, indicates whether or not the program has been encoded in Dolby Surround EX.
This information is not used by the AC-3 decoder, but may be used by other portions of the audio reproduction equipment.
If dsurexmod is set to the reserved code, the decoder should still reproduce audio. The reserved code may be interpreted as “not indicated”.
Table D2.7 Dolby Surround EX Mode
dsurexmod Indication
--------- -----------------------------
'00' Not indicated
'01' Not Dolby Surround EX encoded
'10' Dolby Surround EX encoded
'11' Reserved
Note: The meaning of this field is only defined as described if the audio coding mode is 2/2 or 3/2.
If the audio coding mode is 1+1, 1/0, 2/0, 3/0, 2/1 or 3/1 then the meaning of this field is reserved.
The Dolby Digital EX format is similar to Dolby Digital. It's used in the same way, but it adds a third surround channel speaker behind the listener, making it a 6.1 channel system.
The channels are represented by six speakers (left, [center], right, left surround, center back, and right surround) and a subwoofer
If the audio equipment is 6.1 or 7.1, and have the Dolby Digital EX decoder , can extract the BC channel from the Surround Channels.
Of course the source must be encoded previously like Dolby Digital EX, the AC3/EAC3 encoder can't do that job.
Here (7.1) is useless and with 5.1 only if the source was previously a Dolby Digital EX.
FuzzyNutz
4th February 2022, 21:32
Of course the source must be encoded previously like Dolby Digital EX, the AC3/EAC3 encoder can't do that job.
Here (7.1) is useless and with 5.1 only if the source was previously a Dolby Digital EX.
Did you intent to say "the AC3/EAC3 decoder can't do that job"? and What are sources that were previously EX?
If the encoder doesn't require a source with more than 5.1 channels for EX to be enabled and subsequently, the creation of a back center by an A/V receiver, why not enable the EX flag for all AC3/EAC3 5.1 encodes?
tebasuna51
5th February 2022, 01:28
Did you intent to say "the AC3/EAC3 decoder can't do that job"?
Nope, the AC3/EAC3 encoder need a 5.1 with the Ls-Rs previously obtained from 3 surround channels Ls-Bs-Rs. The original source must be 6.1
After decode the AC3/EAC3 to 5.1, if the receiver (6.1 at least) read the EX flag and have a Dolby Ex decoder the Bs channel is recovered.
https://en.wikipedia.org/wiki/Dolby_Digital#Dolby_Digital_EX
writemaster
5th February 2022, 12:41
hi tebasuna51
Is it possible to make DD-EX audio from lossless 7.1 audio?
There is no guide for this unfortunately. If you have information on this subject, I would appreciate it if you could please explain it with an illustrated guide. thank you very much for all your efforts
Adobe Audition Thank you very much for the guide.
tebasuna51
5th February 2022, 13:19
Just some info about the 3/4 (L R C LFE Ls Rs Vhl Vhr) EAC3 encode mode.
I have a minimal '3D' Surround audio system with speakers like the image1 attached. The receiver (7.1) is configured like a 3front/2surround/2top.lfe
When play a EAC3 encoded like (L R C LFE Ls Rs Vhl Vhr) I can listen the Vhl Vhr channels with my FDL,FDR speakers.
To encode, with Audition 2017, a WAV/W64 file 2/2/2.1 (FL FR FC LFE SL SL TFL TFR, mask channel 0x560F=22031) to EAC3 (L R C LFE Ls Rs Vhl Vhr) we don't need remap the source.
But when play a standard 7.1 (L R C LFE Ls Rs Rls Rrs) I listen the channels Ls,Rls by the speaker SL and Rs,Rrs by speaker SR, and the FDL,FDR speakers are mute, like is the correct behaviour, and enough for me for a 2D surround.
To make test over (L R C LFE Ls Rs Rls Rrs) I need deceive the receiver and configure the system like image2 to listen Rls,Rrs with my FDL,FDR speakers.
Then the (L R C LFE Ls Rs Vhl Vhr) mode can be used instead Atmos/DTS:X for a basic 3D (enough for me) surround system (3/2/2.1)
tebasuna51
5th February 2022, 13:45
Is it possible to make DD-EX audio from lossless 7.1 audio?
It is possible but I don't know for what.
Only 6.1 audio systems can obtain a little less size recoding a 5.1 EX instead a pure 6.1. It is not recommended.
For 5.1 systems I recommend the standard downmix already explained (https://forum.doom9.org/showthread.php?p=1920201#post1920201).
After that downmix to 5.1 you can encode it like EX if you want, but is usseless for 2D surround:
- In a 5.1 system you listen the common parts in SL,SR channels like a phantom BS channel.
- In a 6.1 system the common parts in SL,SR channels are extracted and sended to BS speaker.
- In a 7.1 system the common parts in SL,SR channels are extracted and half volume are sended to BL,BR speakers.
You listen the same in all systems, with or without encode like EX.
junh1024
6th February 2022, 05:22
Just to add on what tebasuna51 said, let's say you have a 51EX track.
Q: How do you know it was made from a genuine 61/71 source?
A: you can't, unless a proper 61/71 release was made. It's possible to flag a traditional 51 source, or a real 61 source, as EX. You may or may not get a discrete sounding BC when you decode. It could be coincidental, or good mixing, you can't be sure.
As for encoding 51EX from 71, the actual gain could vary a lot since it's possible to make audio which conflicts or makes the EX encoding useless. Any down-matrixing loses information, so it's suggested to retain the original channel count. It's also possible to have 71 audio which is 51 downmix incompatible (eg, original BD of The Lion King).
FuzzyNutz
4th March 2022, 23:15
Must be remaped always, seems a problem with the Audition included encoder, can't recognize the standard WAV/W64 channel order FL,FR,FC,LFE,BL,BR,SL,SR and asign BL,BR to Ls,Rs instead to Rls,Lls.
Audition accepts some flac input files. Would 7.1 flac files need to be created with the same remapping required for 7.1 wav/w64 files?
tebasuna51
5th March 2022, 04:12
Audition accepts some flac input files. Would 7.1 flac files need to be created with the same remapping required for 7.1 wav/w64 files?
Yes, the problem is not when Audition read the input file (tested ok with wav, w64 and flac) but when the encoder fail to remap the channels to the internal eac3 channel order.
FuzzyNutz
5th March 2022, 17:08
Yes, the problem is not when Audition read the input file (tested ok with wav, w64 and flac) but when the encoder fail to remap the channels to the internal eac3 channel order.
Therefore, 7.1 flac channel order is the same as wav/w64?
tebasuna51
6th March 2022, 10:25
Yes, from https://xiph.org/flac/format.html#format_overview
FRAME_HEADER
...
Channel assignment
0000-0111 : (number of independent channels)-1. Where defined, the channel order follows SMPTE/ITU-R recommendations. The assignments are as follows:
1 channel: mono
2 channels: left, right
3 channels: left, right, center
4 channels: front left, front right, back left, back right
5 channels: front left, front right, front center, back/surround left, back/surround right
6 channels: front left, front right, front center, LFE, back/surround left, back/surround right
7 channels: front left, front right, front center, LFE, back center, side left, side right
8 channels: front left, front right, front center, LFE, back left, back right, side left, side right
is the same than WAV/W64 and is read in the same order correctly by Audition, but when the EAC3 encoder make a 'L R C LFE Ls Rs Rls Rrs' must asign 'back left, back right' to 'Rls Rrs' instead to 'Ls Rs'
tormento
8th April 2022, 14:02
I finally put my hands on TotalCode Studio, that I can admit produces very nice quality Dolby Digital Plus files but it's really slow.
I have two questions for the "audio specialists" here.
Unfortunately it's really picky about the audio format it can ingest and doesn't support something as THD at all or DTS when not in a "commercial" container, so the only idea I had for now was to use ffmpeg and convert THD and DTS to WAV(s) with the command line
ffmpeg.exe" -i "input.thd" -rf64 auto "output.wav"
but thus I lose both metadata and channel order.
TotalCode has 2 configuration panels:
https://i3.lensdump.com/i/rhSGii.png (https://lensdump.com/i/rhSGii)
https://i.lensdump.com/i/rhSa9o.png (https://lensdump.com/i/rhSa9o)
Do you have any hint to correctly use it with the various audio streams that I can encounter?
filler56789
8th April 2022, 14:07
Try eac3to instead of ffmpeg.
richardpl
8th April 2022, 16:49
eac3 is not supporting 7.1
tebasuna51
8th April 2022, 17:30
but thus I lose both metadata and channel order.
Atmos metadata of course is losed but the channel order is correctly stored in ChannelMask of WAVE_FORMAT_EXTENSIBLE header of WAV/W64/RF64 (FL FR FC LF BL BR SL SR) for 7.1
If the encoder of TotalCode Studio can't read the ChannelMask of input files, like seems do the encoder of Adobe Audition you must use the same remap with eac3to (https://forum.doom9.org/showthread.php?p=1963144#post1963144) or ffmpeg (https://forum.doom9.org/showthread.php?p=1963170#post1963170)
Do you have any hint to correctly use it with the various audio streams that I can encounter?
You must know the source, with MediaInfo for instance, and read this (https://mediaarea.net/AudioChannelLayout)
Simplified and in the wav order:
MediaInfo WAV EAC3 DTS
--------- --- --- ---
Front Left L FL L L
Front Right R FR R R
Front Center C FC C C
Low-frequency Effects LFE LFE LFE LFE
Rear Left Surround Lb BL Lrs Lsr
Rear Right Surround Rb BR Rrs Rsr
Front Left Center Lc FLC Lc Lc
Front Right Center Rc FRC Rc Rc
Back Centre Cb BC Cs Cs
Surround Left Ls SL Ls Ls
Surround Right Rs SR Rs Rs
Top Centre Tc TC Ts Oh
Top Front Left Tfl TFL Vhl Lh
Top Front Centre Tfc TFC Vhc Ch
Top Front Right Tfr TFR Vhr Rh
Top Back Left Tbl TBL Lhr
Top Back Centre Tbc TBC Chr
Top Back Right Tbr TBR Rhr
In a 7.1 wav standard the channels 4-5 are Lrs-Rrs, and channels 6-7 are Ls-Rs
tebasuna51
8th April 2022, 17:35
eac3 is not supporting 7.1
We are talking about TotalCode Studio and Adobe Audition like encoders.
eac3to can decode Thd/DTSHD 7.1
tormento
8th April 2022, 19:05
In a 7.1 wav standard the channels 4-5 are Lrs-Rrs, and channels 6-7 are Ls-Rs
Thank you, I will apply on my next encode :)
Can you please complete the table with THD, DTS and PCM up to 7.1?
And the most important question: does FFMPEG honor that order when decoding to WAV?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.