Apple TV and 5.1 support - some definitive answers

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Locked
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Apple TV and 5.1 support - some definitive answers

Post by maurj »

Interesting article about 5.1 support on the Apple TV, seems to back up what people have been reporting here...

http://www.thismuchiknow.co.uk/?p=34

Nice linkback for Handbrake too :-)

- maurj
exodar
Posts: 49
Joined: Wed Jan 24, 2007 4:12 pm

Post by exodar »

That was an excellent article! Finally someone took the time to accurately test all of the variables present at the moment. I am so torn on this whole topic because I have a 5.1 surround sound system and I would like to preserve that audio in my rips if at all possible, but it just doesn't seem like its quite there yet.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

maurj, my independent testing here has born that article out to be true.
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

And yet, there were reports that the latest version of QT outputs Pro Logic II from 5.1AAC on optical-equipped Macs - is the behaviour different or are those people just plain mistaken?
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hawkman,

I think most people think they're hearing DPL II, when in fact they aren't. Without test files it's very hard to test this conclusively. The separate Center channel from QuickTime is probably throwing them off.

This article backs up the testing we did with kevinbal on the #handbrake IRC channel too, and it's interesting that Dynaflash gets the same results. Looks like we have a conclusive state of play.

As for what this means for the next version of Handbrake... well, at the moment Apple TV users would be better off *not* extracting 5.1 AAC in the next version of Handbrake. If they do, they'll end up getting QuickTime's 3.0 mixdown. If they just extract a stereo mix, then Handbrake (specifically a52dec) will mix the 5.1 source down to a 4.0 DPL I mix in a 2.0 stereo track. (This is a change from the current version of Handbrake, which just mixes 5.1 down to 2.0 stereo). Hope that makes sense!

- maurj
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

Handbrake output DPL-compliant stereo now? I didn't know that... That's pretty hot.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hawkman: the next release of Handbrake will mix 5.1 down to DPL I. The current release - MediaFork 0.8.0b1 - still mixes 5.1 down to stereo.

- maurj.
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

Ah, sorry, didn't want to confuse anyone. I'm building from svn anyway.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Good stuff :) I was just being explicit about it, to avoid confusing any forum users who might not know the difference.

- maurj
ActiveFan
Posts: 5
Joined: Thu Mar 15, 2007 2:45 am

2.0 1.0 Stereo, etc

Post by ActiveFan »

I understand the need for 5.1 audio eventually for modern movies, etc. But im confused on the details or limitations of any audio below that ceiling. I have a lot of old movies on DVD, and old tv shows that obviously were never in 5.1. Most of them are probably originally mono (with a 1.0 digital track on the DVD) or stereo, which i will assume is a DD 2.0 track on the DVD.

Question is , what am i best using to encode with Handbrake/MediaFork. Should i just use the current version of Handbrake which converts to stereo? or will the next version be better?

Im not sure how they encode DVDs with AC3, but i obviously dont want my old movies or tv shows having dialog coming out of left/right speakers, i do want it going through the center channel, with whatever i can going out to the L/R stereo speakers in the case of a movie from the 1970s that might have stereo elements as well.

Let me add a twist, i dont necessarily care if this is appletv compatible only , as i would like it to work on a mac mini basically (appletv would be a bonus), and maybe streaming to a xbox360...and i apologize if this makes the question not fit into the forum category (moderators feel free to move it)
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi ActiveFan,

The current version - MediaFork 0.8.0b1 - will extract a 1.0 AC3 track to stereo, upmixing the mono source to both left and right. The upcoming version - Handbrake 0.8.5b1 - will extract it as a true mono track, if you're exporting your audio as AAC or Ogg Vorbis. Most media players will then take this mono track and mix it across a stereo output. Certainly all of the QuickTime ones do (QuickTime Player / iTunes / Front Row / Apple TV).

So, there's no real difference in practice. The only difference is that the upcoming version's mono tracks will take up less file space than the current version's stereo tracks.

BTW, some "mono" movies may actually have a stereo track on the DVD anyway, with the mono original copied to left and right, in which case you'll get stereo with both the current and upcoming versions of Handbrake.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Something I forgot to mention - it would be interesting to see what QuickTime (Player, iTunes, Front Row) does with a mono track when playing it over the optical output of a mac mini. QuickTime might simply mix the mono up to stereo; or it might use the same matrix-encoding it uses with 6-channel AACs to output a Dolby Pro Logic-style mix with the mono track matrix-encoded into the center channel. If you get to test this, do let us know what you find out :)

- maurj
ActiveFan
Posts: 5
Joined: Thu Mar 15, 2007 2:45 am

Post by ActiveFan »

Thanks! That being said, what settings would you recommend for future prooofing these movies the best i can. MP4, AVI, MOV, OGG, MP3, AAC, AC3, etc. For all practical purposes, the video quality of these old movies/tv shows will never be better than the current (e.g. 640x480 H.264) quality can encode anyway, so whatever i encode to, could well last a lifetime. So what would be the best video and audio settings so that i could feel comfortable as hardware or platforms change (appletv, xbox, vista, and all future versions of the same)

