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.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st March 2025, 09:20   #1  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
Encode to 7.1 eac3 for free and volume adjustment

I'm trying to find a way to encode to 7.1 eac3 using free tools, so I tryed to reorganize the info available in this thread https://forum.doom9.org/showthread.php?t=177346.

Note: for the analysis, I refer to the doc here: https://www.atsc.org/atsc-documents/...dard-12172012/

PROCEDURE DESCRIPTION (WINDOWS 10/11)

- Go to Plex Website-->Download (up on the right)-->For Desktop

- Choose Plex (NOT Plex Media Server) and download the .exe setup

- That .exe is a self-extracting installer. You can install it but it is not mandatory. If you have 7zip, you can right-click on it and select "extract to folder..."

- Make a new folder e.g. on Desktop and copy
- Plex Transcoder.exe
- avfilter-8.dll
- avcodec-59.dll
- avformat-59.dll
- swresample-4.dll
- swscale-6.dll
- avutil-57.dll
- libc++.dll
- libunwind.dll

- The old Plex folder is no longer needed. You can delete it after checking this procedure is ok

- Rename Plex Transcoder.exe in Plex_Transcoder.exe, just to remove annoying spaces

- Download from https://forum.doom9.org/showthread.php?t=177346&page=10 , Balling message of 13 September 2022, EasyAudioEncoder.exe and modify it, or download the already modified version from github (they only differs for those two bytes). Put it together with the other files.

- Plex Transcoder is somewhat an old version of ffmpeg which can interact with eae to produce eac3 output. It is poor in decoding, so feed it with pcm stuff (wav or w64)

- Create this .bat and launch it
Code:
start easyaudioencoder
timeout /t 2
Plex_Transcoder.exe -y -bitexact -i input71.w64 -c:a eac3_eae -eae_root . -bitexact output.eac3
rem close EasyAudioEncoder manually
pause
EDIT: there are some errors in eae but the output seems to be ok.

OUTPUT ANALYSIS
Code:
General
Complete name                            : .\output.eac3
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
File size                                : 1.34 MiB
Duration                                 : 11 s 8 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 024 kb/s

Audio
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Duration                                 : 11 s 8 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 024 kb/s
Channel(s)                               : 8 channels / 6 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb / L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 1.34 MiB (100%)
Service kind                             : Complete Main
Dialog Normalization                     : -31 dB
compr                                    : -0.28 dB
dialnorm_Average                         : -31 dB
dialnorm_Minimum                         : -31 dB
dialnorm_Maximum                         : -31 dB

ReportBy                                 : MediaInfoLib - v24.12
- The bitrate is 1024k and it cannot be setted, or I'm not able to set it.
- The output file seems to be ok but a little low on volume, but more than 0.28dB. I can restore the volume via ffmpeg decoding to pcm with drc_scale 0. Is it fault of the compr field? Reading the forum, it seems to be a problem of the dee encoder too.
- Checking for 0B 77 occurrence with an hex editor, it seems that there are two interleaved streams with fixed size frames. The first one is about 576kbps (2292 B/frame) and the second is 448kbps (1804 B/frames)
For reference, here the first two packets
Code:
0B 77 04 79 3F 67 FF E0 04 00 ... 00 00 00 03 A1 54 83 E1
0B 77 43 85 3A 67 FF F1 A0 00 ... 00 00 00 00 00 00 4C CA
0B 77 04 79 ...
Probably 83E1 and 4CCA are crc, but the auxdata field seems to be strange. Also, there are a lot of wasted 00 at the end of each packet, probably for padding at fixed size frame. Are they necessary for eac3? Can they be removed except for the suggested 16-bit word-padding?

- It is worth trying to remove, or set to zero, the compr field? I could try to do that following Tebasuna scripts for adjusting DN. Has anybody tried it?
- As a (very) long term goal I would like to create a 7.1 eac3 with 5.1 embedded ac3 from 7.1 input with backward compatibility. Is there any reference and examples on how to do that practically? I've seen that you can specify mix option in the secondary stream.

