Page 1 of 2

HD Audio 7.1 being backed up as 5.1 only

Posted: Wed Jan 23, 2013 3:25 pm
by groverj3
Apologies if this has been answered somewhere here already, but I looked through the forum and couldn't find any similar issues.

I'm running MakeMKV v1.7.10 on my 64-bit xubuntu 12.10 htpc. Working to digitize my DVD and blu-ray collections. I had no issues with DVDs whatsoever and started on the blu-rays. I have run into a rather odd problem.

All the DTS-MA and Dolby TrueHD 7.1 audio streams are being saved as 5.1. I've been transcoding with Handbrake after the MKV backup from the discs and it sees only 5.1 tracks. Also, when playing back the un-transcoded files in either XBMC or VLC they both show only 5.1 DTS-MA or TrueHD audio streams for any that should be 7.1. This isn't a huge problem since I only have a 5.1 system, but I like backing up the original audio tracks in case I do get a 7.1 system in the future.

I know that I am specifically selecting the 7.1 audio (plus, the movies in question have only a 7.1 HD audio track, no 5.1 DTS-MA or TrueHD). This happened with The Avengers blu ray specifically, but it has also happened with others. I also had tons of video corruption with The Avengers and Looper, but I'm going to try to clean the drive before asking about that as well since I had none before ripping The Avengers.

Hardware details (if at all helpful):
Core i3 3225 w/Intel HD 4000 gpu
Asus P8H77-I
LG WH14NS40 drive
4 gb DDR3 1600 ram

Any idea what's going on? Am I forgetting some sort of really obvious setting?

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Wed Jan 23, 2013 10:09 pm
by Smithcraft
How about a log from Handbrake?

SC

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Wed Jan 23, 2013 11:41 pm
by groverj3
I don't think this is a Handbrake problem because multiple players show only 5.1 HD audio tracks in MKV files after extraction with makemkv (before encoding them with handbrake).

I can provide one after I try to rip and encode another movie. It may take some time, but I can get one for you.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Wed Jan 23, 2013 11:53 pm
by Romansh
HandBrake can't decode DTS-HD. It can only decode the 5.1 DTS core (or the 6.1 DTS-ES core in the case of DTS-HD 6.1).

It should be able to decode TrueHD, even 7.1, however.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Thu Jan 24, 2013 12:51 am
by groverj3
Romansh wrote:HandBrake can't decode DTS-HD. It can only decode the 5.1 DTS core (or the 6.1 DTS-ES core in the case of DTS-HD 6.1).

It should be able to decode TrueHD, even 7.1, however.
It's not showing up in the MKVs that MakeMKV creates. I'm not running it through handbrake yet.

Also, I'm using a Handbrake nightly build that can decode DTS-HD so that shouldn't be an issue either. I probably should've mentioned that.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Thu Jan 24, 2013 12:59 am
by groverj3
Image
MakeMKV

Image
Handbrake

Image
VLC

Image
XBMC

Just a little proof that I'm not crazy. :lol:

I am thoroughly confused. I don't think a handbrake log will help. I didn't enable logging when I ripped this, so I'll look for another disc with 7.1 and enable it this time in makemkv.

edit: Apologies for the large pics.

double edit: My settings.conf in my ~/.makemkv has two lines that look like this. Could this have anything to do with it?

Code: Select all

app_dtshddec = ""
app_ffmpeg = ""

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Thu Jan 24, 2013 2:12 am
by groverj3
I ended up ripping Prometheus. The log file from MakeMKV didn't contain any information about the audio.

Any other ideas?

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Thu Jan 24, 2013 3:13 am
by robpdotcom
I think you are getting bad info from XBMC and VLC - they are just showing you the number of channels in the DTS core. I don't believe it's even possible for MakeMKV to convert DTS-HD MA 7.1 to DTS-HD MA 5.1.

I'm not sure it will ease your mind any, but you can open the mkv with MakeMKV and it will show that there are 8 channels. I'm not sure if it's available for Mac (it looks like you're on a Mac?), but MediaInfo will show you the channels of both the DTS-HD MA, and the DTS core.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Thu Jan 24, 2013 4:44 am
by groverj3
robpdotcom wrote:I think you are getting bad info from XBMC and VLC - they are just showing you the number of channels in the DTS core. I don't believe it's even possible for MakeMKV to convert DTS-HD MA 7.1 to DTS-HD MA 5.1.

I'm not sure it will ease your mind any, but you can open the mkv with MakeMKV and it will show that there are 8 channels. I'm not sure if it's available for Mac (it looks like you're on a Mac?), but MediaInfo will show you the channels of both the DTS-HD MA, and the DTS core.
Wow, what a simple solution. You're correct, opening them up either in makeMKV reveals that the 7.1 is still there. However, none of my player software is detecting it. VLC and XBMC apparently are only seeing 5.1.

