How to disable Dolby Digital AC3 dynamic range compression
#46
(2015-03-31, 20:58)halfgaar Wrote: In making that clip of Terminator 2, mplayer kept starting with the audio commentary track. In it, it's interesting to hear that James Cameron explaining how important dynamic range is. I think he would think his artistic expression is compromised if people play his films with DRC on. Just like David Lynch hates it when people watch films on phones.

Fair enough, but what does he think about people who may have to cover his carefully crafted scene with subtitles on as they couldn't hear dialogue at a "normal" volume level :-)

More seriously I wonder whether he put lfe in the DTS downmix meta for your film - if you could upload a snippet I could tell you.

Maybe you just used 2ch for your graphs and have 5.1, but if not you will AFAIK get different results from kodi compared to other players with DTS when downmixing, as I don't think kodi asks the codec for 2ch.

I dug out an old debugging patch I had and Toy story 3 DTS core from MA uses ( C L R Ls Rs LFE) -

Code:
[dca @ 0x2478fc0] Stereo downmix coeffs:
[dca @ 0x2478fc0] L, input channel 0 = 0.501190
[dca @ 0x2478fc0] R, input channel 0 = 0.501190
[dca @ 0x2478fc0] L, input channel 1 = 0.707092
[dca @ 0x2478fc0] R, input channel 1 = 0.000000
[dca @ 0x2478fc0] L, input channel 2 = 0.000000
[dca @ 0x2478fc0] R, input channel 2 = 0.707092
[dca @ 0x2478fc0] L, input channel 3 = 0.415680
[dca @ 0x2478fc0] R, input channel 3 = 0.000000
[dca @ 0x2478fc0] L, input channel 4 = 0.000000
[dca @ 0x2478fc0] R, input channel 4 = 0.415680
[dca @ 0x2478fc0] L, input channel 5 = 0.446686
[dca @ 0x2478fc0] R, input channel 5 = 0.446686

This does not get normalised any further - and hardly clips at all, 2k samples out of the whole movie IIRC, which I suppose sounds a bit off, but if you look (audacity) at the unmixed 5.1 the Center is clipped a bit anyway, so I guess the mixer didn't mind pushing it volume wise. Although ac3 does have, and can use mixdown meta I don't think there is provision for any LFE and the codec does normalise fully after applying.

Another advantage of requesting 2ch for TrueHD is that you can get a downmix that is in someways embedded - it's the way the codec works - higher channel counts are sort of mixed up from the 2ch using further substreams (that in the event you only want 2ch can be totally skipped). No DRC with current ffmpeg on TrueHD.

The two DTS-HD/MA decs that just appeared don't do this yet, but in time it should also be possible (stream layout permitting) to get a "studio" 2ch mix straight out of the codec.
Reply
#47
(2015-04-01, 21:03)AndyFurniss Wrote: Another advantage of requesting 2ch for TrueHD is that you can get a downmix that is in someways embedded - it's the way the codec works - higher channel counts are sort of mixed up from the 2ch using further substreams (that in the event you only want 2ch can be totally skipped).

The Pi (using omxplayer) does make use of this. Mostly for reduced cpu processing, but it is likely more accurate to use the 2.0 stream directly, than to decode the substreams and downmix.
Other platforms could make use of this. See here for the Pi commit.
Reply
#48
Not a lot of time now, but just a quick note: I use 5.1 discrete outputs to feed my home made multi channel 24 dB/octave bi-amping crossover. I included the 10 dB boost in the analog circuitry the LFE requires to become part of the subwoofer signal, because LFE is not subwoofer, feeding a 500W equalized sub. I never trust downmixing to achieve the normal bass performance, because this 10 dB boost can no longer be applied.

I once tested with several films to see what is part of the LFE signal. I don't know about Terminator 2, but seeing as how that is quite old, LFE might not be used a lot or at all (LFE channels weren't in use (much) in 1991). But for example, We Were Soldiers goes as far as to put a lot of bass in the LFE and front left and right, and even center. My sub gets (LFE+10dB) + (all channels summed), so all bass is reproduced by it. It taxes the 500W of that amp...

The exploding ship at the beginning of Star Wars 2 also heavily uses the LFE. As does the rest of the film...
Reply
#49
@popcornmix