Also with the thought of using album art (sorry im oh so new to all this)
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

Here is another article which, if true, indicates it is a hardware problem for receivers, not appleTV. But, in any case, where this all leads is anyone guess.

http://roughlydrafted.com/RD/RDM.Tech.Q ... 2B75A.html
dro
Posts: 11
Joined: Mon Mar 26, 2007 1:12 pm

Post by dro »

dynaflash wrote:Here is another article which, if true, indicates it is a hardware problem for receivers, not appleTV. But, in any case, where this all leads is anyone guess.

http://roughlydrafted.com/RD/RDM.Tech.Q ... 2B75A.html
That "Ten Myths" article seemed to me to be the best explanation of the current 5.1 situation with regards to Apple TV. It makes total sense to me.

So if I understand it correctly, the current svn version of HB, with support for 6 channel AAC, should work fine with Apple TV mixing it into a Pro Logic compatible format. Is that correct? Has anyone tested that? Is it worth it for me to download it?
Confused Amused
Posts: 37
Joined: Wed Mar 28, 2007 6:27 pm

Post by Confused Amused »

Ran some tests with my aTV and MediaFork this afternoon. I'm using the latest SVN build and found some interesting results. I'm one of the early adopters here trying anamorphic AND 6.0 audio. Not sure what's causing my problems so I'm trying to narrow it down.

I can't say if the hardware is limiting the audio and/or video here, but I can tell you what I saw and heard. Let me clarify my "results" are on the aTV. All of these videos play smoothly and are in sync on my 2.0 GHz iMac.

My settings:

MP4 (AVC/h264 & AAC) - h.264 Main Profile
2 Pass Encoding
Anamorphic
6.0 AAC Audio

Test 1:
Video Bitrate: 5000
Audio Bitrate: 320
Result: Audio noticeably off the video. Video shaky, looks to be skipping frames

Test 2:
Video Bitrate: 3000
Audio Bitrate: 320
Result: Much smoother playback. Audio may be off ever so slightly.

Test 3:
Video Bitrate: 5000
Audio Bitrate: 192
Result: Audio appears in sync. Video seems to skip frames or play "catch up" once in a while which looks awkward, almost like a fast-forward. Not real smooth.

Test 4:
Video Bitrate: 3000
Audio Bitrate: 192
Result: Best result so far. Audio appears in sync and video is smooth.

I know aTV is only spec'ed at 160 kbps AAC so does anyone know if I'm just over-utilizing the audio processor in this thing by going up higher, like I did with 320kbps audio? I can hear the audio fine, but it definitely appears not in sync with the video. Or can the video chipset not handle 5000kbps video? It definitely isn't smooth. Anyone else tried this yet?

I still have some more tests to run to see be conclusive, but one of these (or a combination) is overtaxing the aTV.

High Audio Bitrate
High Video Bitrate
Anamorphic Video
6.0 AAC

Any ideas?

Disclaimer: I can't say if the 6.0 audio actually works, sorry. I don't have a receiver or speakers to test it with but I'm planning on the future by ripping this way. :(
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

dro wrote:So if I understand it correctly, the current svn version of HB, with support for 6 channel AAC, should work fine with Apple TV mixing it into a Pro Logic compatible format. Is that correct? Has anyone tested that? Is it worth it for me to download it?
As I understand it, testing has shown that the ATV downmixes the 5.1AAC to a Pro Logic I-like mix - but it's actually more like 3.0, not even the 4.0 that PL I is. Two separate sources I've read disagree with that part of the article, so I wouldn't take it as gospel yet.
incubowski
Posts: 20
Joined: Thu Mar 29, 2007 3:09 pm

Out of Curiosity....

Post by incubowski »

So I think it will be amazing if the next version of HandBrake mixes the 5.1 AC3 Dolby Digital Soundtrack to Dolby Pro Logic I Surround (4.0 channels) for the purposes or watching on Apple TV (or whatever else for that matter). However, is there any technical reason that the 5.1 AC3 Dolby Digital Soundtrack couldn't be converted to Dolby Pro Logic II Surround (5.1 channels). I am not trying to sound picky and I have no idea the extensive work that goes into programming since I haven't done any since a computer science class in high school (if that can be called programing). I just think it would be amazing to get a 5.1 soundtrack over 2-channels as opposed to a 4.0 soundtrack over 2 channels, just wonder if it's possible.

EDIT: I'm a retard and think I just answered my own question. 5.1 AC3 Dolby Digital Soundtrack will really be encoded to Dolby Surround (sometimes referred to as Dolby Pro Logic). However, Dolby Pro Logic isn't how it's ENCODED it's how its DECODED. So basically the next version of HandBrake will make a Dolby Surround audio track that will be decoded as 4.0 if you have a Dolby Pro Logic I capable receiver or 5.1 if you have a Dolby Pro Logic II capable receiver? Am I right yet?

