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.
e71
Posts: 15
Joined: Thu Mar 29, 2007 7:14 pm

Re: Mac OS X tools for dd-wav conversion

Post by e71 »

ragboy wrote:I fixed the sync issues in my procedures, and have an update at the bottom.

http://www.garcias.com/TheGarcias/Dad%2 ... 6FE4E.html

It involves yet another windows app, but I don't know any other app that will demux ac3 and tell you the delay.
That's good news. The fact that the Windows app can tell you the delay exactly means that we should be able to determine it programtically. Its obvious now after the fact that Handbrake must already be doing this since its audio is sync'ed perfectly. I'll dig around in the HB sources to see where it gets the audio delay / sync information from.

It may be that the real solution to this is to integrate the dd-wav conversion into Handbrake (which should be done anyway). However for those of us who've already converted our DVDs, we'll need to come up with a way to just do the audio extraction / conversion and store it in an existing video file.
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Re: Mac OS X tools for dd-wav conversion

Post by ragboy »

e71 wrote: That's good news. The fact that the Windows app can tell you the delay exactly means that we should be able to determine it programtically. Its obvious now after the fact that Handbrake must already be doing this since its audio is sync'ed perfectly. I'll dig around in the HB sources to see where it gets the audio delay / sync information from.
Agree, I looked high and low for a way to get this value using mencoder/mplayer, or ffmpeg. I am sure they all must use the value, since they all produce synced output on conversion. But the windows app is the only one I knew that displayed the value. I remembered this from back in the day when I used to use the gordian knot to rip my dvds.

I am a mac user, on my mac pro right now, but have access to all, and have used a lot of windows tools.
starboundcanary
Posts: 2
Joined: Wed May 09, 2007 5:30 am

Re: Mac OS X tools for dd-wav conversion

Post by starboundcanary »

ragboy wrote:
e71 wrote: That's good news. The fact that the Windows app can tell you the delay exactly means that we should be able to determine it programtically. Its obvious now after the fact that Handbrake must already be doing this since its audio is sync'ed perfectly. I'll dig around in the HB sources to see where it gets the audio delay / sync information from.
Agree, I looked high and low for a way to get this value using mencoder/mplayer, or ffmpeg. I am sure they all must use the value, since they all produce synced output on conversion. But the windows app is the only one I knew that displayed the value. I remembered this from back in the day when I used to use the gordian knot to rip my dvds.

I am a mac user, on my mac pro right now, but have access to all, and have used a lot of windows tools.
I wish I knew more about how audio/video encoding worked, but for now due to my limited programming knowledge when it comes to this sort of thing I can only offer what I know...