Last edited by hellgauss; 21st March 2025 at 10:07.
hellgauss is offline   Reply With Quote
Old 21st March 2025, 13:48   #2  |  Link
TR-7970X
Registered User
 
TR-7970X's Avatar
 
Join Date: Jan 2025
Posts: 53
Quote:
Originally Posted by hellgauss View Post
I'm trying to find a way to encode to 7.1 eac3 using free tools, so I tryed to reorganize the info available in this thread https://forum.doom9.org/showthread.php?t=177346.

Note: for the analysis, I refer to the doc here: https://www.atsc.org/atsc-documents/...dard-12172012/
That sounds VERY interesting, but this can also do it (and so much more) for free, too

https://forum.doom9.org/showthread.p...16#post1997616
__________________
Main Systems:-
Threadripper 7970X on Asus Pro WS TRX50-Sage WiFi
Ryzen 9 9950X3D on MSI Carbon X670E
Ryzen 9 7950X on Gigabyte Aorus Elite B650
Intel 13900KF on MSI Tomahawk B660
TR-7970X is offline   Reply With Quote
Old 21st March 2025, 14:06   #3  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
Thanks for you answer, did not know that. It seems that he is using the same method. However Plex installation is not needed, and you can keep only a few files.

https://github.com/R3S3t9999/DoVi_Sc...20INSTALLATION
hellgauss is offline   Reply With Quote
Old 21st March 2025, 15:08   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Thanks, the DoVi method don't work for me at all, with your method I need extract also:

libssl-3-x64.dll
libcrypto-3-x64.dll
libwinpthread-1.dll

And now work fine (with some errors like you say)

The output info is:
Code:
File: C:\Portablz\Eac3Plex\output.eac3
Size: 2691072 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 : -12.04/3.34 dB
Frames Tot/Ind/AC3.: 1314 / 657 / 0
Bitrate average... : 1024 Kb/s
Duration ..........: 21024 ms (0 h. 0 m. 21.024 s.)
------------------------------------------------- End Info
Then there are 657 Independent frames at 573 Kb/s and 657 Dependent frames with extra channels (over 5.1) info.
Not exist AC3 frames then this eac3 is not compatible with BD specs.

I don't know if the encoder admit some parameters to modify the encode.

Also that encoder ignore the channelmask of the wav input (the actual ffmpeg encoder read it and preserve it to the output) and the output is 7.1 when the input is 5.1.2 (3D). So that encoder is usseless for me.

[EDIT]From the Plex_Transcoder.exe -h encoder=eac3_eae :
Code:
Encoder eac3_eae [EAE E-AC-3 encoder]:
    General capabilities: delay
    Threading capabilities: none
    Supported sample rates: 48000
    Supported sample formats: flt s16
    Supported channel layouts: 5.1(side) 7.1

eae_eac3_enc AVOptions:
  -eae_root          <string>     ED..A...... EAE root path (default "")
  -eae_prefix        <string>     ED..A...... EAE file prefix (default "frame-")
  -eae_batch_frames  <int>        ED..A...... EAE number of frames for each pass (from 0 to 1000) (default 0)
  -eae_max_files     <int>        ED..A...... EAE number of files on disk (from 1 to 4) (default 2)
  -downmix           <channel_layout> ED..A...... Request a specific channel layout from the decoder
But using -downmix FL+FR+FC+LFE+BL+BR+TFL+TFR
don't show a error but still output standard 7.1

And seems we can't modify other parameters, the encoder always use eac3 core (never ac3 core like required by BD specs) and always DN -31 (the -dialnorm parameter is not accepted) then low volume is not a encoder but decoder problem.

Also the bitrate is accepted but ignored:

