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.
TheBum
Novice
Posts: 66
Joined: Tue Apr 10, 2007 12:03 am

Post by TheBum »

maurj wrote:And then investigate AC3 passthru :)
As far as I'm concerned, this justifies the risk of hacking the AppleTV. Now, if I only had an AppleTV...
Anamonde
Novice
Posts: 71
Joined: Fri Mar 16, 2007 11:11 pm

Post by Anamonde »

I have a AppleTV with the latest ATVFiles and Perian and A52Codec... upgraded everything, will beta test AC-3 passthrough for you.... let me know if you need help ;)
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

New Mixdown features

Post by ragboy »

I have been watching the svn repo, and I saw the mixdown features were all checked in. I first ripped maurj's 5.1 demo dvd iso, using the first track as the DPLII mixdown (160 kbps), and the second track as the AAC discrete 6 channels. I opened in quicktime, both tracks were there and enabled. Playing in quicktime sounded great, so I LEFT both enabled and moved over to my apple tv. I heard sound in the correct channels, all the way around, including LEFT SUR, and RIGHT SUR, just as promised. I didn't hear any issue, leaving both tracks enabled. Both QT and ATV seem to just play the first. This is a great solution. I can use DPLII, until something recognizes the AAC 5.1, and then just open those movies in QT and remove the DPLII tracks.

Excellent work. I would love to see AC3 passthrough, but at the same time, I can do this without hacking my ATV. I am not opposed to hacking it, but AC3 can only be in an AVI container, and I would rather keep MP4 as my container of choice. I took down my media center 2005, which was playing all of my ripped AVI/h.264/ac3 movies, and will now just be using my ATV.

As a note, I am using a Denon AVR 3805 connected via optical.

Excellent work!
Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Post by Berylium »

I attempted to encode three movies yesterday with a build from ~9am CST yesterday (12th). Two were MacTheRipper rips on my harddrive and one was to be ripped/encoded from the DVD drive.

All three movies were to be encoded at an average bitrate of 2,700kbps in full anamorphic video with two passes. Also, all three were given an audio track 1 of maurj's new Dolby PL II mixdown and an audio track 2 of AAC 5.1.

The only change between my previous encodes and what I did this time was the addition of the Dolby PL II track (and moving the AAC 5.1 to track 2).

I say that I attempted to encode because one movie completed successfully, the second movie completed pass one and about 1/3 of pass two, and the strait DVD rip didn't take place at all. Handbrake crashed during that second pass of the second movie encode. I can attest that this is not new to yesterday's build, I've had the same problem with previous nightly builds as far back as March 28 when I first started building my own copies of Handbrake. I cannot, however, nail down what exactly crashes Handbrake... but figuring that out is a post for another topic. Pertinent to this discussion is the outcome of the one successfully encoded movie.

The movie works perfectly with audio track 1, the Dolby PL II works as advertised (i.e., wonderfully). However, as Dynaflash notes in changeset 499 on Trac, the AAC 5.1 track does not work - no audio is produced.

I've encoded this movie before at 2500kbps, 2 pass, 1 audio track of AAC 5.1. I took the old movie, extracted the AAC 5.1 track from it and added it to the latest encode as track 3. I then removed the newer, silent AAC 5.1 track. When I play this movie both the Dolby PL II track and the AAC 5.1 track work as expected.

maurj, I hope any of this helps in fixing what is likely a small bug. Please don't hesitate to ask any further questions.

thanks for all the hard work,

Berylium
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Post by ragboy »

Berylium wrote:The movie works perfectly with audio track 1, the Dolby PL II works as advertised (i.e., wonderfully). However, as Dynaflash notes in changeset 499 on Trac, the AAC 5.1 track does not work - no audio is produced.
After closer examination, my AAC 5.1 tracks don't work either, I didn't notice, I was just checking the DPLII tracks. They worked before, so I just assumed.

Thanks for the tip.
Tazintosh
Posts: 4
Joined: Sat Apr 14, 2007 12:57 am