I did a bit of digging around in the DGMPGDec source and I at least dug up the function which calculates the delay (or at least, the delay which appears in the file name when the project's saved). It's in the dgindex148src folder within the main source zip file, in the getbit.cpp file:

Code: Select all

int PTSDifference(unsigned int apts, unsigned int vpts, int *result)
{
	int diff;

	if (apts > vpts)
	{
		diff = (apts - vpts) / 90;
//		if (diff > 5000) return 1;
		*result = diff;
	}
	else
	{
		diff = (vpts - apts) / 90;
//		if (diff > 5000) return 1;
		*result = -diff;
	}
	return 0;
}
Again, I have no clue how this stuff works, but it looks as if the delay is calculated simply by finding the difference between the number of audio "pts" (points? packets? I have no clue) and video "pts" in the file. I assume that the "pts" is just a block or frame count, in which case this calculation should be relatively easy to implement in other tools. I could be way off base though... if nothing else, hopefully it'll save a few minutes of searching for those who actually know how this stuff works.
e71
Posts: 15
Joined: Thu Mar 29, 2007 7:14 pm

New dd-wav tools for Mac OS X

Post by e71 »

A new version of the dd-wav conversion tools for Mac OS X is available. I've fixed the problem with the center channel being in the right speaker (actually worked around is a better description). With the previous version, all of the channels were shifted. Instead of being L / C / R / SL / SR / LFE, they were LFE / L / C / R / SL / SR. It looks like the channel orders between the AC-3 decoder and encoder in ffmpeg aren't consistent, but fortunately I was able to change the channel interleave mappings because my modified resampling code has to de-interleave and then re-interleave the raw audio data.

Sorry, no ppc support yet.

The download link is the same: http://www.macseven.com/appletv/e71_App ... _tools.dmg
e71
Posts: 15
Joined: Thu Mar 29, 2007 7:14 pm

Re: Mac OS X tools for dd-wav conversion

Post by e71 »

starboundcanary wrote:I did a bit of digging around in the DGMPGDec source and I at least dug up the function which calculates the delay (or at least, the delay which appears in the file name when the project's saved). It's in the dgindex148src folder within the main source zip file, in the getbit.cpp file:

Code: Select all

int PTSDifference(unsigned int apts, unsigned int vpts, int *result)
{
	int diff;

	if (apts > vpts)
	{
		diff = (apts - vpts) / 90;
//		if (diff > 5000) return 1;
		*result = diff;
	}
	else
	{
		diff = (vpts - apts) / 90;
//		if (diff > 5000) return 1;
		*result = -diff;
	}
	return 0;
}
Again, I have no clue how this stuff works, but it looks as if the delay is calculated simply by finding the difference between the number of audio "pts" (points? packets? I have no clue) and video "pts" in the file. I assume that the "pts" is just a block or frame count, in which case this calculation should be relatively easy to implement in other tools. I could be way off base though... if nothing else, hopefully it'll save a few minutes of searching for those who actually know how this stuff works.
Thanks for the pointer. That was a good starting point and I have a better idea of what is going on. Each frame in the MPEG-2 stream (be it an audio frame or video frame) has a presentation time stamp (PTS). It is entirely possible that an audio frame right before or after a video frame will have a different timestamp as a result of the encoding process. The playback device / software is supposed to look at those timestamps and adjust the timing of the audio and video playback so that the timestamps match up.

As long as the two streams (audio & video) play back at the same rate, all we need is the timestamp delta between the first audio timestamp and first video timestamp to determine what adjustment is needed to the audio stream. If the two streams do not play back at the same rate, then playback might start out in sync, but slowly drift apart. Handbrake appears to deal with this possibility since from what I can see, each frame that gets decoded has its pts evaulated to make sure it gets placed in the right location relative to the rest of the stream.

I don't think drifting is a real problem for DVDs however since they're usually created in a pretty controlled manner. I'm trying to see if there's a quick and easy way to parse the VOB for a given title in order to pull out the first audio and video frames and determine the delta between their pts timestamps.

That would give us a delay value that could then be added as a parameter to the spdifer conversion utility in order to either add or remove audio data from the start of the wav file.
ragboy
Experienced
Posts: 82
Joined: Mon Apr 09, 2007 4:03 pm

Re: Mac OS X tools for dd-wav conversion

Post by ragboy »

e71 wrote: Thanks for the pointer. That was a good starting point and I have a better idea of what is going on. Each frame in the MPEG-2 stream (be it an audio frame or video frame) has a presentation time stamp (PTS). It is entirely possible that an audio frame right before or after a video frame will have a different timestamp as a result of the encoding process. The playback device / software is supposed to look at those timestamps and adjust the timing of the audio and video playback so that the timestamps match up.

As long as the two streams (audio & video) play back at the same rate, all we need is the timestamp delta between the first audio timestamp and first video timestamp to determine what adjustment is needed to the audio stream. If the two streams do not play back at the same rate, then playback might start out in sync, but slowly drift apart. Handbrake appears to deal with this possibility since from what I can see, each frame that gets decoded has its pts evaulated to make sure it gets placed in the right location relative to the rest of the stream.

I don't think drifting is a real problem for DVDs however since they're usually created in a pretty controlled manner. I'm trying to see if there's a quick and easy way to parse the VOB for a given title in order to pull out the first audio and video frames and determine the delta between their pts timestamps.

That would give us a delay value that could then be added as a parameter to the spdifer conversion utility in order to either add or remove audio data from the start of the wav file.
Great progress, getting excited. Seems like the only piece with a big question mark, is ALAC encoding.
aur0ra
Posts: 17
Joined: Sun Apr 15, 2007 12:53 pm

Post by aur0ra »

loyalty_anchored wrote: only way to know is to try. like i said, fingers crossed as this would allow me to do exactly what i intended with my DVD collection, Handbrake and my Apple TV.
I know this is waaayy after the fact, but last week I ripped an mp4 via Handbrake, used MTR to pull the AC3 from the DVD, deleted the audio track from the mp4 with QT pro in the mp4 and replaced it with the AC3 and finally saved it as a mov.

The file imported to iTunes but would not sync to the AppleTV. It gave an error message that the audio format was not supported...

I also started digging more on the AppleTV last weekend. I found that the synced media file names are encoded somehow (and thus must be referenced from a database somewhere). I also tried to see if there was a "defaults" section like there is for ATVFiles. Maybe getting AC3 to work would be as simple as changing the defaults for QT (or some other app).

Just my .02. I plan on playing around a little more this weekend.
maurj
Enlightened
Posts: 148
Joined: Thu Jan 11, 2007 5:31 pm

Post by maurj »

Hi aur0ra,

That's annoying, and may make my prospective ac3-in-mp4 work unsuccessful for normal Apple TV use. It will likely still work with the ATVFiles plugin, however.

- maurj.
whiffle
Posts: 3
Joined: Mon May 14, 2007 3:53 pm

An idea for AC3 through AppleTV

Post by whiffle »

I also started digging more on the AppleTV last weekend. I found that the synced media file names are encoded somehow (and thus must be referenced from a database somewhere). I also tried to see if there was a "defaults" section like there is for ATVFiles. Maybe getting AC3 to work would be as simple as changing the defaults for QT (or some other app).

Just my .02. I plan on playing around a little more this weekend.
I think this is the way to go. I agree that we may have been going about this the wrong way.

How about we extend this line of thought. Quicktime and iTunes looks at the metadata to determine the encoded video and audio formats. This is what stops me streaming to my AppleTV non AAC/264 files. IF the metadata in the mov says that the audio is AAC but it's _actually_ AC3 then it will sound appalling over analog or produce nothing. But as it passes it to the digital optical out anyway the Hifi receiver will not give a toss and will decode it as AC3. Just a thought. You wouldn't need an AC3 codec then as the Apple TV automatically passes what it thinks is AAC audio to its optical output anyway. Obiviously you HAVE to play the audio from and external source then but that is the point of 5.1 anyway.

BTW the Griffin FIrewave is a pretty cheap and quick solution otherwise as it decodes AAC 5.1

Cheers one and all...let me know if this is a complete load of cobblers

Whiffle
gbooker
Posts: 43
Joined: Sat Apr 07, 2007 8:38 pm

Re: An idea for AC3 through AppleTV

Post by gbooker »

whiffle wrote:How about we extend this line of thought. Quicktime and iTunes looks at the metadata to determine the encoded video and audio formats. This is what stops me streaming to my AppleTV non AAC/264 files. IF the metadata in the mov says that the audio is AAC but it's _actually_ AC3 then it will sound appalling over analog or produce nothing. But as it passes it to the digital optical out anyway the Hifi receiver will not give a toss and will decode it as AC3. Just a thought. You wouldn't need an AC3 codec then as the Apple TV automatically passes what it thinks is AAC audio to its optical output anyway. Obiviously you HAVE to play the audio from and external source then but that is the point of 5.1 anyway.
Sorry to burst your bubble, but that won't work. The closest working solution is the AC3 encoded in PCM data. Here is how it works internally to the ATV (and quicktime for that matter).
  1. The movie is opened and the track information is read (this is the metadata you mentioned). QT determines the track media types and compression methods.
  2. QT searches its codecs for a method to transform the compressed audio to LPCM (linear Pulse Code Modulation, otherwise knows an uncompressed audio) assuming it isn't already LPCM.
  3. The audio is passed to the OS to play
  4. The OS (at least I am pretty sure it is the OS that does this operation), takes the LPCM data, and transforms it to the match the sample rate and bit resolution of the output device (if it doesn't already match).
  5. The OS mixes together multiple audio sources (if there are more than one)
So, if you were to have AAC audio in there, but the data itself is really AC3, the ATV will pass the AC3 audio data into the AAC audio decoder, which will then proceed to produce junk and errors.


Now, I was wondering, if you took a movie with AC3 audio, and hacked it (using dumpster or something) to change the fourcc to something else that can sync to the ATV, then find the synced file, and hack it to change the fourcc back, will it play? I am betting it will, and if it does, then this is a simple matter of hacking iTunes to change the list of codecs it will send over to the ATV (and installing the necessary components on the ATV).
whiffle
Posts: 3
Joined: Mon May 14, 2007 3:53 pm

Re: An idea for AC3 through AppleTV

Post by whiffle »

Bugger....v good point.

Ok so as I understand it, Quicktime will decode the stream with the codec it thinks it is so this will stuff the AC3 which has been "relabelled". Fair enough. But what if the AC3 was compressed in such a way that quicktime decoded it back into an AC3 stream. This would have to be lossless and accurate. I have taken an AC3 5.1 file (264 with video to avoid video issues) stripped out the audio, encoded it with Apple lossless (which quicktime, AppleTV and iTUnes are all happy with) and remuxed it. As I see it, the compressed Apple Lossless file will be decoded by software and the output (the original AC3) passed to digital out......I think. I have to rehook up my receiver when I get home (been renovating at the orders of the missus....*sigh*) to test it out.

The reason this might work is I already have encoded tv shows with 264 and AppleLossless when I was experimenting after first getting my AppleTV and they passed the audio just fine to my receiver. Apple doesn't care what is in the stream once it has been passed through its audio codec.

This is also better than the large bitrate options of
1) mux a wav and video together
2) straight WAV encoded as lossless muxed with video

as the decoded stream is still AC3 (ie compressed) not raw and thus the overall bitrate penalty _should_ be less.


As to matching up sample rates etc...that could be tricky. It may be also necessary to encode it as a MONO Lossless stream. I will try a few options and let you know. It may be that Apple lossless will damage/corrupt tha AC3 stream.

Maybe someone has already tried this (I have trawled the forums pretty thoroughly, though).

Cheers

Adam
whiffle
Posts: 3
Joined: Mon May 14, 2007 3:53 pm

Direct AC3 to ALAC - no good!

Post by whiffle »

OK. Have played with different settings a LOT. I have ATVfiles etc but I want to be able to stream if I can from a quicktime server.

It was a nice idea but I was really "tilting at windmills" if I thought that no one else had already tried this. I'm sure they have. I appreciate those wiser than myself allowing me my moment of hope...... and letting me dash it myself....:)

Most of what I am about to say is, I guess, repetition...correct any bits I get wrong, please! This is why my idea doesn't work.

The Apple TV decodes the Lossless as anticipated, but sends it to the optical out which is switched to PCM. Any codec-processed info is sent through PCM 44khz 24bit (I think). So yes its my AC3 data but its sent as PCM.

This is why we currently need to pad the ac3 with 0s to create a PCM-compatible stream which we THEN encode.

So the link I am missing is:

1) As we have AC3, we need something to sit in the background and intercept the output from quicktime and tell core audio its AC3/Compressed digital out (even through quicktime thought it was PCM). You might have to tell it manually when a stream in ALAC is AC3

