Audio Stream Priority
#1
Normally I don't have any issues with XBMC using the highest quality audio stream, however I ran into the issue with a recent addition to my Bluray collection.

My M2TS file contains the video stream, subtitle stream, a DTS-MA stream and a TrueHD stream. This is the first time I have haad both HD audio formats in a single file, which is why I have never had this issue before. XBMC seems to always default to the TrueHD stream instead of the DTS-MA stream, even though DTS-MA is the first audio stream (there are only the 2 audio streams). I always have to manually switch the stream to get DTS-MA. My first thought was to chaange the language flag and make TrueHD a language other than English and then tell XBMC to prioritize English streams, however I was hoping for a better solution. Obviously the new AudioEngine changed a lot of things, so I'm not sure if this Trac ticket is still relevant however:

http://trac.xbmc.org/ticket/5773

Aparently based on the ticket and information provided in this thread, the prioriry for audio streams should be:

Quote:Lossless FLAC
DTS-HD Master Audio (aka DTS++)
Dolby TrueHD
Dolby Digital Plus
DTS
Dolby Digital (AC3)
Anything else

This would imply that my DTS-MA (DTS-HD) stream should play first, however it does not. It appears the Trac ticket was merged for XBMC 11, so I would not be surprised if things changed when Frodo introduced the new AudioEngine.

This pull request seems to imply the Dolby TrueHD should be higher priority: https://github.com/xbmc/xbmc/commit/e9e5...a304b18fe7

Quote:+int StreamUtils::GetCodecPriority(const CStdString &codec)
+{
+ /*
+ * Technically flac, truehd, and dtshd_ma are equivalently good as they're all lossless. However,
+ * ffmpeg can't decode dtshd_ma losslessy yet.
+ */
+ if (codec == "flac") // Lossless FLAC
+ return 7;
+ if (codec == "truehd") // Dolby TrueHD
+ return 6;
+ if (codec == "dtshd_ma") // DTS-HD Master Audio (previously known as DTS++)
+ return 5;
+ if (codec == "dtshd_hra") // DTS-HD High Resolution Audio
+ return 4;
+ if (codec == "eac3") // Dolby Digital Plus
+ return 3;
+ if (codec == "dca") // DTS
+ return 2;
+ if (codec == "ac3") // Dolby Digital
+ return 1;
+ return 0;
+}

Looks like this is still the case based on the following: https://github.com/xbmc/xbmc/blob/master...mUtils.cpp

I guess my point is, what is the current order for audio streams? (github link above still relevant?) Can it be modified via advancedsettings.xml? If not, what would be the relevant section of the source code for me to try and contribute to in order to add this as option?
Reply

Logout Mark Read Team Forum Stats Members Help
Audio Stream Priority0