DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

Greetings, friends.

Please forgive me if I'm asking something that's already been inquired. Apparently, the search terms "MA" and "7.1" are ignored by this system, and DTS is too common to provide results. (I didn't see anywhere to post issues with the support board itself.)

I'm attempting to encode some of my movies into H.264 from the MKV files ripped directly from the Blu-Ray disc. I want to retain the full, lossless audio. I don't really have a problem with TrueHD, but it seems like DTS-HD MA 7.1 files provide inconsistent behaviors in Handbrake.

Specifically, a 7.1 audio track is recognized as 5.1 in Handbrake as follows:

Code: Select all

0: English (DTS-HD MA) (5.1 ch)
MediaInfo shows the same track as follows:

Code: Select all

Audio #1: English, 5 067 Kbps / 1 509 Kbps, 48.0 KHz, 24 bits, 8 channels / 6 channels, DTS (MA / Core)
Surround 7.1
You can see the core audio is embedded within.

As an FYI: If I do a DTS Passthrough for this, it pushes out the Core 5.1 audio only. That's great if you're just looking for the Core Audio, but my MKV rip already separates that as Audio #2. Also, it seems to strip out the 7.1 audio and gives an interesting output in MediaInfo:

Code: Select all

Audio: English, Unknown / 1 509 Kbps, 48.0 KHz, 24 bits, 8 channels / 6 channels, DTS (MA / Core)
Surround
The "Unknown" 7.1 track is not found/recognized by any player I have, and the output file sizes seem to indicate the higher bitrate, lossless audio is not included.

I realize this is not tech support, but I wanted to specifically ask: Is this a bug, a known issue (i.e. a common request), or an inconsistent behavior of Handbrake? Is there some issue with DTS-HD 7.1 audio? The documentation is distinctly lacking in any specifics on audio support (while broadly indicating that DTS and 7.1 audio are supported). I'd be happy to personally update the documentation if someone could clarify the issues (if any). Likewise, I'm happy to open a bug and/or feature request accordingly.

Thanks in advance, and, again, my apologies if this has already been addressed.

- Dave
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by mduell »

This is tech support, and it has well documented rules because we don't have operable crystal balls and we don't play 20 questions.

Forum rules
Activity Log is required for support requests. See Must Read: How To Get Questions Answered on These Forums for details
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by rollin_eng »

Could you please post your logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

mduell wrote: Mon Aug 14, 2017 5:01 amThis is tech support, and it has well documented rules because we don't have operable crystal balls and we don't play 20 questions.
My apologies, mduell. I chose to post this in the General category because I am looking for clarification on how to approach technical support with the indicated issue. Perhaps the description of the forum category contributed to my confusion:
General
General discussion of HandBrake - not for tech support
Since you took the time, I hope that indicates an actual interest in helping, so I would thank you to clarify your statement. Would you explain how you have come to the conclusion this forum is intended for technical support when the description seems to indicate otherwise?

Per your message, I also reviewed the "documented rules", and nothing seems to indicate the General forum is intended for "tech support" (as you've indicated). Also, I did note that policy nos. 2 and 3 seem to indicate something about "respect for other users" and "abusive posts." For future consideration, I think you could reexamine your approach.

Please also consider:
  • I've been fairly polite and respectful that I may be lacking experience and information.
  • I did provide a clear indication of my question (i.e. Is it possible?) in my subject and significant details in the original post.
  • I did indicate that I would be happy to open a technical support case and/or feature request if appropriate.
  • You have a personal choice to be quick to criticize or simply move on (if you've limited tolerance or no actual interest in helping).
I'll continue to be polite and respectful of the policies and users of this system, and I would appreciate the same in return. Thank you!

- Dave
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

rollin_eng wrote: Mon Aug 14, 2017 7:23 amCould you please post your logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
Rollin_eng,

Thank you for the reply. I've posted a the contents of the activity log here for your reference.

Again, I am looking for more of a general clarification of the intended feature set with regard to 8 channel DTS-HD audio rather than a diagnostic at this time.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by mduell »

I missed a word: "This is not tech support", the rest of the sentence still applies. Forum rules bold underlined red text on a pink background can be found at the top of this page in the general forum. Please don't even think to argue you're not requesting support, since you clearly need it.

Moderator note: please be a bit more civil.
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

Contrary to the opinion of another individual, I am looking for clarification on this issue in order to appropriately direct my inquiry to the appropriate audience. If there is something I'm simply missing, I'd appreciate the feedback as well.
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

To add some more information:
  • Content with TrueHD 7.1 (8-channel) audio is recognized appropriately and offers a "TrueHD Passthru" setting (e.g. Batman v Superman DOJ)
  • Content with DTS-HD MA 5.1 (6-channel) audio is recognized appropriately and offers a "DTS-HD Passthru" setting.
  • Content with DTS-HD MA 7.1 (8-channel) audio consistently recognizes only the Core audio (6 of 8 channels) and offers a "DTS-HD Passthru" setting. It will ONLY pass through the Core audio tracks (presumably without down-mix of the remaining 2 channels).
Pretty much every current Disney/Pixar release uses DTS-HD MA 7.1 for their primary audio tracks. See this log for a Sleeping Beauty attempt at only passing thru the DTS-HD MA 7.1 track.

Is it possible the library used for DTS does not support 8 channel audio? Has anyone had success passing DTS-HD MA 7.1 through Handbrake?
Deleted User 11865

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by Deleted User 11865 »

metaldave wrote: Tue Aug 15, 2017 5:48 am To add some more information:
  • Content with TrueHD 7.1 (8-channel) audio is recognized appropriately and offers a "TrueHD Passthru" setting (e.g. Batman v Superman DOJ)
  • Content with DTS-HD MA 5.1 (6-channel) audio is recognized appropriately and offers a "DTS-HD Passthru" setting.
  • Content with DTS-HD MA 7.1 (8-channel) audio consistently recognizes only the Core audio (6 of 8 channels) and offers a "DTS-HD Passthru" setting. It will ONLY pass through the Core audio tracks (presumably without down-mix of the remaining 2 channels).
That last statement is incorrect. While only the core is decoded during scan (hence why it shows as 5.1 instead of 7.1), the full track is passed through, including any HD extensions.

Also, the DTS core substream is always a downmix of the full 7.1 track; the official DTS encoder knows better than to drop 2 channels to the floor…
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

Continuing my research, I found something that might indicate this issue is a potential bug. I analyzed the file output for Sleeping Beauty (per the log indicated in my previous message), and it looks like the 8-channel audio is hiding in there.

MediaInfo Output for Handbrake Passthru of 8-channel DTS-HD MA Stream:

Code: Select all

Audio
ID                                       : 2
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A9
Duration                                 : 1h 15mn
Bit rate mode                            : Variable / Constant
Bit rate                                 : Unknown / 1 509 Kbps
Nominal bit rate                         : 4 459 Kbps
Maximum bit rate                         : 6 638 Kbps
Channel(s)                               : 2 channels
Channel(s)_Original                      : 8 channels / 6 channels
Channel positions                        : Front: L C R, Side: L R, Back: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Frame rate                               : 93.750 fps (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless / Lossy
Stream size                              : 2.34 GiB (63%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : UTC 2017-08-06 03:49:03
Tagged date                              : UTC 2017-08-06 03:54:12
Handbrake causes the 8-channel lossless track to label the bitrate as "Unknown" (instead of the 4,459 Kbps), but, otherwise it matches the original stream in the ripped MKV file.

MediaInfo Output for the Original 8-channel DTS-HD MA Stream:

Code: Select all

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 1h 15mn
Bit rate mode                            : Variable / Constant
Bit rate                                 : 4 459 Kbps / 1 509 Kbps
Channel(s)                               : 8 channels / 6 channels
Channel positions                        : Front: L C R, Side: L R, Back: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Frame rate                               : 93.750 fps (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless / Lossy
Stream size                              : 2.34 GiB (15%)
Title                                    : Surround 7.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray
Thus, it is passing through the 8-channel stream (albeit with some identification issues).

The file does, indeed, show up in my Plex Media Player as having an "English - DTS 7.1" track as it's only track. Based upon the stream size, it looks like the lossless audio is all there.

For confirmation, I encoded another version (log) and had Handbrake perform a Passthru of the DTS-HD MA 5.1 core track.

MediaInfo Output for Handbrake Passthru of 6-channel DTS-HD MA Core Stream:

Code: Select all

Audio #2
ID                                       : 3
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A9
Duration                                 : 1h 15mn
Source duration                          : 1h 15mn
Bit rate mode                            : Constant
Bit rate                                 : 1 509 Kbps
Channel(s)                               : 2 channels
Channel(s)_Original                      : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Frame rate                               : 93.750 fps (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 811 MiB (35%)
Source stream size                       : 811 MiB (35%)
Language                                 : English
Default                                  : No
Alternate group                          : 1
Encoded date                             : UTC 2017-08-06 03:39:09
Tagged date                              : UTC 2017-08-06 03:42:06
You can see this is the Core audio stream at a 1,509 Kbps bitrate and 6 channels (coming in at 811 MB in size).

Thus, the Lossless audio is passing through when selecting the track in Handbrake, but the track is losing it's bitrate information for some reason. I suspect it has something to do with how Handbrake depicts the 8-channel stream as "0: English (DTS-HD MA) (5.1 ch)" when selected. By selecting that stream and the "DTS-HD Passthru" option in the Codec pull-down list, Handbrake seems to pass all 8 channels (again, without bitrate data for the lossless stream).

Any thoughts? Is this a bug? Expected?
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

Rodeo wrote: Tue Aug 15, 2017 8:04 am Also, the DTS core substream is always a downmix of the full 7.1 track; the official DTS encoder knows better than to drop 2 channels to the floor…
That's a great tidbit of information, and it's indicative of how DTS handles the core substream processing. That helps my workflow tremendously. Thank you!
Rodeo wrote: Tue Aug 15, 2017 8:04 am
metaldave wrote: Tue Aug 15, 2017 5:48 am
  • Content with DTS-HD MA 7.1 (8-channel) audio consistently recognizes only the Core audio (6 of 8 channels) and offers a "DTS-HD Passthru" setting. It will ONLY pass through the Core audio tracks (presumably without down-mix of the remaining 2 channels).
That last statement is incorrect. While only the core is decoded during scan (hence why it shows as 5.1 instead of 7.1), the full track is passed through, including any HD extensions.
I was compiling my previous message as you wrote yours. Confirmed and confirmed; Thank you!

If I may, I have a few follow-up questions:
  • This seems to be a known issue with DTS-HD MA 8-channel streams. Is this documented?
  • By contrast, why does TrueHD 7.1 properly show up during the scan? Is there no Core Stream equivalent (or requirement) with TrueHD (and, thus, less complicated to scan)?
  • Why does the encoded file lose the bitrate information for the stream? Is this a known or related issue as well?
Thank you again!
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

Another test with a 6-channel DTS-HD MA audio stream reveals a similar effect after Handbrake encode. I ran Back to the Future (log) in the wee hours (testing some higher quality video settings), and I only selected the DTS-HD MA 5.1 soundtrack and selected Passthru. Thus, this is an issue with all DTS-HD MA streams (not just 8-channel). The stream data for the audio track of the encoded file is below.

MediaInfo for DTS-HD MA 5.1 (6-Channel) Stream Passthru Encode with Handbrake:

Code: Select all

Audio
ID                                       : 2
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 1h 56mn
Bit rate mode                            : Variable / Constant
Bit rate                                 : Unknown / 1 509 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Frame rate                               : 93.750 fps (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless / Lossy
Title                                    : Surround
Language                                 : English
Default                                  : Yes
Forced                                   : No
You can see the Lossless bitrate is, once again, "Unknown" whereas the Core sub-stream is identified correctly.

MediaInfo for DTS-HD MA 5.1 (6-Channel) Stream Direct from Blu-Ray Source

Code: Select all

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 1h 56mn
Bit rate mode                            : Variable / Constant
Bit rate                                 : 4 250 Kbps / 1 509 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Frame rate                               : 93.750 fps (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless / Lossy
Stream size                              : 3.45 GiB (13%)
Title                                    : Surround 5.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray
You can, definitely, see that everything matches for the most part, so it confirms the passthrough, but, once again, Handbrake does not identify the bitrate of the lossless tracks in the encode data.

Notably, Handbrake does not provide "Stream size" information line upon encode when there's only a single stream of audio (it does provide the info in encode files with multiple streams - I can provide an example if desired). Reasonably, Handbrake re-writes the stream descriptive data upon encode, so this isn't, necessarily, expected to be a 1-for-1 translation of the data in the original file.

In my mind, this provides a clue for the "Unknown" bitrate info issue. Thus, my follow-up questions:
  • Is this, ultimately, just an issue with how Handbrake is "writing" the information for each stream upon encode (akin to metadata) and it's not actually losing anything?
  • If this is simply an issue with how Handbrake is documenting the stream info, do we consider that a bug, known issue, or something that would need a feature request to address?
  • Again, is any of this documented anywhere already as a known issue with DTS-HD MA stream encodes?
  • Is the omission of the Stream size field in single-stream encodes a known issue or intended behavior (and documented)?
Thanks for the feedback! To reiterate, I'm happy to open a bug report and/or feature request if we can nail down the nature of these issues.
Deleted User 11865

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by Deleted User 11865 »

IIRC, MakeMKV writes Matroska-specific metadata including things such as video and audio tracks' bitrates, whereas HandBrake doesn't bother (we don't always read it reliably from the source anyway). It sure it nice when looking at the output in MediaInfo, but is totally irrelevant to actual playback of the content.

If you think HandBrake must absolutely write the track bitrate to the output metadata, patches welcome :) ;)
metaldave
Posts: 36
Joined: Mon Apr 10, 2017 6:40 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by metaldave »

Rodeo wrote: Tue Aug 15, 2017 3:57 pmIf you think HandBrake must absolutely write the track bitrate to the output metadata, patches welcome :) ;)
If my personal CPU (i.e. brain) cycles can assist, I'd love to participate. :)

Just for clarification, can you discern why the lossless Dolby formats seem to be recognized (identified) completely versus why the DTS formats do not? Does it have to do with how DTS combines the Lossless Stream and Lossy (Core) Sub-stream? From what I've seen, Dolby keeps things discrete comparatively (no sub-streams).

I can appreciate the challenge as I expect DTS requires both the lossless and lossy to be combined for the decoder. In other words, you cannot split these up per the specification.

It sounds like Handbrake is doing the job, but it just doesn't appear that way to the untrained eye (speaking specifically of the misrepresentation of a 7.1 track as a 5.1). Additionally, there's no possible Mixdown for "7.1 Channels" with a DTS-HD MA 8-channel stream, but that could be such an outlier case that it's not worth the development cycles. However, it added to my confusion the highest possible Mixdown setting was "5.1 Channels."

Thanks again for your time!
Last edited by metaldave on Wed Aug 16, 2017 4:23 am, edited 1 time in total.
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by rollin_eng »

The mixdown is for the encoder and I believe that will only encode up to 5.1, if you are doing passthru there is no mixdown.

All you need to do for your missing bitrate is read the value from the source mkv and insert it into your target mkv, easy!

(I have no idea if it's easy or not)
Deleted User 11865

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by Deleted User 11865 »

metaldave wrote: Wed Aug 16, 2017 4:03 amJust for clarification, can you discern why the lossless Dolby formats seem to be recognized (identified) completely versus why the DTS formats do not? Does it have to do with how DTS combines the Lossless Stream and Lossy (Core) Sub-stream? From what I've seen, Dolby keeps things discrete comparatively (no sub-streams).
There are two substreams in the case of TrueHD on Blu-ray, but they're independently decodable. Whereas in the case of DTS-HD, the lossless track is an extension to the lossy core and therefore depends on it. The official encoder can create HD-only bitstreams, but they're not allowed on Blu-ray and probably never used in the wild.

HandBrake has a decoder capable of decoding TrueHD, but our DTS decoder is limited in what it can decode (the lossy core, some DTS-ES XCh extensions for 6.1, and in the latest version, portions of the XLL extension, but not the additional channels if they are part of an XXCH extension).

These details probably aren't necessary for bitrate computation though, there are most likely other ways to find the information than parsing the bitstream.
Deleted User 11865

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by Deleted User 11865 »

rollin_eng wrote: Wed Aug 16, 2017 7:47 amThe mixdown is for the encoder and I believe that will only encode up to 5.1, if you are doing passthru there is no mixdown.
Some encoders (FLAC, Vorbis, maybe Opus) can encode 6.1 or 7.1 content, if the input has the corresponding channels. Since our DTS decoder doesn't support XXCH extensions, the input is actually 5.1 for re-encoding purposes, and HandBrake doesn't upmix (nor would upmixing make much sense in most cases).
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: DTS-HD MA 8 Channel (7.1) Audio Passthrough - Possible?

Post by rollin_eng »

Rodeo wrote: Wed Aug 16, 2017 5:48 pm
rollin_eng wrote: Wed Aug 16, 2017 7:47 amThe mixdown is for the encoder and I believe that will only encode up to 5.1, if you are doing passthru there is no mixdown.
Some encoders (FLAC, Vorbis, maybe Opus) can encode 6.1 or 7.1 content, if the input has the corresponding channels. Since our DTS decoder doesn't support XXCH extensions, the input is actually 5.1 for re-encoding purposes, and HandBrake doesn't upmix (nor would upmixing make much sense in most cases).
Indeed, I should have said that the mixdown is for the 'selected' encoder. While some do support 7.1 some don't even support greater than stereo - looking at you MP3.
Post Reply