2)
Can we hack the ALAC codec and replace it with a modified one? One that switches to compressed digital out?

Although we now have passthrough 5.1 with the new AC52 codec (thanks!) this wont work for ALAC encoded streams as they have aready been processed. Thus we still have the inablitity to stream our stuff

Perhaps we will be able to fit AC3 into and M4V container...

I myself will look at AAC5.1 receivers - there are a couple and encode with AAC/ProLogic II like everyone else until they are at a decent price point. Otherwise its the ddWAV-ALAC life for me .... an extra 200meg won't hurt that much wih DVD video and I do have a terabyte of storage...Given that we are simply adding lots of zeros to create the ddWAV, these may compress down very nicely, whereas the (already compressed) AC3 was unlikely to compress down much further. Thus is the size penalty may not be as great as some imagine.

Cheers


Whiffle
petvas
Experienced
Posts: 82
Joined: Wed Feb 14, 2007 3:00 am

Post by petvas »

Do you know any models of AAC 5.1 receivers? I havent found anything in Google.
loyalty_anchored
Bright Spark User
Posts: 183
Joined: Wed Mar 14, 2007 1:49 pm

Post by loyalty_anchored »

petvas wrote:Do you know any models of AAC 5.1 receivers? I havent found anything in Google.
i do not think any exist as of yet. if you wanted to use AAC5.1 with the ATV, you would have to find a way to have the ATV convert the AAC5.1 stream to AC3 on the fly and pass it through to the receiver.