Quote:
Plex_Transcoder.exe -y -bitexact -i 8w512.wav -c:a eac3_eae -eae_root . -bitexact -ab 768k -downmix FL+FR+FC+LFE+BL+BR+TFL+TFR out3D.eac3
...
Guessed Channel Layout for Input Stream #0.0 : 7.1 [1]
Input #0, wav, from '8w512.wav':
Duration: 00:00:21.00, bitrate: 6144 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 7.1, s16, 6144 kb/s [1]
...
Output #0, eac3, to 'out3D.eac3':
Stream #0:0: Audio: eac3, 48000 Hz, 7.1, s16, 768 kb/s [2]
Metadata:
encoder : Lavc eac3_eae
size= 2628kB time=00:00:21.02 bitrate=1024.0kbits/s [2] speed=19.3x
[1] Ignore the ChannelMask of input file and the included in the parameter
[2] Read fine the desired bitrate but the output is always 1024 even if is not needed (Trailing 0's) like with my simple channel test.

The same file encoded to flac by ffmpeg:

Quote:
ffmpeg -i 8w512.wav 8w512.flac
...
Input #0, wav, from '8w512.wav':
Duration: 00:00:21.00, bitrate: 6144 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1.2, s16, 6144 kb/s
...
Output #0, flac, to '8w512.flac':
...
WAVEFORMATEXTENSIBLE_CHANNEL_MASK: 0x503f
Stream #0:0: Audio: flac, 48000 Hz, 5.1.2, s16, 128 kb/s
...
size= 476KiB time=00:00:21.00 bitrate= 185.5kbits/s speed= 383x
The ChannelMask is read and traslated to flac and only 186 Kb is needed.

Last edited by tebasuna51; 21st March 2025 at 19:39. Reason: add info
tebasuna51 is offline   Reply With Quote
Old 21st March 2025, 19:16   #5  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
A fast reverse engineering on the two streams headers using hex editor and online hex-->bit converter (I hope I did not got misaligned)

Code:
Independent
00 strmtype
000 substreamid
10001111001 frmsize
00 fscod
11 numblkscod
111 acmod
1 lfeon
01100 bsid
11111 dialnorm
1 compre
11111111 compr [I need to change this to 00001111]
0 chanmape
0 mixmdate
0 infomdate
0 addbsie
(47 bits)
[data]
Code:
Dependent
01 strmtype
000 substreamid
01110000101 frmsize
00 fscod
11 numblkscod
101 acmod ["complete" 7.1 eac3 is also redundant!]
0 lfeon
01100 bsid
11111 dialnorm
1 compre
11111111 compr
1 chanmape
0001 1010 0000 0000 chanmap [see Tab.E2.5, you need to change this] 
0 mixmdate
0 infomdate
0 addbsie
(63 bit)
[data]
Probably and hopefully audfrm audblk do not contains extra metadata and can be left untouched

I do not have time now for a bitwriter and crc, but it should not be difficult. Perhaps it can be done encoding two streams with ffmpeg and a cpp small program, without plex. And perhaps it can also be done for ac3+eac3 for blu-ray compatibility.
hellgauss is offline   Reply With Quote
Old 21st March 2025, 20:10   #6  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
The Dynamic Range gain (compr) can be cancelled using the -drc_scale 0 at decoding time, it's not a problem.
But I doubt you can easily obtain a BD compliant eac3 using the ffmpeg encoder. Good luck!
tebasuna51 is offline   Reply With Quote
Old 22nd March 2025, 00:30   #7  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
Quote:
Originally Posted by tebasuna51 View Post
The ChannelMask is read and traslated to flac and only 186 Kb is needed.
Yes, that's a test file. I also noticed that the output.eac3 can be heavily compressed by .7z. This do not happen with regular movies. However, even in regular movies, there are some wasted 0 bytes at the end of each frame.

In a far future I think I will try the ffmpeg road, at least with eac3+eac3, so that I can tune bitrate. Probably the independent 5.1 stream can be copy-pasted from ffmpeg. For the independent 4.0 output stream I will try the following way:

1) Insert 16 bit channel map
2) Change some flags (strmtype, chanmape, etc)
3) Increase frmsize by 1 (16 bit more, 0.5kbps more at 48khz)
4) Recalculate crc

