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.
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Post by deckeda »

Agreed, Anamonde. If 160kbps is a hard limit for iTunes, I request that any development here be limited to that as well. It would be insane to have a version of HB for hacked AppleTVs and one for stock AppleTVs.

Or ... imagine another checkbox in the GUI: "Have you hacked your AppleTV?" (For the humor-challenged, that's a joke.)
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

TBH, I'm not sure that 160kbps *is* a hard limit for Apple TV audio. I need to test this, but I'm pretty sure that it was something about the video format I'd used, rather than the audio bitrate.

Anyway, the new files definitely work!

- maurj
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

maurj wrote:TBH, I'm not sure that 160kbps *is* a hard limit for Apple TV audio. I need to test this, but I'm pretty sure that it was something about the video format I'd used, rather than the audio bitrate.

Anyway, the new files definitely work!

- maurj
I have been consistently using 320 for audio bitrate with no problems whatsoever on my appleTV right out of the box. I know cdaiger has been as well.
Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Post by Berylium »

maurj,

Your 5_1_DOLBY_dpl2_160kbps.m4v loads in iTunes, streams to my AppleTV, and plays in a Dolby PL II 5.0 mode as expected on my receiver. Great, great work!

Also, all my movies have been encoded with AAC 5.1 at a bitrate of 256 or higher so I also concur that the 160kbps of the previous files was probably not the problem.

-Berylium
Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Post by Berylium »

maurj,

Might you also consider making the "Extract 5.1 DD to 6-channel AAC" option something you could append to either language track? As it is now you either extract to AAC 5.1 on all language tracks or none.

My thinking is, when you release the code allowing for Dolby PL II encoding I'll set that for Language 1 and do the AAC 5.1 extraction for language 2. Then, after the encode is done, I'll just disable the AAC 5.1 track from Quicktime (which may not be necessary since I believe the AppleTV will default to audio track 1). If/when Apple allows for AAC 5.1 --> AC-3 on-the-fly transcoding or AAC 5.1 passthrough I'll open each movie, disable the Dolby PL II encoded track 1 and enable the AAC 5.1 track 2. This way I won’t ever have to bother with re-encoding movies or audio.

Further, is there a 2 language track limit in the .mp4 container? I doubt there is but Apple/iTunes may enforce a limit....

thanks for your consideration and all your tremendous work,

Berylium
incubowski
Posts: 20
Joined: Thu Mar 29, 2007 3:09 pm

Post by incubowski »

I finally had the time to test the files on my setup. The DPLII file played amazing (I know other people have already confirmed this but though I would too). I cannot wait until this makes it to an SVN release. I will be downloading it as soon as I see it mentioned in the trac timeline. Great work! As a side note I also messed with the 5.1 AAC, I tried playing it hooked up with stereo connectors, I have an optical cable but I got DPLII to play over the RCA cables so I thought I would see what happens with the 5.1 AAC over RCA stereo cables. It was lame, not even DPLI, def. more like 3.0 sound as has been reported.
sd51
Posts: 4
Joined: Mon Apr 02, 2007 6:30 am

Post by sd51 »

For what it's worth, I tested those files for you too even though I only have DPL1. Mostly, I wanted to see what happened when I sent these files through a DPL1 processor.

Files are being tested with Quicktime 7.1.5 on a Powerbook G4 867MHz outputting analog stereo. Also, I tested them with Quicktime 7.1.5 on a MacBook Pro 2.33GHz Core2 Duo outputting optical. My receiver is a Denon AVR-3300 powering a 5.1 system of NHT speakers.

First, I wanted to see that my system was processing correctly so I put in the only DVD I have that has a speaker test: The Wall. All systems go.

Here's what I found:
(First of all, I found out where maurj got his source file for the test :wink:)

5_1_DOLBY_dpl1_160kbps.m4v
This one worked as advertised. I got 4.0 discrete channels, with barely a whisper coming through the front l/r speakers when the center and rear channels were active.

5_1_DOLBY_dpl2_160kbps.m4v
As expected, I didn't get 5.0. In fact, I got something like 3.0. Left, Right, and Center were as discrete as the dpl1, but the surround channels came through the front at full blast in addition to the rear. (Left and Right surround were mixed together.) Interestingly enough, though, the front, right, and center did NOT come though the rear speakers. So, it was some weird cross between 3.0 and 4.0. 3.5 perhaps?

5_1_DOLBY.mp4
Much like dpl2, the surround channels came through the front speakers at full blast, but nothing came through the rear speakers. This really was 3.0.

As far as I could tell, it didn't matter whether I used the optical port on the MBP or the analog port on the PBG4, I got the same result through my receiver.

Believe me, I'm itchin' for my Fosgate FAP-T1+ to arrive. Then the real fun will begin.
Diranged
Posts: 26
Joined: Fri Mar 23, 2007 7:41 pm

Post by Diranged »

maurj,
great job so far! I'm echoing the other comments... the DPL I and DPL II worked just great. It'd be nice to try to add in the LFE channel to the DPL II stream, but 5.0 is still pretty good. My Denon does a good job of 'faking' the LFE channel anyways.

As i understand it, when the DPL stuff goes into SVN, it'll also give you the ability to write out a single movie file with 2 audio tracks -- one 5.1 AAC and a 5.0 DPL II ... so that if apple decides to fix the AAC -> AC3 issue, then we don't have to re-rip our stuff...

is that right?
Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Post by Berylium »

Diranged,

The two audio track DPLII & AAC 5.1 option is something I mentioned in an earlier post. It's something that I think could potentially save a lot of time in the future. Further, once maurj checks in the DPLII code all the pieces will be in place to make it happen. As it stands now, however, there are two problems outside of maurj's DPLII code not being quite ready. One, I've read that the present Mediafork .8 beta has broken the ability to add a second audio track for the time being (I haven't tested this, just read about it), so that will need to be re-enabled and is scheduled for Handbrake .8.5. Two, at present, when you select AAC 5.1 output it's a selection for both audio tracks. This is easily fixed by adding a second AAC 5.1 encode option for track 2 and binding the original option to track 1 only.