not sure if the ATV hardware would even be able to handle this in the case that someone has the patience and know how to develop such a concept.
petvas
Experienced
Posts: 82
Joined: Wed Feb 14, 2007 3:00 am

Post by petvas »

I thought exactly the same...
Its really a shame that Apple doesnt offer this capability to Apple TV. I hope that a forthcoming update will solve the issue...
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

Gonna unsticky this one. Feel free to keep it going as you wish, I just dont think it needs to be a sticky anymore.
loyalty_anchored
Bright Spark User
Posts: 183
Joined: Wed Mar 14, 2007 1:49 pm

Post by loyalty_anchored »

petvas wrote:I thought exactly the same...
Its really a shame that Apple doesnt offer this capability to Apple TV. I hope that a forthcoming update will solve the issue...
i would not rely on apple to do this the right way, yes, they might enable this feature, but i feel it would be done in a newer/better version which you would have to buy from them. i doubt apple would increase functionality like this without charging any money for it.

they will probably sell an updated ATV model with supports true 5.1 surround sound. not to say i support this kind of up selling, as a matter of fact i will be seriously [Censored] off... but this is life.
TheBum
Novice
Posts: 66
Joined: Tue Apr 10, 2007 12:03 am

Post by TheBum »

loyalty_anchored wrote:
petvas wrote:I thought exactly the same...
Its really a shame that Apple doesnt offer this capability to Apple TV. I hope that a forthcoming update will solve the issue...
i would not rely on apple to do this the right way, yes, they might enable this feature, but i feel it would be done in a newer/better version which you would have to buy from them. i doubt apple would increase functionality like this without charging any money for it.

