Audio troubleshooting

From Official Kodi Wiki
Revision as of 12:09, 21 March 2014 by Jjd-uk (talk | contribs)
Jump to navigation Jump to search

Background Audio Information

To understand how XBMC processes audio you must first have a basic understanding of how audio in the digital domain works.

Pulse Code Modulation (PCM)

When analog audio is converted into the digital domain the near universal format used is Pulse Code Modulation (PCM). All manipulation of audio in the digital domain is always done on audio in the PCM format, therefore functions in XBMC such as volume control can only be done on PCM data, therefore if audio is in one of the Encoded Formats XBMC must decode the audio to PCM in order to manipulate it for volume control.

Number of Channels

When number of channels is referred to, it will nearly always be the number of PCM channels that is meant. Since PCM is uncompressed audio this is a frequently used way of expressing the raw bandwidth for a particular audio path. Thus when you see the "Number of channels" setting in XBMC, this is the number of PCM channels.

Encoded Formats

There are two types of encoded formats, these are lossy (compressed) and lossless (uncompressed).

Lossy

These formats take the PCM audio data and use encoding algorithms to throw away (hence term lossy) audio information that the human ear cannot hear in order to save space. Examples of lossy formats:

  • Dolby Digital AC3
  • DTS

Why 5.1 is possible when number of channels is 2.0?

When audio is in a lossy format it is so much smaller than the original uncompressed PCM data that it's still possible to send 5.1 channels even when "Number of channels" is 2.0.

Take SPDIF as an example, this type of audio path can only handle a maximum of 2 PCM channels, however a format such as DTS can still be passed as 5.1 channels because once encoded into DTS the data is so much smaller than what is required for 2 PCM channels.

Lossless

These formats differ from the Lossy formats in that they don't chuck data away but instead compressed the PCM data with highly algorithms that allow the original audio to be reconstructed (hence lossless), this is very similar in principle to the way zip & rar works on documents in that the original source can always be reconstructed. Examples of Lossless formats:

  • DTS-HD MA
  • Dolby TrueHD
  • Flac

For the lossless formats such as DTS=HD MA, although the audio data is compressed the they still require the same number of PCM channels to be available as they are trying to pass unlike the lossy formats so 7.1 channel DTS-HD MA still requires 7.1 PCM channels.

DTS-HD MA

DTS High Definition Master Audio (DTS-HD MA) is the commonly used on Blu-ray and uses a Core plus Extension encoding scheme where:

  • Core - is a lossy DTS stream encoded as 5.1.
  • Extension - is the additional data required for the audio to be lossless including a possible further 2 channels for a 7.1 audio stream.

The advantage of this type of encoding scheme is that equipment that can't decode the full DTS-HD MA will still be able to recognise the lossy Core DTS 5.1 stream. Thus in XBMC if you deselect the DTS-HD option if using HDMI, or you are using SPDIF so that option is not available, then you will get DTS 5.1 out.

  • Pro - compatible with all equipment which supports DTS
  • Con - can be larger than other formats

Dolby TrueHD

TrueHD is another commonly used Blu-ray audio format, however in this case it's a single lossless audio stream so tends to be slightly smaller than DTS-HD MA, however if you have a single TrueHD audio track for your video then all equipment must be capable of decoding it. It you have a mixture of equipment where some can decode Dolby TrueHD and some can only decode Dolby Digital, then 2 audio tracks are required, one containing the Dolby TrueHD audio upto 7.1 channels and one containing Dolby Digital upto 5.1 channels, however having 2 audio tracks will likely negate any space saving over DTS-HD MA.

  • Pro - can be smaller data size than other lossless formats
  • Con - equipment must be compatible with the format