Why bitstreaming sometimes sounds much better than PCM
#1
In at least two scenarios bitstreaming will sound much better than PCM with the same channel count. (terminology: AVR = Audio/Video Receiver)

1) When playing AC3. Kodi implements AC3 Dynamic Range Compression. This is rarely, if ever, enabled by default on AVRs. Kodi has the option to disable it, but it's well hidden. You must create an advancedsettings.xml file, like so:

<advancedsettings>
<audio>
<!-- Whether to use Dynamic Range Compression (DRC) on AC3 streams. 1.0 is "full" compression, as defined by the audio track's metadata, which is recommended for "basic" sound systems such as the internal speakers on a TV. 0.0 is no compression at all, which is recommended for people with nice multi-speaker sound systems. -1.0 (default) defaults to whatever ffmpeg uses, which is currently the same as 1.0. This has no effect if passthrough is enabled for AC3. -->
<applydrc>0.0</applydrc>
</audio>
</advancedsettings>

See http://kodi.wiki/view/advancedsettings.xml for general information about how to use advanced settings.

2) When playing 5.1 audio on a 2-channel system. Kodi's downmixer discards the LFE channel. AVR downmixers don't. So PCM output will lack bass compared with bitstreaming.
Reply
#2
Your terminology is inaccurate.
2) is after the book. To protect speakers from distorting and destroying them, LFE is discarded when downmixing. This is intentional. Some people may have 100K USD speakers. Others may use the speakers inside their made-in-china laptop. One must cater to the lowest common denominator.

AVRs don't "downmix", they do "bass managment". When you bass manage 5.1 (or more) down to 2.0. LFE will mostly be discarded here too. But at a little comes through. Probably because that if you're using an AVR then your speakers are going to be of a bigher quality. You want LFE? Then get a sub, this is where it's supposed to be used.

Now that said, I'd welcome an advanced settings that enabled LFE also on downmix to 2 channels. 1 notable things are required for this to happen. The MSB of the downmixed signal except LFE needs to be attenuated by 6dB or so. (The same must be done for all GUI sounds or they would be too loud) For simplicity sake we could just downmix by exactly 1bit as this is close enough. This will leave room for the LFE's +10dB signal to come through unaltered.

If playing a 7.1 soundtrack at reference levels, you should be able to hit just about 120dB at the loudest. I say you should.. but in reality you won't come close with your downmixed/bass managed signal. Therefore some compression is good, it's only logical that you need to use advacedsettings to turn off DRC.
Reply
#3
(2017-04-09, 20:45)Soli Wrote: AVRs don't "downmix", they do "bass managment". When you bass manage 5.1 (or more) down to 2.0. LFE will mostly be discarded here too. But at a little comes through. Probably because that if you're using an AVR then your speakers are going to be of a bigher quality. You want LFE? Then get a sub, this is where it's supposed to be used.

I don't agree with your terminology. But whatever. The point is you get LFE with bitstreaming, but not PCM, so bitstreaming sounds better in this case.

(2017-04-09, 20:45)Soli Wrote: If playing a 7.1 soundtrack at reference levels, you should be able to hit just about 120dB at the loudest. I say you should.. but in reality you won't come close with your downmixed/bass managed signal. Therefore some compression is good, it's only logical that you need to use advacedsettings to turn off DRC.

So it's your opinion that soundtracks always sound better with compression. I disagree. But we can at least agree that bitstreaming sounds very different than PCM (when playing AC3), which is the main point.

And you know, bitstreaming versus PCM is not a free choice. Because PCM is the only option when resampling is required. So this has implications for the correct design of Kodi.
Reply
#4
I can understand that drc could be needed if peoples want to play a movie with DD5.1 using a stereo setup

What i do not understand:

-why is it activated no matter what your sound settings are: as soon as you play a movie without activating passthrough, drc is applied even if you play a DD5.1 audio track with kodi set to 5.1

-why you have to dig into kodi wiki to know that it is applied and how to set it off
Moanbag is in da place!
Reply
#5
Drc should be used solely depending on the environment. It does not make the sound better, it only makes some parts louder. If you are in a noisy environment, drc will help with the parts that originally played at low volume. But sounds will not be reproduced as the sound engineer intended them to.
Reply
#6
I asked our devs and have been pointed to this PR, which should explain some things regarding DRC and our setting https://github.com/xbmc/xbmc/pull/6820
Reply
#7
(2017-04-10, 11:39)da-anda Wrote: I asked our devs and have been pointed to this PR, which should explain some things regarding DRC and our setting https://github.com/xbmc/xbmc/pull/6820

So the big part was to follow FFmpeg default setting

But it more or less confirm what I said:

-there is no need for it to be activated by default outside of downmixed playback