they will probably sell an updated ATV model with supports true 5.1 surround sound. not to say i support this kind of up selling, as a matter of fact i will be seriously [Censored] off... but this is life.
Except that Apple has already said they plan to add capabilities to Apple TV. In order to keep from having to charge for the new capabilities like they did for the 802.11n enabler, they're going to amortize sales of Apple TV units over a 2-year period for accounting purposes. Of course, that doesn't necessarily mean that the feature addressed here will be one of the updates, but the door is open.
loyalty_anchored
Bright Spark User
Posts: 183
Joined: Wed Mar 14, 2007 1:49 pm

Post by loyalty_anchored »

that is great news, and i certainly hope that what you say holds water. i will keep my fingers crossed :D
TheBum
Novice
Posts: 66
Joined: Tue Apr 10, 2007 12:03 am

Post by TheBum »

loyalty_anchored wrote:that is great news, and i certainly hope that what you say holds water. i will keep my fingers crossed :D
If you want to see it in writing, take a look at Apple's latest 10-Q filing:

http://library.corporate-ir.net/library ... Q2FY07.pdf

Make sure you've had plenty of caffeine first. The pertinent wording is on page 19, third paragraph.
josephlew1s
Posts: 1
Joined: Thu May 24, 2007 2:40 am

Head About to Explode

Post by josephlew1s »

Hi everyone,

I know the answer must be here somewhere, but I've spent the last couple of weeks spec'ing out my new Home Theater and my brain has been turned to mush (1080P vs 1080I, HDMI vs Component and it goes on and on!), but it's finally been bought and now I want to rip my DVDs to hard disk then use Apple TV to view them. HandBrake is awesome!

However, I'm now confused by AAC 5.1 vs DPL II.

My new receiver, a Pioneer Elite VSX-82TXS, supports the following:

Dolby(R) Digital 5.1
Dolby(R) Digital EX
DTS(R) 5.1
DTS-ES Discrete 6.1
DTS 96/24
DTS NEO: 6
Pro-Logic IIx
Windows Media(R) Audio 9 - Professional
THX Select2
Air Studios TMTuning
Advanced Surround Modes 12
Sound Retriever
Virtual Surround Back

So for Apple TV what should I use? I don't even see AAC 5.1 (but again, my brain is mush!).

Also is it possible to grab the commentary tracks too?
I apologize for being such a newbie, but...I am.

Thanks.
TheBum
Novice
Posts: 66
Joined: Tue Apr 10, 2007 12:03 am

Post by TheBum »

Your receiver will not decode AAC 5.1 and I don't think you'll find any receivers that will. Unless you want to hack your Apple TV, go with DPL2.
loyalty_anchored
Bright Spark User
Posts: 183
Joined: Wed Mar 14, 2007 1:49 pm

Post by loyalty_anchored »

TheBum wrote:Your receiver will not decode AAC 5.1 and I don't think you'll find any receivers that will. Unless you want to hack your Apple TV, go with DPL2.
even if you hack your ATV, AAC5.1 is currently useless, there is no way to decode AAC5.1 to AC3 on the fly from the ATV and pass it through to the receiver.