Other thing to do for the raw input to ffmpeg:
- be careful with normalization and 5.1 downmix coefficients for independent stream
- Guess channel order for the dependent stream
hellgauss is offline   Reply With Quote
Old 22nd March 2025, 09:34   #8  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Please tell me if you are successful.

About the ChannelMask I can suply the same file encoded by Audition like FL+FR+FC+LFE+BL+BR+TFL+TFR and FL+FR+FC+LFE+BL+BR+SL+SR, if can help you.
And encoded by DDE like core EAC3 (standard) and core AC3 (Bluray compliant).
tebasuna51 is offline   Reply With Quote
Old 22nd March 2025, 14:53   #9  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
Thanks, that would help, a few seconds sample is sufficient. But I do not know when I will start.

PS: I will steal from your scripts the crc functions
hellgauss is offline   Reply With Quote
Old 22nd March 2025, 19:31   #10  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Quote:
Originally Posted by hellgauss View Post
PS: I will steal from your scripts the crc functions
They are not mine, I copied them from the old DelayCut by jsoto

Link for the samples: https://www.sendspace.com/file/jdu9yw

Source FL+FR+FC+LFE+BL+BR+SL+SR

8w341_a3D.eac3 Audition like FL+FR+FC+LFE+BL+BR+TFL+TFR
8w341_an.eac3 Both Audition encodes have a delay of 5.333 ms -> 1 more frame
8w341_db.eac3 Dolby Encoder Engine like Bluray compliant (core Ac3)
8w341_dn.eac3 Dolby Encoder Engine standard (core EAC3)

I can't use 'None' for DRC in DEE then I use 'music light', but DN -31 and bitrate 768 Kb/s (minimum for 7.1). In Audition I use the same parameters.
tebasuna51 is offline   Reply With Quote
Old 31st March 2025, 12:45   #11  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
Some minor updates:

1) It seems that compr field should not be set to 0x0F but to 0x00 (I'll do more test)

2) To customize output, the core stream can be left untouched. In the second dependent stream I have been able to set channel mask (standard 7.1, or whatever 5.1.2 etc...) , dialn=31, compr. Just replace the bits (without adding any field) and recalculate crc. There are also 6 values of dynrng which change the volume. They are difficult to parse since they are in the middle of audio blocks.

3) Most interestingly, the independent core stream can be replaced with a different bitrate and different engine (e.g. ffmpeg). It can be even ac3 for blu-ray compliance.

4) The road to hack ffmpeg and change some headers seems not to be feasible. The coding algorithm has some differences for independent vs dependent stream. ffmpeg has no options to set the eac3 coding as "dependent".

I'll reorganize my code into an usable script, which can mux/demux independent and dependent streams and set compr, chanmask and dialn. For dynrng setting it seems to be too difficult/time consuming. Stay tuned...
hellgauss is offline   Reply With Quote
Old 1st April 2025, 07:26   #12  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Quote:
Originally Posted by hellgauss View Post
1) It seems that compr field should not be set to 0x0F but to 0x00 (I'll do more test)
Yes, from specs: "The compr field in the AC-3 data stream is 8-bits in length..."

The first four bits indicate gain changes in 6.02 dB, where (Table):
0000 => Gain 6.02 dB

The following four bits (ABCD) indicate linear gain changes, where:
ABCD => Gain 0.1ABCD (base 2)
Then 0000 => Gain 0.10000 (base 2) = 1/2 = - 6.02 dB

Then compr = 0000 0000 => 6.02 dB - 6.02 dB = 0 dB

Quote:
2) To customize output, the core stream can be left untouched. In the second dependent stream I have been able to set channel mask (standard 7.1, or whatever 5.1.2 etc...) , dialn=31, compr. Just replace the bits (without adding any field) and recalculate crc.
Please let me know how change the channel mask from 7.1 to 5.1.2 and recalculate the crc in the second dependent frame. Maybe I can use DDE instead Audition for my 5.1.2 encodes.