Cool, the commit looks like it's something that kodi can easily do. I must admit I only have one THD film, and I haven't really analysed whether the 2ch embedded is better in some way that a downmix. As it's 7.1 the obvious drawback of a normalised mix is the low level, but as kodi can do un-normalised that's not such an issue.

@halfgaar

Ohh, was Terminator really that long ago!

With your pro setup I can see that you don't need to worry about downmixing anyway. I just thought that DTS sometimes including LFE vs AC3/AAC always AFAIK excluding it, may have been of interest.
Reply
#50
Actually, I am interested in how downmixing works; thanks for the pointer. Dolby Digital requires DRC when downmixing, but that is not strictly necessary. It just is because their rudimentary DSPs can only sum signals, not upscale to 24 bit and process. If you don't DRC, you will clip. I don't actually know what happens to the LFE channel. I wouldn't be surprised if it's left out.

Also, that 10 dB boost on the LFE signal will be tricky when you downmix. The reason the LFE track is recorded -10 dB, is to allow more headroom. It is then up to the amplficiation stage to do +10 dB. If you downmix yet want to retain all bass info, you would have to reduce all channels by 10 dB to make all relative levels correct.

That's why as a DIY audio'er, I prefer to downmix in the analog domain. The < 1V max output on a soundcard can be easily summed to my hearts content with ±5V (or even ±15) rails opamps.
Reply
#51
Thank you halfgaar!

This have been bugging me forever. I knew i could hear the compression, but newer knew why.
Also enabling audyssey dynamic volume on my amp makes it even weirder sounding Wink (Works as expected on DTS)
Reply
#52
Kudo's for hearing it Smile
Reply
#53
Hi guys,

So, is there a solution? I've read through the entire thread and saw Memphiz's reply that "change will be in effect on next nightly tomorrow" although it wasn't clear what change, but 15.1, 15.2 and 16.0 beta4 all have the same problem - Dolby AC3 Metadata DRC is being fully applied with no option to defeat it.

It is true that Dolby's requirement is for DRC to be enabled by default, but the entire purpose of making the DRC entirely metadata based (which was no small engineering feat back when they did it in the mid 90s) is that it's supposed to be defeatable by users who know what they're doing. Thus, even the cheapest DVD players have an option to turn it off.

In Kodi, I can't find any option to do it in System - Settings - Audio Output, not even at settings level Expert, which would be a great place for it.

This is kind of a big thing for anyone using Kodi with decent home theater speakers. I feed the power amps 5.1 analog audio from the PC (so that I can get 5.1 discrete from *any* format, including Multichannel FLAC and Multichannel AAC), so an external decoder for AC3 just to get around changing a single 1 to a 0 in the decoder is really not a feasible solution.

Would much appreciate a solution or workaround.

An excellent solution would be to have a slider (0.0 to 1.0 with 0.1 steps) for AC3 Dynamic Range compression, grayed out if Bitstream output is selected.
Reply
#54
The <applydrc> tag in advancedsettings.xml is what you would need. See http://kodi.wiki/view/Advancedsettings.xml#audio

It's the same link I posted in this thread near the beginning, although the format has been updated since I posted my blurb.
HP Stream Mini w/Libreelec -> HDMI -> Toshiba 37"
Intel NUC8i3BEH w/Libreelec -> HDMI -> LG OLED55C3PUA -> S/PDIF -> Sony HT-CT80
Dell Optiplex 7050 Micro w/Libreelec -> HDMI -> Yamaha RX-V467 -> HDMI -> Toshiba 47L7200U
Reply
#55
Thanks, Jogee! I did see the link posted in the beginning, and then the post right afterwards which said "I tried it and it didn't work", so I figured it was deprecated and didn't try it. I did try it now though, it does work!

Should still probably be a GUI option though, at least at the Expert level.
Reply
#56
It should come as no surprise that I also think it should be a GUI option.

But good to know it's included in the release. I had just continued using mplayer/xine and forgot about Kodi. My wife and house guests will appreciate a more friendly system like Kodi they can use. Will give it a try.
Reply

Logout Mark Read Team Forum Stats Members Help
How to disable Dolby Digital AC3 dynamic range compression0