-Berylium
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

Berylium wrote:One, I've read that the present Mediafork .8 beta has broken the ability to add a second audio track for the time being (I haven't tested this, just read about it), so that will need to be re-enabled and is scheduled for Handbrake .8.5.
Second audio track was fixed some time ago in the svn courtesy of saintdev.
Diranged
Posts: 26
Joined: Fri Mar 23, 2007 7:41 pm

Post by Diranged »

dynaflash wrote:
Berylium wrote:One, I've read that the present Mediafork .8 beta has broken the ability to add a second audio track for the time being (I haven't tested this, just read about it), so that will need to be re-enabled and is scheduled for Handbrake .8.5.
Second audio track was fixed some time ago in the svn courtesy of saintdev.
Great... so only two things -- the DPL II support from Maurj, and the modification to the selections. Lets get that done! :P
logich
Posts: 1
Joined: Thu Apr 05, 2007 9:42 pm

Post by logich »

I found a post from the 3vix forum about problems with producing 5.0 output instead of 5.1. Though this relates to manually creating the file in Quicktime Pro, I was wondering if it might help with producing the 6 channel AAC output.

Apparently there's an issue with manually creating a file and I've been looking through the code to see if I can find where this might fit in (perhaps in the interface with faac).

The post states that if you create a new empty quicktime document and "add" each audio file then it will produce 5.1. However, opening a existing audio file and adding in the other 5 tracks will produce 5.0. This may be some kind of quicktime decoding bug or it could be unrelated.

http://forums.3ivx.com/index.php?showtopic=82192
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi all,

Great news that my DPLII file is working for you all!

Some more good news: I've been working on expanding the audio options to enable you to specify a different mixdown for each requested audio track. So you could convert track 1 to 5.1 AAC, and track 2 to DPLII. Or even track 1 to DPLII, and then also track 1 to 5.1 AAC, as suggested. I think QuickTime apps would play all enabled soundtracks, so we might need to give the option to set each track as disabled... I'll have a think :) This is working in the CLI (in my local copy here).

I hope to have something checked in by the middle of next week, if not before, and will need dynaflash's help on adapting the Mac GUI... but it's looking good so far!

- maurj.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

maurj wrote:Hi all,

Great news that my DPLII file is working for you all!

Some more good news: I've been working on expanding the audio options to enable you to specify a different mixdown for each requested audio track. So you could convert track 1 to 5.1 AAC, and track 2 to DPLII. Or even track 1 to DPLII, and then also track 1 to 5.1 AAC, as suggested. I think QuickTime apps would play all enabled soundtracks, so we might need to give the option to set each track as disabled... I'll have a think :) This is working in the CLI (in my local copy here).

I hope to have something checked in by the middle of next week, if not before, and will need dynaflash's help on adapting the Mac GUI... but it's looking good so far!

- maurj.
Can't wait for this to be added so I can play around with it... this is the last piece that I've been waiting for before beginning a mass DVD conversion for my AppleTV... only need to figure out why in the heck my audio is dropping out on my encodes, but that is for another thread! :)

Great work so far! Between this and chapter support, Handbrake has become the program for encoding content for ATV.
jonathankit
Posts: 8
Joined: Tue Mar 27, 2007 1:42 am

Post by jonathankit »

maurj wrote:Hi all,

Great news that my DPLII file is working for you all!

Some more good news: I've been working on expanding the audio options to enable you to specify a different mixdown for each requested audio track. So you could convert track 1 to 5.1 AAC, and track 2 to DPLII. Or even track 1 to DPLII, and then also track 1 to 5.1 AAC, as suggested. I think QuickTime apps would play all enabled soundtracks, so we might need to give the option to set each track as disabled... I'll have a think :) This is working in the CLI (in my local copy here).

I hope to have something checked in by the middle of next week, if not before, and will need dynaflash's help on adapting the Mac GUI... but it's looking good so far!

- maurj.
So does this mean that each file we create with handbrake (h.264 file) will have to audio tracks? If so, that is really cool and I didn't think that could be done. How would we be able to choose the audio track while listening? (of course, if i'm wrong, disregard all questions)
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Post by deckeda »