so for now the only true 5.1 surround sound audio you can pass from your ATV to your receiver is AC3!

then the next question arrises, if you want to use AC3 what container will you place your video and audio in? you can use AVI or MKV, but the ATVs current MKV stream ability is not there yet, although it is planned to be fixed.

all my comments here are assuming that you are ok with and want to hack your ATV. i personally dont feel the unit is worth anything and would be useless to me if i had not hacked it.

EDIT: using handbrake at the moment you only really can put AC3 in an AVI file, although MKV support in handbrake is currently being worked on by saintdev, so we should see proper support for the MKV container on the HandBrake end in the near future.

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

Post by Berylium »

josephlew1s,

There are a couple of ways at the moment to get true 5.1 audio out of your AppleTV and there are non-trivial caveats to each. If, however, you are comfortable with the 5.0, non-discreet surround provided by Dolby Pro Logic II then you are already good to go. I'll discuss the various options for surround sound as well as their pros and cons below:

1. Get true, 5.1 discreet audio by hacking your AppleTV

There are a few documented ways to hack your AppleTV, you can find them on AkwardTV. The easiest way, which does not require the removal of the AppleTV's hard drive, still requires some significant computer knowledge and isn’t perfect. Once you have your AppleTV properly hacked you are then free to install Perian and add new plug-ins to the AppleTV interface such as ATVFiles. Perian is a QuickTime component that allows for the playback of many audio and video formats not supported by QuickTime by default including (in more recent builds) AC3 audio. ATVFiles is an AppleTV plug-in that allows you to play files on your AppleTV that are not in the iTunes database such as the .AVI or .MKV files that can contain an AC3 audio track. Once you have these tools installed you can use HandBrake to encode your DVDs using the AVI container with AC3 audio as the soundtrack. AC3 is the audio container used by DVDs and it holds the 5.1 Dolby Digital or DTS soundtrack you’re looking for. Also, your receiver along with most receivers made in the past several years can decode what’s in your AC3 stream into discreet 5.1+ channel digital audio.

Pros:
  • - Once you get everything working properly you can watch your movies with the exact same audio experience as you have on the original DVD.
Cons:
  • - Hacking the AppleTV can be troublesome / impossible for novices.
  • - The ATVFiles interface doesn’t provide the eye-candy of the default Movies interface with movie art, descriptions, directors, ratings, etc.
2. Get true, 5.1 discreet audio by tricking iTunes

This method allows you to get the discreet, 5.1 digital audio you’re looking for without hacking your AppleTV while keeping both the AppleTV Movies interface as well as the management of your library through iTunes. Sounds perfect, right? Well, it’s a pain in the ass. The exact method and steps required are discussed at length in this forum topic so I won’t repeat them in detail. Glossing over the process, you first encode your movie with HandBrake using an MP4 container. Then your use a tool that strips the AC3 audio track from the DVD and another to transcode the AC3 into a DD-WAV. Then you use QuickTime to encode the DD-WAV into ALAC (Apple Lossless). Finally, you open your movie’s .MP4 file in QuickTime, delete the audio track inserted by HandBrake, insert the ALAC audio soundtrack, and save to a .MOV file. Potential stumbling blocks include audio possibly being out of sync and that this trick only works with a 44.1khrtz audio and not the usual 48khrtz found on DVDs so there’s an extra step in the process of doing that conversion. Once you get a movie made this way you’re all set.

Pros:
  • - You get a true, discreet 5.1 channel audio experience from your movies (though, arguably, with a very slight loss in quality)
  • - You get to manage your movies through the default iTunes and AppleTV interfaces
Cons:
  • - The creation process is onerous at best.
  • - Your movies can only be played by an AppleTV connected to a receiver. Connecting your AppleTV directly to a television would result in screeching audio static because a TV can’t decode the digital audio stream.
  • - File size is increased by 300-400 megabytes due to the lossless audio
3. Get non-discreet, 5 channel audio through HandBrake and Dolby Pro Logic II