("In 2000, Dolby introduced Dolby Pro Logic II (DPL II), an improved implementation of Dolby Pro Logic. DPL II processes any high quality stereo signal source into "5.1"—five separate full frequency channels (left, center, right, left surround and right surround) plus one low-frequency-effects (deep bass) channel. Dolby Pro Logic II also decodes 5.1 channels from stereo signals encoded in traditional four-channel Dolby Surround. DPL II implements greatly enhanced steering compared to DPL, and as a result, offers an exceptionally stable sound field that simulates 5.1 channel surround sound to a much more accurate degree than the original Pro Logic." Thank you Wikipedia)

Wouldn't that technically mean 5.1 sound from the Apple TV (assuming you have a compatible receiver). I know not 5.1 distinct channels, I know not as good as Dolby Digital or DTS, but 5.1 nonetheless.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

If your receiver is in DPL2 mode, it will attempt to output the audio using the DPL2 processes. So you should hear something from all of the speakers in a surround environment. The results will vary based on the source of course, and would definitely sound better if the source was optimized for DPL2 playback.

I believe the reason HB downmixes to DPL1 is that is all the library used can do. I haven't seen any open-source/free DPL2 solutions yet (but I haven't been looking either).
e71
Posts: 15
Joined: Thu Mar 29, 2007 7:14 pm

Post by e71 »

Any chance that any of the supported video container files support an audio stream that can contain DTS? Since the Apple TV can output DTS over the optical S/PDIF interface when embedded as an uncompressed 16-bit stereo signal, in theory, it should be able to do so while playing back video. But that would depend on a video file format that can contain an uncompressed 16-bit audio stream.
rigormortis
Posts: 10
Joined: Fri Mar 23, 2007 5:22 pm

"Ten Myths" article

Post by rigormortis »

I downloaded the dts sample provided as a link in that article and played it through my atv which is attached via optical to my DTS capable receiver. No Joy :( I'm not sure I buy every thing this guy has said, but he does make a good argument for the possible reasons Apple has stuck with DPL for now (yes, with the exception of some of their AAC 6 chan. trailers)
Anamonde
Novice
Posts: 71
Joined: Fri Mar 16, 2007 11:11 pm

Re: "Ten Myths" article

Post by Anamonde »

rigormortis wrote:I downloaded the dts sample provided as a link in that article and played it through my atv which is attached via optical to my DTS capable receiver. No Joy :( I'm not sure I buy every thing this guy has said, but he does make a good argument for the possible reasons Apple has stuck with DPL for now (yes, with the exception of some of their AAC 6 chan. trailers)
Works great for me... is your receiver rated to play DTS & Dolby Surround (AC-3)?
rigormortis
Posts: 10
Joined: Fri Mar 23, 2007 5:22 pm

Post by rigormortis »

Yep, it plays both DTS and AC-3. I've got a few DTS DVDs that play fine through my receiver. Humm...I wonder what the difference is in our setup. I downloaded the clip called dts_diatonis_io_afos. which one did you try?
sd51
Posts: 4
Joined: Mon Apr 02, 2007 6:30 am

DPL2 Encoding

Post by sd51 »

I'm no audio software engineer, but I'd like to help any way that I can. I have a lot of DVDs that I would very much like to save as h.264 480p DPL2/AAC. It really seems to me that Dolby Pro Logic II is the most efficient way to save a multi-channel soundtrack from a DD/DTS DVD.

DPL1 would be OK in a pinch, but if I start now, DPL2 might eventually become available and I'd have to start all over again.

Here's a side question: Say I have a movie file with DPL2 5.1 audio. If I feed that into a receiver that only knows how to decode DPL1, what happens? Will it gracefully degrade to 4.0? Or will it have to go all the way down to 2.0, and then my DPL1 receiver tries to guess the surround the best it can?

My real question: So, what's the big barrier to adding DPL2 to Handbrake/Mediafork?

nightstrm said:
I believe the reason HB downmixes to DPL1 is that is all the library used can do. I haven't seen any open-source/free DPL2 solutions yet (but I haven't been looking either).
DPL2 was released seven years ago and nobody's written an Open Source AC3/DTS to DPL2 transcoder? Here's a pretty comprehensive thread on the encoding of DPL2:
http://forum.doom9.org/showthread.php?t=105869

There seems to be some software to do it, but mostly for Windows and much of it is not free.

Hope this helps.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi sd51,

I've spent today working on patching liba52 to encode to DPL II, and thanks to that Doom9 post, I think I have something working :) Still needs some work - and it'll only be 5.0, not 5.1 - but I'm hearing separate left and right surround through my DPL II amp here, which is the killer thing.

Just need to patch it properly, and then work out if and when we can include it in Handbrake!

- maurj
Locked