Movies with DTS audio on it.

Post by Tazintosh »

Hi,

I don't know if it has already been made, but I've succefully played a movie with DTS audio on it, right on my AppleTV.

• We know DTS or DD files (aiff or wave in fact) works in AppleTV;
• I've extracted a test sequence from one of my own DVD with Handbrake 0.8.0b2 (no care about the audio section for now), it was just for the test;
• Then I've copied on my harddisk an audio track from an DTS only audio album;
• Finally, I've opened the video & the DTS file on QuickTime Pro, copied the audio on the video file and exported a .mov file (H264 - another encoding :( and Apple LossLess Codec). I've chosen AppleLossLess because PCM doesn't works on AppleTV.
• I've put the result on my AppleTV via iTunes and it works, my amp automatically switched on DTS decoding.

I'm sure this should work with Dolby Digital as well, no?
I've not been able to test on a movie with it's own soundtrack because I don't know how to extract a usuable DTS or DD file and use it on QuickTime.
Is there any way to give Handbrake the ability to encode DTS & DD audio tracks in Apple LossLess? This will be the solution we are all waiting for.

Hope this'll help.
Thank you (sorry for my english)
Some photos here
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Re: Movies with DTS audio on it.

Post by deckeda »

Tazintosh wrote: I've not been able to test on a movie with it's own soundtrack because I don't know how to extract a usuable DTS or DD file and use it on QuickTime.
Well, that is what this thread is all about, AppleTV, which unfortunately makes your opening statement, I've succefully played a movie with DTS audio on it, right on my AppleTV. a non-event, and my hype meter twitch.
numbers987654321
Posts: 18
Joined: Sat Apr 14, 2007 5:34 am

5.1 Movie with DD!!!!!!!!

Post by numbers987654321 »

Ok- I know this is a handbrake forum, but maybe this will help with the overall efforts.

First off, this will allow you to play on a DD receiver ONLY. If you try to play on your laptop, you get static... so that said.

1) Demux with MPEG Streamclip to M2V and AC3.
2) Copy AC3 to windows machine to use BeSweet to convert to DD-Wav. (if there is an OS X alternative, please let me know.
3) Copy DD-Wav back onto Mac.
4) Open m2v in Quicktime Pro.
5) Open dd-wav in quicktime pro, then add to the m2v movie.
6) Export to Quicktime. h.264 (i used one pass to save time @2400kbps) w/ Apple Lossless 44.1 stereo w/o streaming box clicked.
7) Add to iTunes Library
8) Play on AppleTV with glorious 5.1 DD!

That's it.

Thank you Tazintosh for the head's up.

Here's the THX intro from Monster's Inc.
http://www.crackedpolystyrene.com/thx.mov
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Post by deckeda »

On p. 5 we were lucky to have been paid a visit by the A52Codec developer. If that support winds up allowing Quicktime to handle AC-3 in an intelligent way for use in the types of files HB is designed to make, don't you greatly prefer that to what you're proposing?
numbers987654321
Posts: 18
Joined: Sat Apr 14, 2007 5:34 am

Not sure

Post by numbers987654321 »

I think at this point, the solution I have is not the best. It's more of less fooling AppleTV into playing DD. I think the best solution would either be:

1) AC3 support on AppleTV
2) AAC to AC3 conversion on AppleTV (so we can encode with Handbrake)

Unfortunately it looks like right now we may need to add another track with dd-wav (apple lossless) in order to have true surround. Not sure if my receiver does DPL II. I mean, I don't really watch movies on my computer, so if they are only encoded with static, it doesn't matter to me.

In the long run though, I think the better option is to have something that can play anywhere. This is probably what Apple was faced with, and why they are not encoding DD into their files now...
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi Berylium etc.,

It looks as though the "silence in 2nd track" problem (seen when using the Mac GUI in the latest svn revisions) only happens when both tracks are using the same source audio track on the DVD. If you rip two different tracks, using whatever settings, then it seems to work fine. It seems unconnected to whether or not you use the "6 channel discrete" option.

