Kodi Community Forum

Full Version: Can someone explain Dolby Digital transcoding for me?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In another thread I recently learned that setting the number of audio channels in Kodi is NOT the number of speakers you have but the number of LPCM channels that your audio hardware supports, even if it can do more channels via a compressed, bitstreamed format such as AC3, DTS, ect. This is why AC3 transcoding is not an option unless 2.0 speakers is selected. Okay, I grasp that, but since I have a soundbar that's rather dumb and doesn't display what format it's ingesting, could someone explain to me what is and is not transcoded when transcoding and bitstreaming are enabled? (In this case, only DTS and AC3 are the formats supported by the soundbar [Other than LPCM of course])

I'm going to assume that 2.0 Dolby Digital AC3 is bitstreamed and not decoded to PCM, but are other 2.0 formats such as 2.0 AAC, or 2.0 FLAC transcoded to 2.0 AC3, or just decoded to 2.0 LPCM?

Are formats with more than 5.1 channels, like say a 7.1 DTS Master Audio track, downmixed to 5.1 and transcoded to AC3? Or are they downmixed to 2.0?
First lets make sure you understand the fundamentals.

PCM is the raw digital audio.

Dolby Digital & DTS are compressed formats.

It's a normal convention that the bandwidth for digital audio connections are expressed as number of channels (rather than a figure like 2Mbps) where this is the number of PCM channels that can be sent.

So for SPDIF we say it can carry 2.0 PCM channels (which is approx 1.5Mbps so approx 750kbps per channel)

Dolby Digital for 5.1 tends to be 640kbps or 768kbps, thus it fits down the SPDIF connection.

DTS for 5.1 can be up to 1.5Mbps and again fits down the SPDIF connection.

With both Dolby Digital and DTS enabled we simply pass these as is to your soundbar via SPDIF (assuming this is how you are connected) as there is no decoding going on within Kodi.

The transcode options only applies to audio decoded to PCM and is typically used for formats such as AAC 5.1 or FLAC 5.1 as SPDIF can't handle more than 2 channels of PCM, thus the audio is encoded (compressed) into Dolby Digital to allow the 5.1 audio to be sent.

If the media being played is DTS-HD MA with 7.1 channels and you're using SPDIF, then the DTS core 5.1 is decoded to PCM 5.1 however as SPDIF can't handle that it's then further downmixed to PCM 2.0, however enabling the transcode option allows for that decoded PCM 5.1 to be encoded into Dolby Digital 5.1.
(2015-01-14, 19:11)jjd-uk Wrote: [ -> ]First lets make sure you understand the fundamentals.

PCM is the raw digital audio.

Dolby Digital & DTS are compressed formats.

It's a normal convention for the bandwidth for digital audio connections are expressed as number of channels (rather than a figure like 2Mbps) where this is the number of PCM channels that can be sent.

So for SPDIF we say it can carry 2.0 PCM channels (which is approx 1.5Mbps so approx 750kbps per channel)

Dolby Digital for 5.1 tends to be 640kbps or 768kbps, thus it fits down the SPDIF connection.

DTS for 5.1 can be up to 1.5Mbps and again fits down the SPDIF connection.

With both Dolby Digital and DTS enabled we simply pass these as is to your soundbar via SPDIF (assuming this is how you are connected).

Uhm, thanks for the fundamentals, though since I'm sitting on my office right now at a visual effects house, it was a taaaaad unnecessary. Also, Dolby Digital AC3 has a maximum bitrate of 640kbps, not 768kbps. Smile

(2015-01-14, 19:11)jjd-uk Wrote: [ -> ]The transcode options only applies to audio decoded to PCM and is typically used for formats such as AAC 5.1 or FLAC 5.1 as SPDIF can't handle more than 2 channels of PCM, thus the audio is encoded (compressed) into Dolby Digital to allow the 5.1 audio to be sent.

If the media being played is DTS-HD MA with 7.1 channels and you're using SPDIF, then the DTS core 5.1 is decoded to PCM 5.1 however as SPDIF can't handle that it's then further downmixed to PCM 2.0, however enabling the transcode option allows for that decoded PCM 5.1 to be encoded into Dolby Digital 5.1.

Ah, yeah, DTS-HD MA has a DTS stream within it, I forgot that. That said, does Kodi downmix from 7.1 to 5.1 if say, I guess FLAC 7.1 or AAC 7.1 to AC3 5.1? I'm asking because since my soundbar doesn't report what it's ingesting and I don't know how to make Kodi display what it's OUTPUTTING (Easy to see what it's DECODING) I just feel a bit blind and the behavior is is interesting to me.

Also, DOES Kodi bitstream Dolby Digital 2.0 or just Dolby Digital 5.1?
If the media contains FLAC 7.1 or AAC 7.1 then it's decoded to PCM 7.1, that PCM 7.1 can be sent over a HDMI supporting 8 channels, but for a SPDIF or HDMI connection supporting only 2 channels with transcoding enabled, it's downmixed to PCM 5.1 and encoded as AC3 5.1.

For passthrough formats (where the capable receiver option is selected in Kodi) it's always sent as is (as long as WASAPI is used if Windows is the OS) so any layout from mono up to 7.1 can be sent depending on format used, so for Dolby Digital it's any layout up to 5.1.