The interesting thing is, after encoding with Handbrake and using the DTS-HD MA passthrough option the 7.1 is still there too. This is in spite of the fact that handbrake itself also only detects 5.1 channels on those streams. Quite odd, but I guess it hasn't disappeared. Now I'm just confused why nothing can see the extra channels. Not a huge issue I guess because I don't have the speakers anyway, but it's just confusing.

This is what I get for using Linux :lol:.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Fri Jan 25, 2013 2:48 am
by groverj3
Actually, this just got more confusing. MakeMKV sees an 8 channel audio stream on my encoded files but mkvinfo shows only 6. The bitrate is unchanged so it isn't just taking the normal DTS lossy audio instead.

I'm rebuilding makemkv and seeing if that affects anything...

edit: mkvinfo shows 8 channels on makemkv-made files, but only 6 after it's been run through handbrake. However, those encoded files show an 8 channel stream if opened back up in makemkv.

Additionally xbmc and vlc show only 6 channels after a file is made with makemkv even before running the movies through handbrake. I might just have to live with only having 5.1 audio on the few 7.1 discs I have for the time being.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Fri Jan 25, 2013 7:10 pm
by Romansh
The HandBrake nightlies, VLC and XMBC all use the libavcodec DTS decoder, which can't decode DTS-HD, only the core and the ES extension if present.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Fri Jan 25, 2013 7:41 pm
by groverj3
It's possible that you're right but I'm still not convinced that this is the problem. XBMC identifies the audio stream as DTS-HD MA but only 5.1 instead of 7.1. If it couldn't decode the HD audio stream why would it tell me that it is "Lossless?" Plus, the handbrake nightly build does have an option for DTS-HD passthrough. Keep in mind that this is happening whether or not I run the file through handbrake. Playing back the makemkv generated file gives me exactly the same result.

I'll try ripping with makemkv and remuxing the audio into an MKV with the transcoded video. Rather time consuming, but it's the one thing I haven't tried yet.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Fri Jan 25, 2013 8:16 pm
by Romansh
groverj3 wrote:It's possible that you're right but I'm still not convinced that this is the problem.
It's not only possible, it's certain :P
groverj3 wrote:XBMC identifies the audio stream as DTS-HD MA but only 5.1 instead of 7.1. If it couldn't decode the HD audio stream why would it tell me that it is "Lossless?"
Because the libavcodec DTS parser can detect HD extensions. But the decoder only skips them.

Also, libavcodec sets the channel layout based on what it will decode, rather than the full HD stream's layout.

Note: I believe XBMC uses FFmpeg, which has a few differences in its DTS decoder. It can sometimes decode up to one HD extension (XXCH or XBR, whichever comes first, if present). Most of the time, the XLL or XBR extension will come before the XXCH extension, so you'll rarely get 7.1 out of it though (one exception I can think of is low-bitrate DTS-HD High Resolution, where there's only enough room in the HD overhead to encode additional channels, but no XBR).
groverj3 wrote:Plus, the handbrake nightly build does have an option for DTS-HD passthrough.
Only a parser is needed for passthrough, not a decoder. HandBrake does pass the full DTS-HD track through, but if you re-encode a DTS-HD track to another format, only the core will be decoded.

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Fri Jan 25, 2013 8:51 pm
by groverj3
Romansh wrote:Only a parser is needed for passthrough, not a decoder. HandBrake does pass the full DTS-HD track through, but if you re-encode a DTS-HD track to another format, only the core will be decoded.
This is the only part that still doesn't make sense to me. I am passing the DTS-HD audio through when I finally do encode but mkvinfo shows that the extra two channels are dropped even though I selected passthrough. However, loading the file back up into makemkv shows that the 7.1 is still there.

This happens despite the fact that mkvinfo shows 7.1 audio on files created directly with makemkv.

Should I just trust what makemkv tells me over all the other tools then?

By the way, thanks for the quick replies. Don't want to come off as ungrateful for the help, it's just that multiple tools are giving me conflicting information and it bothers my scientist brain :lol: .

Re: HD Audio 7.1 being backed up as 5.1 only

Posted: Fri Jan 25, 2013 10:40 pm
by Romansh
groverj3 wrote:
Romansh wrote:Only a parser is needed for passthrough, not a decoder. HandBrake does pass the full DTS-HD track through, but if you re-encode a DTS-HD track to another format, only the core will be decoded.
This is the only part that still doesn't make sense to me. I am passing the DTS-HD audio through when I finally do encode but mkvinfo shows that the extra two channels are dropped even though I selected passthrough. However, loading the file back up into makemkv shows that the 7.1 is still there.
I believe HandBrake may be setting the number of channels at the MKV container level (incorrectly, since it sets it based on the core channel layout, and not the full one). That could explain the discrepancy. But the whole data is still there.