I've done some tests here, and it looks like this problem goes all the way back to SVN revision 438, where we applied Saintdev's patch to enable multiple audio tracks. (This had previously been broken for a long time). So, it looks like we need to just double-check what happens when both selected audio tracks have the same source track.

I'll look into this on Monday. Hopefully it won't be too hard to fix!

- maurj
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Post by ragboy »

numbers987654321 solution is intriguing at the least. The thing that makes me most curious, is to compare the same material, that has been downixed to PLII and ddwav. I think that monsters THX sample is a good one, so I will create some files, and check it out. I would have to assume, that there is some when going from 5.1 discrete ac3 to PLII.

Here is maurj's 5_1_Dolby file, encoded with numbers987654321 solution. You will notice, that you also get the LFE channel.

http://www.bighead.net/5_1_dolby_ddwav.mov
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Post by ragboy »

I encoded the widescreen THX leader from monsters using HB, 2p, 2000kbps using DPLII, and AAC5.1 in seperate outputs. I then demuxed out the ac3 file using mplayer, and ran through besweet. I took the new wav, and opened in QTPRO and export as movie, audio only, apple lossless, stereo, no streaming. I then opened the DPLII mp4 from HB, deleted the soundtrack, and did ADD track and saved as a new movie.

Then I moved all 3 to ATV to listen to them. As expected, the AAC51 version is very limp, no surround at all. The DPLII version, sounds very good and I was surprised. But when I played the DDWAV version, the difference was large. The DPLII is more muddy, and many sounds seem to overlap each other, while the DDWAV version is clear, and discrete, and most notable, the LFE effects are much better.

I am running this through a Denon AVR 3805 Receiver, to Definitive Technologies BP2000s up front, which each have 300w subs in them, matching center, and BPXs in the rear.

Here are my output files if you want to sample on your own.

http://www.bighead.net/atvfiles/

I have done the same thing with a DTS_Leader, using dts2wav.exe but my amp, will not switch to DTS encoding, and I have yet to get DTS to work through a wave. Works great through a PC and AVI/DTS, or DVD and such, but not DTS through ATV yet. Maybe I need a new amp.

All that to say, since besweet uses freeware libs, what is the possibility of getting ddwav as the primary channel, and aac as second?

Anyway, I wish I knew if apple was going to use dolby live or something, but it seems it would still be a long way off. And the ddwav vs dplII seems pretty substantial to me.

Let me know if there is anything I can do to help.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi ragboy,

Unfortunately the link you posted is returning a "file not found" for me - could you post it again? I'd be interested to see your AC3-as-WAV track, as I'd not been able to get this approach to play as Dolby Digital, at least not through my amp here. I have had success doing this with a DTS WAV, but not an AC3 WAV.

There's only one slight downside with this approach, and that's the sheer size of these DTS / AAC audio tracks when in "uncompressed" form. Because HB is cross-platform, we can't really use QuickTime to do any of our audio compression, which means that the Apple Lossless codec isn't an option for us (unless anyone knows of an open-source implementation?). That said, I'd really like to try and get this form of AC3 and / or DTS "extraction" into Handbrake, if there's a way to keep the output audio to a decent size (whilst still keeping it in a lossless codec playable by QuickTime and ideally Apple TV). Any ideas?

A few things to note:

1) Our current DPLII implementation doesn't use the LFE channel yet (it's just discarded). I'm planning to implement an optional DPLII+LFE mixdown very soon. There are issues with using LFE in DPLII, but it works in a lot of cases.

2) If you play a 6-ch AAC on an Apple TV, you will only get a stereo mixdown, not the original 6 channels. You'd need to play the 6-ch AAC on a Mac, with an audio box such as the Griffin FireWave, to get the 6 discrete channels. Is this why you said "As expected, the AAC51 version is very limp, no surround at all" - because it had been mixed down to stereo?

Thanks for all the experimentation - much appreciated!