-Fernetmenta talked about making a GUI setting but it seems it never comes to an end...
Moanbag is in da place!
Reply
#8
(2017-04-10, 05:31)Luke M Wrote: I don't agree with your terminology. But whatever. The point is you get LFE with bitstreaming, but not PCM, so bitstreaming sounds better in this case.
It's not my terminology. Feel free to send a mail to Dolby asking for clarification. DVD and Bluray players do a simple "downmix". LFE is *always* discarded in x.0 downmixes. AVRs do bass management. Most of the time you lose LFE as well when you do bass management from x.1 to 2.0, but on some AVRs you do get a little LFE, but way way down in level....so that it doesn't really count anyways.

As for PCM: You do get LFE with PCM if you include the .1 channel.(example: downmix to 2.1) If you don't include the .1 channel, then you won't get LFE. So then, why not just include the .1/LFE channel?

Since LFE is meant to be played 10dB louder than other channels, you would need to attenuate the mains volume by 6dB if you were to fit LFE into a 2.0 "downmix". You also need to apply a LP to the LF, or you will meet the sudden 120hz brickwall. This is why it's not quite straightforward to include LFE in a 2.0 downmix. Unless your speakers are Wilson Alexandria, it would be best to reserve the LFE to a dedicated subwoofer anyways.

Quote:So it's your opinion that soundtracks always sound better with compression. I disagree. But we can at least agree that bitstreaming sounds very different than PCM (when playing AC3), which is the main point.

And you know, bitstreaming versus PCM is not a free choice. Because PCM is the only option when resampling is required. So this has implications for the correct design of Kodi.
It's not my opinion. It's a sane default because we must cater to those who use their laptop speakers. If you want to disable it, you can do so in advancedsettings. I kinda agree that it should be disabled as default when decoded to multichannel LPCM, but then we end up with different defaults vs 2.0 downmix, which would also be confusing. Overrall the best solution is a GUI option, and it should probably default to medium DRC.

If you are an audiophile, you are in a very small minority of the population. If you are an audiophile using Kodi, then you are in a very very very small minority. Can't make the defaults suit the audiophile crowd.

I'm not neccesarily disagreeing with you on 1), only wanted explain there are reasons Kodi (and also FFmpeg) doesn't default to the "best" settings.
Reply
#9
(2017-04-10, 14:15)Soli Wrote: It's not my terminology. Feel free to send a mail to Dolby asking for clarification. DVD and Bluray players do a simple "downmix". LFE is *always* discarded in x.0 downmixes. AVRs do bass management. Most of the time you lose LFE as well when you do bass management from x.1 to 2.0, but on some AVRs you do get a little LFE, but way way down in level....so that it doesn't really count anyways.

This contradicts my personal experience using various AVRs (Sony, Denon/Marantz). What is true is that there's no universal standard for AVR downmixing. The exact mix levels of center, surround, and LFE can differ between models. Bass management is applied independently of downmixing. Denon/Marantz AVRs, for example, have a "Direct" mode that disables bass management among other things. It doesn't affect downmixing at all.

(2017-04-10, 14:15)Soli Wrote: As for PCM: You do get LFE with PCM if you include the .1 channel.(example: downmix to 2.1) If you don't include the .1 channel, then you won't get LFE. So then, why not just include the .1/LFE channel?

Sometimes you're limited to 2-channel output (e.g. from a TV over ARC/SPDIF). But my point was to compare bitstreaming with PCM of the *same* number of channels - neither more nor less.

(2017-04-10, 14:15)Soli Wrote: You also need to apply a LP to the LF, or you will meet the sudden 120hz brickwall. This is why it's not quite straightforward to include LFE in a 2.0 downmix. Unless your speakers are Wilson Alexandria, it would be best to reserve the LFE to a dedicated subwoofer anyways.

I don't understand "LP to the LF...". If you think AVRs are doing things "wrong", well, you're entitled to your opinion. I'm just explaining why bitstreaming sometimes sound much better.

(2017-04-10, 14:15)Soli Wrote: I kinda agree that it should be disabled as default when decoded to multichannel LPCM, but then we end up with different defaults vs 2.0 downmix, which would also be confusing. Overrall the best solution is a GUI option, and it should probably default to medium DRC.

If you are an audiophile, you are in a very small minority of the population. If you are an audiophile using Kodi, then you are in a very very very small minority. Can't make the defaults suit the audiophile crowd.

I'm not neccesarily disagreeing with you on 1), only wanted explain there are reasons Kodi (and also FFmpeg) doesn't default to the "best" settings.

I'm not an audiophile.
Reply
#10
Again, avr's don't "downmix", they do bass management. You tell it how many speakers you have, big or small, subwoofer or not, type of speakers (thx/not thx), crossover frequencies, and you get an output.
The "direct" button only disables most of the DSP function. It doesn't mean that "downmixing" is an altogether separate process in the AVR. But if you want to call it downmixing, that's fine with me since it too discards the LFE channel when using a 2.0 speaker configuration Wink

