Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Kabeyun

macrumors 68040
Original poster
Mar 27, 2004
3,412
6,350
Eastern USA
Getting going ripping my Blu Ray media and I've read a ton about it. My goal is to have a 1080p video with 3 audio tracks: stereo (for iDevices), 5.1 surround (for my ATV playing through my surround receiver), and lossless (futureproofing). Thought I was doing everything perfectly but I've got a devil of a time getting audio out of my ATV2. My work flow as follows:

1. Rip Blu Ray using MakeMKV: selected the DTS-HD MA audio track

2. Transcode with Handbrake:
Track 1 - 0: English (DTS-HD MA) (5.1 ch)
Codec - AAC (CoreAudio)
Mixdown - Dolby PL II

Track 2 - 0: English (DTS-HD MA) (5.1 ch)
Codec - Auto Passthru (for some reason AC3 Passthru was not on the pulldown list, but under advanced options I disabled all but AC3 with a passthru fallback of AC3 (ffmpeg)
Mixdown: n/a

Track 3 - 0: English (DTS-HD MA) (5.1 ch)
Codec: - DTS-HD Passthru
Mixdown - n/a​

The result is a clip which plays audio on the Mac (either it's doing Track 1 Dolby PL II or it's properly decoding Track 2) and on my iPhone (properly decoding Dolby PLII) but not my ATV.

Things I've tried (based on suggestions in these forums):
- Setting the ATV audio to Dolby Digital ON
- Setting the ATV audio to 16 bit
- Saving in Subler with only Track 1 checked
- Saving in Subler with only Track 2 checked
- Saving in subler with both Track 1 and Track 2 checked (desperation)

The only odd thing about the process is that AC3 Passthru doesn't appear as an available codec, but I believe what I did with Auto Passthru forced the same thing. In fact I'm sure of it, because Subler reports Track 2 is AC-3, 6 ch. I am offered "AC3 (ffmpeg) as a codec, but only with the following mixdown options: Mono, Stereo, Dolby Surroud, Dolby PL II, and 6-channel discrete, none of which will give me 5.1 surround out of an ATV. Odd that Dolby Digital (what I'd want) isn't on the list.

Any heroic Handbrake experts out there? Thanks a bunch.
 

dynaflash

macrumors 68020
Mar 27, 2003
2,119
8
AC3 (ffmpeg) is what you want with a 6 channel discrete mixdown. That is AC3 5.1 Dolby Digital.
 

Kabeyun

macrumors 68040
Original poster
Mar 27, 2004
3,412
6,350
Eastern USA
AC3 (ffmpeg) is what you want with a 6 channel discrete mixdown. That is AC3 5.1 Dolby Digital.

I don't think that's true. Handbrake's own guide states otherwise, anyway. The 6-channel discrete mix down option produces a lower bitrate AAC audio stream, not AC3. Worse, It won't work over an optical audio cable.

Essentially I'm looking for the third option in that guide, plus a third lossless audio track (which I won't use for now). I assume the AC3 Passthru codec is not available in the pulldown because it doesn't exist in the source. But since the source is DTS-HD MA, there must be some way of creating an AC3 surround audio track plat plays nice with ATV.
 

GarrettL1979

macrumors 6502
Feb 15, 2012
330
0
I don't think that's true. Handbrake's own guide states otherwise, anyway. The 6-channel discrete mix down option produces a lower bitrate AAC audio stream, not AC3. Worse, It won't work over an optical audio cable.

Essentially I'm looking for the third option in that guide, plus a third lossless audio track (which I won't use for now). I assume the AC3 Passthru codec is not available in the pulldown because it doesn't exist in the source. But since the source is DTS-HD MA, there must be some way of creating an AC3 surround audio track plat plays nice with ATV.

Dynaflash = handbrake. I think he knows.
 

Pyromonkey83

macrumors 6502
May 24, 2009
325
0
I don't think that's true. Handbrake's own guide states otherwise, anyway. The 6-channel discrete mix down option produces a lower bitrate AAC audio stream, not AC3. Worse, It won't work over an optical audio cable.

Essentially I'm looking for the third option in that guide, plus a third lossless audio track (which I won't use for now). I assume the AC3 Passthru codec is not available in the pulldown because it doesn't exist in the source. But since the source is DTS-HD MA, there must be some way of creating an AC3 surround audio track plat plays nice with ATV.

Auto Passthru is attempting to find a way to automatically pass thru the file it for bit. This means you are getting 2 DTS audio streams, and more than likely you are getting one DTS-MA and one DTS Core (lossy) passthru. The reason why you don't have AC3 passthru is because you don't have an AC3 file to begin with.

What you want is to select AC3 (ffmpeg), then 6-channel discrete, then change the bitrate to whatever you want (640kbps is highest) just like dynaflash above said. Passthru will not work because there is no AC3 track to pass thru from. As the person above also stated, dynaflash is also one of the primary developers of handbrake so he very much so knows what he is talking about.
 