Quote:
There are also 6 values of dynrng which change the volume. They are difficult to parse since they are in the middle of audio blocks.
It's difficult to parse but easy of correct:
"The bit code of ‘0000 0000’ indicates 0 dB (unity) gain."

Quote:
3) Most interestingly, the independent core stream can be replaced with a different bitrate and different engine (e.g. ffmpeg). It can be even ac3 for blu-ray compliance.
Good news, but not for me, I'm not interested in burn BD's.

Quote:
4) The road to hack ffmpeg and change some headers seems not to be feasible. The coding algorithm has some differences for independent vs dependent stream. ffmpeg has no options to set the eac3 coding as "dependent".
Thats can be the big problem.

Quote:
I'll reorganize my code into an usable script, which can mux/demux independent and dependent streams and set compr, chanmask and dialn. For dynrng setting it seems to be too difficult/time consuming. Stay tuned...
You can let the dynrng for a second step and see if the decoders with drc = 0 can solve the problem. Let me know please.
tebasuna51 is offline   Reply With Quote
Old 4th April 2025, 17:41   #13  |  Link
hellgauss
Registered User
 
hellgauss's Avatar
 
Join Date: Sep 2002
Location: Italy
Posts: 136
Here a first version of the script, probably buggy

https://github.com/HG3112/md71

It is a little bit complicated to use at first sight, but there are some examples in the readme

I have two questions:

1) Some years ago, perhaps, I read that there were some problems in muxing eac3 with ac3 core into .mkv container, e.g. with mkvmerge. Is this still an issue? I performed two test with mkv, one with 7.1 with ac3 core, the second as full .eac3 and get no problems on both on my tv. However I only have a 5.1 hardware. Is such stream playable if no DD+ support is available in the TV?

2) Assuming that channel 1-4 are untouched (coefficient=1.0) and that there is no overflow, what is the correct 7.1-->5.1 downmix coefficients for surround in a "basic" downmix?

A) Here ( https://www.audiokinetic.com/en/libr...downmix_tables ) it is suggested
Surround=1.0*side + 1.0*back

B) My mathematical theory, which can be wrong, says
Surround=0.707*side + 0.707*back

C) ffmpeg default with -ac 6 is
Surround=1.0*side + 0.707*back (???)

D) Tebasuna ( https://forum.doom9.org/showthread.p...hlight=downmix ) suggests
Surround=0.5*side + 0.5*back
hellgauss is offline   Reply With Quote
Old 4th April 2025, 22:25   #14  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,343
Quote:
Originally Posted by hellgauss View Post
Here a first version of the script, probably buggy

1) Some years ago, perhaps, I read that there were some problems in muxing eac3 with ac3 core into .mkv container, e.g. with mkvmerge. Is this still an issue? I performed two test with mkv, one with 7.1 with ac3 core, the second as full .eac3 and get no problems on both on my tv. However I only have a 5.1 hardware. Is such stream playable if no DD+ support is available in the TV?
If you provide some samples I can test them on various hardware SoC devices...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 4th April 2025, 22:47   #15  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Questions:

1) I don't read problems about the core AC3/EAC3, maybe about EAC3 with Atmos data.

2) A,B,C are wrong because Surround values must be in the range -1 to 1. To preserve the max volume without clip we need limit (and distort) only the peaks.
See images in https://forum.doom9.org/showthread.p...41#post2017241
A downmix using ffmpeg can be:

Code:
ffmpeg.exe -i input71.eac3 -filter_complex "asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7, compand=attacks=0:decays=0:points=-90/-84|-8/-2|-6/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]" -map "[a]" output51.ac3
tebasuna51 is offline   Reply With Quote
Old 4th April 2025, 23:06   #16  |  Link
j7n
Registered User
 