jonathankit, here's more on that: http://handbrake.m0k.org/forum/viewtopic.php?t=777
Confused Amused
Posts: 37
Joined: Wed Mar 28, 2007 6:27 pm

Post by Confused Amused »

Maurj, you rock! Once this is checked in I'll probably start converting all my DVDs. Stereo sound wasn't worth it to me, but 5.0 will definitely cut it. Thanks so much for working on this.
gbooker
Posts: 43
Joined: Sat Apr 07, 2007 8:38 pm

Post by gbooker »

Just found this thread while looking for DPLII information. Maurj, thanks for the patch. I will look to implement it in my A52Codec as well. It needs to support 2F2R and 1F2R as well, but on the right track.

Just wanted to post yet another option for y'all. Several days ago I played with a friend's ATV. In using ATVFiles and and AVI file with AC3 audio in it, I managed to get my codec to support passthrough. That means full 5.1 Dolby Digital, not DPL! I have talked with the author of ATVFiles, and outlined exactly what else needs to be done for this to "just work", and I expect this is the final solution to the problem. I have been told that it works on normal macs as well (don't have a decoder here to test). Again, it needs some setup, but nothing too difficult.

Perhaps Handbrake needs the option to put AC3 audio into mov files. I certainly would appreciate this one.

P.S. I doubt this will "just work" with Apple's vanilla interface because it won't change the sample rate of the ATV's output for us. Without this change, it will loose audio sync, really fast.
Diranged
Posts: 26
Joined: Fri Mar 23, 2007 7:41 pm

Post by Diranged »

That's great news... the fix I had been hoping for is a 'codec' addon to the ATV that will allow AC3 passthrough. Combine that with a .m4v file with the original MPEG2 stream in it from a DVD and you end up with a VERY quick ripping process to have full-quality DVD files play on an AppleTV. The real trick will be whether or not you can stream DVD quality movies over 802.11n without any sync problems. If you can .... it'll be fantastic, and worth hacking my AppleTV!
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

gbooker wrote:I will look to implement it in my A52Codec as well.
Ooo! Celebrity guest!

I keep your Trac ticket #4 about ac3 pass-through in my bookmarks menu...and I see there's been a lot of activity there, in line with your post here! :)

Thanks for the heads-up, and thanks for all your work on A52Codec.

maurj, any comments on the particulars of passing through .ac3 in an .mp4 (or maybe trying libquicktime again, for .mov like gbooker wants)? Not standards-compliant, of course, but could it be squeezed in there somehow?
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

jbrjake: "almost definitely yes" to ac3 in mp4 (although I'll need to play around with it, and see if QuickTime is happy to recognise it via its mp4 importer). I think it should be possible, and I'd rather not switch to libquicktime if we can help it. I'll look at this as soon as the DPL II code is checked in (I should know more than enough about libmp4v2 and a52dec now to try it...)

gbooker: good to hear from you, and great news that A52Codec can now do passthru! I'll try this out on my Intel mac with some test files over the next few days. TBH, this is the absolute ideal, and I spent an age trying to find a way to do that before giving up and taking the DPL II route. Brilliant stuff! Now I just need to crack open my Apple TV and start messing...

Good stuff also that you've been able to incorporate my patch into A52Codec. Happy to help! Any chance of a mention in the AUTHORS file? ;)
Confused Amused
Posts: 37
Joined: Wed Mar 28, 2007 6:27 pm

Post by Confused Amused »

Wait, so is the DPL2 code checked in already? Looking over the recent updates to the Trac it looked like it was in there, but your last post indicated it wasn't yet.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi Confused Amused,

No, DPL2 support isn't checked in yet. The patched liba52 library has been checked in so that it could be added to the prebuilt contribs, but it's been Easter bank holiday here so no chance for me to finish the DPL2 code yet. It's essentially done for the CLI, and this code should be checked in Tues / Weds this week. After that, we'll work on getting it into the GUI asap. And then investigate AC3 passthru :)

- maurj
Confused Amused
Posts: 37
Joined: Wed Mar 28, 2007 6:27 pm

Post by Confused Amused »

Ah, thanks. Guess I don't know enough about all the components to figure out when stuff is done. Whoops! Thanks for working on this though.

Is there going to need to be any changes to the GUI immediately? I know you mentioned offering the ability for the user to select different mixdowns for different tracks so that would need to be added at some point, but is the DPL2 mixdown going to just be the default behavior, replacing the current DPL1 default action?
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Post by nightstrm »

maurj wrote:Hi Confused Amused,

No, DPL2 support isn't checked in yet. The patched liba52 library has been checked in so that it could be added to the prebuilt contribs, but it's been Easter bank holiday here so no chance for me to finish the DPL2 code yet. It's essentially done for the CLI, and this code should be checked in Tues / Weds this week. After that, we'll work on getting it into the GUI asap. And then investigate AC3 passthru :)

- maurj
OK, this goes along with what I noticed this morning when I checked an encode I did overnight. Guess I should actually read the descrptions on the trac timeline before jumping the gun. :D
Locked