- maurj
rigormortis
Posts: 10
Joined: Fri Mar 23, 2007 5:22 pm

Post by rigormortis »

Darn, sure wish ragboys' website was up. I'd love to try those demo files as well :)
numbers987654321
Posts: 18
Joined: Sat Apr 14, 2007 5:34 am

Trying a backup

Post by numbers987654321 »

All-

I'm trying a backup of a movie with a dd-wav. Gonna do one-pass to cut time. I'll post back with how long it took and how big it is. I'm starting with a 3.67gb m2v and a 1.46gb dd-wav. Encoding with QTP single-pass, max 2400kbps, Apple Lossless stereo, no streaming. It's pretty slow on my G4 Mini. If my calc is correct, it's going to take 23 hours. I'll post back with size. It's a 2 hr 27 min flick.
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Post by ragboy »

we do maintenance sat night, sunday morning, but they should be up now.

http://www.bighead.net/atvfiles/

And they ddwav file, is NOT uncompressed, I used besweet to make a ddwav file, then used QTPRO to compress using apple lossless, and it still plays as DD on my amp, beautifully.

Hope you guys can get the files ok. I think comparing the DPLII and DDWAV is very interesting.
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Post by ragboy »

The other reason it would be great to get the DDWAV into handbrake, is I only did the THX leader, which is not a problem for sync. But anytime you are hand adding sound tracks to QT movies, sync is always a PITA.
rigormortis
Posts: 10
Joined: Fri Mar 23, 2007 5:22 pm

Post by rigormortis »

Thanks ragboy! Played the THX_DDWAV.mov file on my ATV. Sounds excellent! Also, great to finally see (hear) that DD actually works with my ATV/Receiver combo! It certainly gives me hope :)
numbers987654321
Posts: 18
Joined: Sat Apr 14, 2007 5:34 am

Movie Sync

Post by numbers987654321 »

My movie backup is chugging along... about half-way done. I'll let you know if the sync is a nightmare. You're totally right... it's impossible to adjust the A/V sync before you encode, cause the audio track (on my laptop) is just static. The only want to really know if you have it lined up correctly would be to somehow have a DD decoder plugin for quicktime. Does that exist?
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Re: Movie Sync

Post by ragboy »

numbers987654321 wrote:My movie backup is chugging along... about half-way done. I'll let you know if the sync is a nightmare. You're totally right... it's impossible to adjust the A/V sync before you encode, cause the audio track (on my laptop) is just static. The only want to really know if you have it lined up correctly would be to somehow have a DD decoder plugin for quicktime. Does that exist?
Yes, but it decodes ac3 streams, not ddwavs.
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

DTS Stuff

Post by ragboy »

I built some DTS stuff, using dts 2 wav techniques, like ddwav, but my amp doesn't like dts wavs. Can someone give them a try, if other sample dts wavs work, these should.

http://www.bighead.net/atvfiles/
Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Post by Berylium »

ragboy,

I put your DTS_Leader_DTSWAV.mov and DTS_Leader_stereo.mp4 files on my AppleTV and played them through my receiver (Onkyo TX-SR674).

The stereo track played as expected but, unfortunately, the DTS track was just static. I guess the receiver couldn't figure out it was a DTS encode.

Incidentally, the THX_DDWAV.mov sounded excellent, a very marked and noticeable improvement over the DPLII.

-Berylium
numbers987654321
Posts: 18
Joined: Sat Apr 14, 2007 5:34 am

DTSWav

Post by numbers987654321 »

Tried the DTSWav. Just static for me as well. My receiver can do DTS, per the DTSWav files that are out there on the internet somewhere. What method did you use to rip them?
numbers987654321
Posts: 18
Joined: Sat Apr 14, 2007 5:34 am

So my test finished, but it's just static! WTF?!

Post by numbers987654321 »

Ok- So I'm not sure why I'm getting just static now, but that's a pain. I must have changed a setting or something. The resulting file was 3.64 gigs, though. I bit on the large side.
Locked