Robsta2142

macrumors newbie
Oct 22, 2012
11
1
Should look like this:

Screen_Shot_2013_01_17_at_14_40_59.png


Basically what Pyromonkey83 said. Also, if you are into preserving feature commentaries, you can add those in on a 4th, 5th, 6th etc. audio track by selecting the relevant track(s) from the drop down list. These are mostly already stereo tracks so you won't need to change any settings when adding them.
 

Kabeyun

macrumors 68040
Original poster
Mar 27, 2004
3,412
6,350
Eastern USA
Thanks all, and due props to you, dynaflash. Rippers everywhere owe you our A/V gratitude.

Auto Passthru is attempting to find a way to automatically pass thru the file it for bit. This means you are getting 2 DTS audio streams, and more than likely you are getting one DTS-MA and one DTS Core (lossy) passthru.
Interesting idea, but I don't think I was getting 2 DTS streams. In Track 2, I did select Auto Passthru, but under advanced options I disabled all but AC3 (including DTS). Looked like this:
r0rjndhR

Plus, Subler reports that Track 2 is AC-3, 6 ch. Please let me know if I'm missing something, but I think this means Handbrake's outputting an AC3, 5.1 stream.

The reason why you don't have AC3 passthru is because you don't have an AC3 file to begin with.
As I suspected in my 2nd post. Thx.

Should look like this:

Image
Hey, how'd you get that?? When I select the AC3 (ffmpeg) codec, my only mixdown options are: Mono, Stereo, Dolby Surroud, Dolby PL II, and 6-channel discrete. You have "5.1 Channels." Are you using the current version of Handbrake? Should I assume your "5.1 Channels" is the same as my "6 Channel Discrete"?

At any rate (and this in no way implies dynaflash is anything less than a god among mortals) the Handbrake surround sound guide explicitly states the output of a 6-channel discrete mixdown is AAC, not AC3, and won't work via optical out, which is how my ATV is connected. If neither is true, I'd say the Wiki is a little inaccurate, or at least confusing to a learner like me. Could anyone reconcile what y'all are saying (feeding a DTS-HD MA stream through the AC3 (ffmpeg) codec using 6-channel discrete mixdown will product a true 5.1 surround sound audio stream playable through an Apple TV with optical audio out to a surround receiver) with what Handbrake's tutorial materials teach?
 
Last edited:

Pyromonkey83

macrumors 6502
May 24, 2009
325
0
Interesting idea, but I don't think I was getting 2 DTS streams. In Track 2, I did select Auto Passthru, but under advanced options I disabled all but AC3 (including DTS).

Dynaflash can correct me on this if I'm wrong but If you did this then I think you ended up with a DTS track inside of an AC3 container which is jibberish to everything. Handbrake will have gotten confused and basically done the equivalent of taking a .mp3 music file and changing the extension to .jpg (picture) which would be absolutely worthless.

Hey, how'd you get that?? When I select the AC3 (ffmpeg) codec, my only mixdown options are: Mono, Stereo, Dolby Surroud, Dolby PL II, and 6-channel discrete. You have "5.1 Channels." Are you using the current version of Handbrake? Should I assume your "5.1 Channels" is the same as my "6 Channel Discrete"?

I believe he is using the nightly build of Handbrake and they have changed this. Not 100% sure on that. It doesn't matter, however, because 5.1 Channels is exactly the same as 6-channel discrete.

At any rate (and this in no way implies dynaflash is anything less than a god among mortals) the Handbrake surround sound guide explicitly states the output of a 6-channel discrete mixdown is AAC, not AC3, and won't work via optical out, which is how my ATV is connected.

According to the Handbrake wiki, there are these following articles that I'm assuming you either did not read fully or did not understand. I know that I had issues when I first started so I don't mean for that to be an insult or anything... This is complicated stuff!

Dolby Digital is the most common surround sound on DVDs. It sometimes goes by the name AC3. It's also part of the ATSC standard for high definition TV. Whereas Dolby Pro Logic only contains 2 channels of sound, Dolby Digital actually has separate, discrete channels for Center, Right, Left, Rear Right, Rear Left, and a subwoofer (or LFE--low frequency effects). This makes it "true" surround sound. The channels are far more distinct than with Pro Logic. However, the audio also takes up a lot more space; it is common for AC3 tracks to run at 448kbps (about 75 kbps per channel).

Also, you can definitely pass through the AC3 channel through the optical port, as can be seen in the following paragraph. The only difference is that it must be in the .m4v extension instead of .mp4 (both are mp4 containers).

QuickTime can decode AC3 audio but cannot pass it audio your optical port for use with a surround sound receiver. However, you can download a 3rd party QuickTime component from the open-source ​Perian project to achieve this. If you use the .mp4 container, you can pass-through AC3 audio in VLC, Perian, or on the AppleTV, although you have to end the file name in .m4v instead of .mp4 for QuickTime and the AppleTV.