Anyhow, this is different than the simple summing of channels that DVD/BD/Kodi (a dev might correct me, but I don't think any advanced bass management DSP is part of Kodi yet)

LP to LFE: In a theorethical scenario you'd include LFE in 2.0 mixedown, you must apply a low pass to the LFE channel to get a smooth and gentle cut off slope. The LFE is brickwalled at 120hz. Brickwalled audio sounds awful.

Maybe you're not an audiophile but you certainly belong to a group that care more about sound quality than usual or you wouldn't have started this thread.
Reply
#11
(2017-04-10, 20:20)Soli Wrote: Again, avr's don't "downmix", they do bass management. You tell it how many speakers you have, big or small, subwoofer or not, type of speakers (thx/not thx), crossover frequencies, and you get an output.
The "direct" button only disables most of the DSP function. It doesn't mean that "downmixing" is an altogether separate process in the AVR. But if you want to call it downmixing, that's fine with me since it too discards the LFE channel when using a 2.0 speaker configuration Wink

Incorrect. 2.0 is not treated specially, it's just another case of downmixing. Which never discards channels. Disabling bass management doesn't change the downmix, why would it?

(2017-04-10, 20:20)Soli Wrote: LP to LFE: In a theorethical scenario you'd include LFE in 2.0 mixedown, you must apply a low pass to the LFE channel to get a smooth and gentle cut off slope. The LFE is brickwalled at 120hz. Brickwalled audio sounds awful.

The LFE channel contains whatever the content author put there. I don't see how filtering it would be an improvement. If you're sending it to a subwoofer, then filtering might be a good idea, to prevent non-bass from going to the sub (you can't assume the LFE is limited to 120hz. True for AC3, but not in general).

(2017-04-10, 20:20)Soli Wrote: Maybe you're not an audiophile but you certainly belong to a group that care more about sound quality than usual or you wouldn't have started this thread.

Well, it's more that I stubbornly refuse to buy more speakers than necessary. My "7.1" surround setup lacks a center channel, lacks a sub, and uses one back speaker rather than two. So that's how I know about downmixing.
Reply
#12
(2017-04-10, 21:23)Luke M Wrote: Incorrect. 2.0 is not treated specially, it's just another case of downmixing. Which never discards channels. Disabling bass management doesn't change the downmix, why would it?
You might disagree with yourself here.
The direct button disables all/most DSP functions, which results in no "bass redirection part" in the bass management, which in turn will result in no LFE in not only 2.0 output, but any x.0 output. You disable bass management (bass redirection), you wave goodbye to the LFE. You want to call bass management for "mixdown" when the direct button is activated? As stated earlier that's fine with me, but like the Kodi mixdown you will then discard LFE altogether when the output is x.0 channels.
Quote:The LFE channel contains whatever the content author put there. I don't see how filtering it would be an improvement. If you're sending it to a subwoofer, then filtering might be a good idea, to prevent non-bass from going to the sub (you can't assume the LFE is limited to 120hz. True for AC3, but not in general).
Dolby conducted a study that showed not much "useful" info in LFE over about 80hz so it is sane to default to add some low pass filtering, although it is technically possible to put the sound of angels singing in the LFE in various codecs.
Quote:Well, it's more that I stubbornly refuse to buy more speakers than necessary. My "7.1" surround setup lacks a center channel, lacks a sub, and uses one back speaker rather than two. So that's how I know about downmixing.

Sure. But that's not really the point anyways. The point is having a sane default to cater the lowest common denominator. Which are the laptop speaker people. They are the majority and also least likely to modify advancedsettings.xml. I don't want 10 new threads each asking why the volume is so low and why the laptop speakers distorts etc. On the other hand people like *you*, who have the extra knowledge, will be OK.
Reply
#13
(2017-04-10, 23:16)Soli Wrote:
(2017-04-10, 21:23)Luke M Wrote: Well, it's more that I stubbornly refuse to buy more speakers than necessary. My "7.1" surround setup lacks a center channel, lacks a sub, and uses one back speaker rather than two. So that's how I know about downmixing.

Sure. But that's not really the point anyways. The point is having a sane default to cater the lowest common denominator. Which are the laptop speaker people. They are the majority and also least likely to modify advancedsettings.xml. I don't want 10 new threads each asking why the volume is so low and why the laptop speakers distorts etc. On the other hand people like *you*, who have the extra knowledge, will be OK.

Peoples just need to deal with kodi team dual speech on some subject:

- we do not alter sound when decoding it (but we enable drc by default)

- we made the new UI for "10 feet experience from couch" (but kodi is still setup on some point for laptop usage)
Moanbag is in da place!
Reply
#14
So, if say Kodi is transcoding FLAC 5.1 to AC3 5.1 for my soundset over TOSLINK, is Kodi doing DRC in the process?
Reply
#15
(2017-04-11, 00:24)DJ_Izumi Wrote: So, if say Kodi is transcoding FLAC 5.1 to AC3 5.1 for my soundset over TOSLINK, is Kodi doing DRC in the process?

Best way to answer that: disable drc via advancedsettings.xml and try to spot differences on how it sounds
Moanbag is in da place!
Reply

Logout Mark Read Team Forum Stats Members Help
Why bitstreaming sometimes sounds much better than PCM0