This method is far and away the easiest. Open your DVD with HandBrake, select the HB-AppleTV Preset, and click Start. Again, I glossed over potentially important stuff like checking for deinterlacing, changing audio bitrate, different x264 options, etc. but those are all things you’d need to fool with in the other options as well. The result is a movie, like the movie from option 2, that works with both the AppleTV and iTunes interfaces. You get all your movie art, descriptions, etc. and you can play the movie from your AppleTV connected to any device, not just a receiver, since the audio track is just a specially encoded stereo track. Your Dolby Pro Logic II capable receiver, however, will be able to pull out 5 channels of sound from that stereo signal. You get center, left, right, left-rear, and right-rear channels of audio but you lose your LFE (subwoofer) channel. Also, since this isn’t discrete audio you get some bleed from other channels into the proper channel, some of the left channel might be heard in the left-rear channel for instance. Further, the separation is noticeably more muddy due to the non-discreet nature of the audio. But, hey, it’s easy and it works!

Pros:
  • - You get a definite surround sound experience
  • - It’s very, very easy to use. If you can run HandBrake you can make Dolby PLII movies
  • - You get to manage your movies through iTunes and the AppleTV Movies interface
Cons:
  • - It’s a surround experience, yes, but it doesn’t compare to true, discreet audio. Listen to a Dolby PL II track right after playing the same track in AC3 and the superiority of AC3 will be clear as day.
4. Encode with AAC 5.1 and pray that Apple will one day upgrade the AppleTV software to do AAC 5.1 to AC3 transcoding on the fly

This method is as easy as encoding with Dolby Pro Logic II, you just select AAC 5.1 as the audio track in HandBrake. You end up with a movie that contains 6 discreet audio channels (center, left, right, left-rear, right-rear, and LFE) and a movie that is manageable via iTunes. The movies will be accessed through the AppleTV Movies interface but it’s not that great because iTunes won’t append metadata like art, descriptions, directors, etc. to movie files with more than one audio track so you end up with one of the first frames from the movie as your cover art and no description, etc. Worse, the AppleTV sends the AAC 5.1 track out as a stereo signal but not one encoded with Dolby Pro Logic I or II in mind so your receiver has to make due with what it gets. The result is an audio experience more akin to Dolby PL I but nowhere near as good as what you get from using the Dolby Pro Logic II encoding option in HandBrake. The reason one would encode this way is in hopes that Apple will one day upgrade the AppleTV to transcode AAC 5.1 into AC3 on the fly as well as update iTunes to allow appending metadata to these files. Certainly, if Apple made these changes we would be in movie encoding nirvana. However, it’s a big gamble to start encoding your movies with this eventuality in mind since, despite circumstantial evidence, there’s no proof Apple has plans to ever make these changes.

Pros:
  • - Your movie is encoded with discrete digital audio (even though you can’t play it that way)
  • - Very easy to use, as easy as the Dolby PL II option
Cons:
  • - A very marginal surround experience (for now)
  • - You don’t get any metadata with your movies

Obviously, the surround audio situation with the AppleTV is not ideal. In lieu of waiting around for everything to be perfect I’ve embraced maurj’s Dolby PL II implementation for my movies as it provides the best audio separation vs. ease of use ratio available but I’m only adding my older movies to my AppleTV library, movies that either don’t have a 5.1 track to begin with or don’t suffer by losing the true 5.1 experience. So any recent action movie is ruled out by my methods but I’m left with many dramas and most comedies to encode while I wait for improvements in AppleTV or HandBrake.

Let me finally mention that there is more involved with the first two steps I explain than what I’ve written down. If you intend to take either of those routes you would do well to read articles at AwkwardTV and also articles linked from earlier in this topic thread to get a better understanding of what you’re actually doing. Also, to get the most out of the open source software used to make these options available you should use more recent builds of both HandBrake and Perian than what is available as a binary download from their respective sites and that means downloading source and compiling yourself.

-Berylium
loyalty_anchored
Bright Spark User
Posts: 183
Joined: Wed Mar 14, 2007 1:49 pm

Post by loyalty_anchored »

@Berylium:

Very good and informative post, although I must correct you when you speak of ATVFiles.
Berylium wrote:- The ATVFiles interface doesn’t provide the eye-candy of the default Movies interface with movie art, descriptions, directors, ratings, etc.[/list]
ATVFiles has supported cover art since the first release i tried, and now with 0.3.1 you can also add all the comments, ratings, movie genre etc...

The developer of ATVFiles has gone at great lengths to integrate as well as possible into the AppleTV and has done an exelent job in my opinion.

Also, the hacks are becoming easier and easier with plugins such as ATVLoader and other ideas which will most likely come about.

I will be honest and say that DPL2 is a very poor substitute for a true 5.1 surround sound audio stream such as an AC3, but this is only my opinion.
Locked