Sources:

https://trac.handbrake.fr/wiki/SurroundSoundGuide
https://trac.handbrake.fr/wiki/AC3
 

dynaflash

macrumors 68020
Mar 27, 2003
2,119
8
the Handbrake surround sound guide explicitly states the output of a 6-channel discrete mixdown is AAC, not AC3, and won't work via optical out, which is how my ATV is connected. If neither is true, I'd say the Wiki is a little inaccurate, or at least confusing to a learner like me. Could anyone reconcile what y'all are saying (feeding a DTS-HD MA stream through the AC3 (ffmpeg) codec using 6-channel discrete mixdown will product a true 5.1 surround sound audio stream playable through an Apple TV with optical audio out to a surround receiver) with what Handbrake's tutorial materials teach?

Yep, the guide is way out of date. Thats from before we had the ffmpeg AC3 Encoder so the only way to get AC3 in your output file was if the source had it and you just "pass thru". Remember, each mixdown is paired to each tracks encoder (aac ac3 etc.) And yeah on the atv you have to be using the .m4v extension for mp4's which is a wickedly weird dealio apple has for enabling certain feautures (AC3 in mp4 and chapter markers) for apple devices.

Yes, Handbrake will now allow you to put your dts in an mp4 (previously was only mkv) However afaik its compatible with *nothing* as far as playback currently.
 

Robsta2142

macrumors newbie
Oct 22, 2012
11
1
I believe he is using the nightly build of Handbrake and they have changed this. Not 100% sure on that. It doesn't matter, however, because 5.1 Channels is exactly the same as 6-channel discrete.

Sure am. :)

According to the Handbrake wiki, there are these following articles that I'm assuming you either did not read fully or did not understand. I know that I had issues when I first started so I don't mean for that to be an insult or anything... This is complicated stuff!

Second that.
 

martinm0

macrumors 6502a
Feb 27, 2010
568
25
DTS-HD MA never works for me

Are DTS-HD MA audio tracks really supported? Any time I've tried to use that as the audio source I get a video file that seems to be skipping frames (and audio skips as well), or is just unplayable.

I currently use High Profile and add in three total soundtracks (2ch, 5.1DD and DTS pass thru). These play perfectly in iTunes/AppleTV and VLC supports DTS for M4V files and plays perfectly there.

Anyone actually using DTS-HD tracks in their conversions with success?
 

Kabeyun

macrumors 68040
Original poster
Mar 27, 2004
3,412
6,350
Eastern USA
Thanks everyone for your smarts! I've now got working a working m4v with DTS-HD audio apparently transcoded to Dolby Digital 5.1 surround. If I understand my amp correctly, it is seeing 5.1 audio. I still have to get confident with Subler (which I value for adding metadata) and which audio tracks get a checkbox before saving.

The only puzzle left, and this is probably beyond the scope of this thread, is the ATV's audio out. I have the ATV connected to my receiver via both HDMI and optical. My understanding is that AC3 audio gets sent through the optical output if Dolby Digital Out is set to On/16-bit. To test, I unplugged the optical cable from the ATV while playing the clip, but the audio remained playing. Not sure I care, as long as I'm really getting true high-bandwidth 5.1 audio. Does beg the question about the optical cable, though.
 

Pyromonkey83

macrumors 6502
May 24, 2009
325
0
Thanks everyone for your smarts! I've now got working a working m4v with DTS-HD audio apparently transcoded to Dolby Digital 5.1 surround. If I understand my amp correctly, it is seeing 5.1 audio. I still have to get confident with Subler (which I value for adding metadata) and which audio tracks get a checkbox before saving.

The only puzzle left, and this is probably beyond the scope of this thread, is the ATV's audio out. I have the ATV connected to my receiver via both HDMI and optical. My understanding is that AC3 audio gets sent through the optical output if Dolby Digital Out is set to On/16-bit. To test, I unplugged the optical cable from the ATV while playing the clip, but the audio remained playing. Not sure I care, as long as I'm really getting true high-bandwidth 5.1 audio. Does beg the question about the optical cable, though.

DD 5.1 can be transferred through either Optical OR HDMI dependent on what your receiver supports. If your receiver can support HDMI, then it can receive AC3 encoded audio through the HDMI port. Therefore, in your setup, it sounds like the Optical audio is redundant and pointless. I just have mine setup through HDMI, and if you set the Dolby Digital setting to ON it works perfectly (I don't bother with the 16-bit one though).

In terms of which Subler track to checkbox, you should have:

1. The Video Track (Only check one if you have multiple)
2. ONE Audio Track (Checkbox the 2-channel Dolby Pro Logic one ONLY)
3. The Chapter Track

Everything else should be unchecked. If you have Subtitle tracks, the checkbox unfortunately doesn't do anything at all in a mp4 container so it doesn't matter if you check one or not (also the forced function doesn't do anything either for the Apple TV).

Everything else should be unchecked.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.