j7n's Avatar
 
Join Date: Apr 2006
Posts: 160
If you have four speakers in 7.1, they would be louder than two in 5.1. The most straightforward is to just add them together (A). I don't think it follows that you need to divide the level of side surround by 2 (B). Maybe the back speakers can be quieter by 3 dB to account for them being behind and to avoid widening the image too much (C).

Potential clipping shouldn't be addressed in the downmix matrix. There is usually ample headroom because surrounds typically have low level, and you can use a limiter if needed.
j7n is offline   Reply With Quote
Old 5th April 2025, 01:41   #17  |  Link
mannequin80
Registered User
 
Join Date: Sep 2023
Location: NYC
Posts: 5
Quote:
Originally Posted by tebasuna51 View Post

1) I don't read problems about the core AC3/EAC3, maybe about EAC3 with Atmos data.
i was excited for a second when i saw this thread - thought there's a chance we would be able to change/remove dialn and compr values without breaking the Atmos JOC data

@hellgauss
tried with a random eac3 file to change dialn and compr values and getting this error: ERROR: Unexpected EOF found in inputB

Last edited by mannequin80; 5th April 2025 at 01:57.
mannequin80 is offline   Reply With Quote
Old 5th April 2025, 07:44   #18  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Quote:
Originally Posted by j7n View Post
If you have four speakers in 7.1, they would be louder than two in 5.1.
Of course.
Quote:
The most straightforward is to just add them together (A)...
There is usually ample headroom because surrounds typically have low level, and you can use a limiter if needed.
Like I do with my method:

1) First a mix at 50% to obtain normalized values:
pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7
Or (the same):
pan=stereo|c0<c4+c6|c1<c5+c7

2) And after a gain of 2 for low levels and decrease the gain for high levels (see image)
Code:
compand=attacks=0:decays=0:points=-90/-84|-8/-2|-6/-1|-0/-0.1
We obtain the same volume with 2 speakers in 5.1 than 4 in 7.1 most the time, only on peaks we can't.

Last edited by tebasuna51; 5th April 2025 at 10:09.
tebasuna51 is offline   Reply With Quote
Old 5th April 2025, 08:20   #19  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Quote:
Originally Posted by hellgauss View Post
Here a first version of the script, probably buggy

https://github.com/HG3112/md71

It is a little bit complicated to use at first sight, but there are some examples in the readme
Work fine for me when I try change dialn_value compr_flags chanmap_flags.

With a 7.1 encoded with dde I do:

md71 8w341_.eac3 : 8341_3D.eac3 : 31 00 1810

where 1810 hex = 1100000010000 bin = (table E2.5) Left Surround, Right Surround, Vhl/Vhr pair

Seems work fine the changes but my 5.1.2 Denon play a mix of channels, I need to do more test.
tebasuna51 is offline   Reply With Quote
Old 5th April 2025, 09:44   #20  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,240
Quote:
Originally Posted by mannequin80 View Post
i was excited for a second when i saw this thread - thought there's a chance we would be able to change/remove dialn and compr values without breaking the Atmos JOC data...
I run without error this:

md71 audiosphere.eac3 : audiosphere_.eac3 : 31 00

audiosphere.eac3 from https://www.demolandia.net/es/cine/t.../pagina-9.html

And the:
Code:
Dialogue normalization ......: -23 dB
RF atenuattion ..............: 0.53 dB
are converted to:
Code:
Dialogue normalization ......: -31 dB
RF atenuattion ..............: 0.00 dB
But my Denon don't recognize the audiosphere_.eac3 like Atmos, only dd+.
"They are some kind of unknown checksum (32+8 bits) at the end of the embedded Atmos data"
tebasuna51 is offline   Reply With Quote
Reply

Tags
eac3

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.