AppleTV: Always defaults to "Commentary" audio track?

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.
iJoel
Regular User
Posts: 124
Joined: Sat Dec 20, 2008 7:25 am

Re: AppleTV: Always defaults to "Commentary" audio track?

Post by iJoel »

Interesting solution. I look forward to following your progress.
Thanks ^__^.
I figured it was for the best until I achieved full compatibility.
The "one-fell-swoop" program is just sitting in XCode, waiting to be compiled as soon as I figure it out.

And do you think it'd be good to just post here, incrementally, my findings?
As I've been doing thus far?

mahood
Posts: 1
Joined: Sun Mar 29, 2009 3:31 pm

Re: AppleTV: Always defaults to "Commentary" audio track?

Post by mahood »

iJoel wrote:
Interesting solution. I look forward to following your progress.
Thanks ^__^.
I figured it was for the best until I achieved full compatibility.
The "one-fell-swoop" program is just sitting in XCode, waiting to be compiled as soon as I figure it out.

And do you think it'd be good to just post here, incrementally, my findings?
As I've been doing thus far?
I'd love to see how you're getting on, I'm having similar problems...

I've noticed that if I have only one language (e.g. English) but with both AAC downmix and AC3 passthrough (e.g. 5.1 surround downmixed to Dolby Surround) then AppleTV automatically selects the AC3. This is what I'd expect...

As soon as I add a second language (or a commentary) it defaults to the downmix for the language I selected in the AppleTV settings.

e.g. I ripped a chapter of Akira, which has two soundtracks:

1. English 5.1 AC3
2. Japanese Stereo AC3

If I encode like this:
HandBrakeCLI -i /Volumes/Akira/ -o Akira-English.m4v --preset="Universal" -t 3 -c 2 -a "1,1" -E "faac,ac3" -A "EN_Mix,EN_51"

AppleTV selects the 5.1 version, and I don't get an option to change audio at all (as expected). The iPhone plays the downmix, also as expected.

If I do either of these encodes (basically the same as each other, but the order is different):
HandBrakeCLI -i /Volumes/Akira/ -o Akira-01.m4v --preset="Universal" -t 3 -c 2 -a "1,2,1,2" -E "ac3,ac3,faac,faac" -A "EN_51,JP_Stereo,EN_Mix,JP_Mix"
HandBrakeCLI -i /Volumes/Akira/ -o Akira-02.m4v --preset="Universal" -t 3 -c 2 -a "1,1,2,2" -E "faac,ac3,faac,ac3" -A "EN_Mix,EN_51,JP_Mix,JP_Stereo"

AppleTV always picks the English downmix, and lists the 4 options in the audio as:
1. English
2. Japanese
3. English (EN_Mix) - This is the auto-selected one
4. Japanese (JP_Mix)

All 4 work, #1 is 5.1, #2 is Stereo AAC exactly as expected, #3 and #4 are the relevant downmixes. Note that it ignores the order in the file, as far as I can tell.
I suspect it's picking the AC3 for preference, so lists them first (and uses the language chosen in the AppleTV settings as the first of those), but then seems to forget there's a good one, and defaults to the last one it's seen. Maybe it's a bug in AppleTV?

By the way, iTunes sees a difference between those two encodes... The first (which puts all AC3 soundtracks first) gives:
1. English (EN_51) - This is auto-selected
2. English (EN_Mix)
3. Japanese (JP_Stereo)
4. Japanese (JP_Mix)
The second (putting all AAC first) gives:
1. English (EN_Mix) - This is auto-selected
2. English (EN_51)
3. Japanese (JP_Mix)
4. Japanese (JP_Stereo)

Putting AC3 Japanese first in the file, then AC3 English second results in iTunes offering me the same as the first option above... So it knows I want English!
So it seems the rule in iTunes is to group by the user's chosen language first, presenting encoding options in the order they are in the file, picking the first which matches your language.

AppleTV breaks that, perhaps deliberately as we don't know how it chooses. That said, I still wonder if we're trying to fix something we haven't broken, but Apple have?

Does anyone have a dual language file from Apple? It might explain a lot... The (few) video downloads I've had from them only have a single AAC soundtrack.

I hope this makes sense, and maybe it will help someone get the rest of the way?

Mark

PS it's much the same with the GUI, but I can't give names to tracks there, so I stuck to a very basic CLI encode to experiment. I've not put logs in here as I don't think it's relevant to the discussion, it's not a 'problem' of Handbrake's after all. I can provide them on request.

iJoel
Regular User
Posts: 124
Joined: Sat Dec 20, 2008 7:25 am

Re: AppleTV: Always defaults to "Commentary" audio track?

Post by iJoel »

All of your information correlates to what I've discovered.
But thank you for more test data ^__^.

I put the rest of the REing til the beginning of April (sometime in the next 2 weeks).
I'm now using the work-a-round mentioned previously for my encodes. And it maintains
full compatibility throughout all of my devices. But the drawback is not being able to select
audio tracks on the AppleTV (haven't tested it on the iPhone/Touch yet). Which is what we're both
after I'm sure.

But this is the thing that bugs me that absolute most about this whole thing,
and makes me start to wonder about full compatibility across devices/software.
You see, every different playback software handles the tracks differently.
Every single one. Not one of them is consistent. AppleTV defaults & orders
tracks differently than Quicktime, which handles audio tracks different than iTunes,
which handles tracks differently than VLC, which handles things differently than the iPhone,
etc...

See what I'm sayin? Multiple tracks is a 'bag of hurt' ;).
The only reason the current implementation is working
with AAC/AC3 is because there's only two tracks each of a different
format. But even then, although completely compatible, the two tracks
are handled and ordered differently depending on the device your viewing it on.
Here's what the devices do:
AppleTV : Don't display either and select track based on preferences.
iTunes : Display both the tracks ordered by Language (only English) & track-id (or index-id, not sure)
Quicktime : Display both the tracks ordered by AC3 first and then AAC (unsure about this, but thats what it looks to me, but I don't really care about QT enough to figure it out)
iPhone : Display only AAC tracks ordered by id, ignore AC3 tracks (unsure of specifics, needs more testing)
VLC : Can't remember ;P.

They're all different. And that's only with 2 tracks. It gets more complex when you add into alt groups, more track-ids,
more languages, more formats, etc.
But I'm still working on this.
So expect an update in 1-2 weeks.
Let me know if you have any questions, cause it'd be great to have more test data if your willing ^__^.
Does anyone have a dual language file from Apple? It might explain a lot... The (few) video downloads I've had from them only have a single AAC soundtrack.
I'd love to find one ;P.
Would shed a lot of light on things.
Same as an iTunes Store Subtitled video.

AppleTV breaks that, perhaps deliberately as we don't know how it chooses. That said, I still wonder if we're trying to fix something we haven't broken, but Apple have?
Seems very likely.
Apple does generally wait to properly support anything until they use it.
iTunes movie HD-SD encodes are an example of this.
There had to be a hack work around until Apple released HD movies.
And now it works as expected.
So when Apple starts using multiple Audio in iTunes,
we'll have proper support.
Until then, we've got to figure out a work-a-round.
;P

realityking
Veteran User
Posts: 680
Joined: Tue Apr 24, 2007 12:36 pm

Re: AppleTV: Always defaults to "Commentary" audio track?

Post by realityking »

iJoel wrote: There had to be a hack work around until Apple released HD movies.
And now it works as expected.
I'd bet it would have worked before just as well, we just didn't know how to do it right ;)

But your main point is true, once Apple starts publishing multi lang videos it will be much easier to get right.
Last edited by TedJ on Wed Apr 01, 2009 10:00 pm, edited 1 time in total.
Reason: Fixed borked quote

iJoel
Regular User
Posts: 124
Joined: Sat Dec 20, 2008 7:25 am

Re: AppleTV: Always defaults to "Commentary" audio track?

Post by iJoel »

realityking wrote:
iJoel wrote: There had to be a hack work around until Apple released HD movies.
And now it works as expected.
I'd bet it would have worked before just as well, we just didn't know how to do it right ;)

But your main point is true, once Apple starts publishing multi lang videos it will be much easier to get right.

Never really thought of it that way.
Maybe I just need to change the stik value to 13 & it will work haha.
But really though, I've only been testing movies.
I should try some different stik values and see if audio's handled differently. ^__^

iJoel
Regular User
Posts: 124
Joined: Sat Dec 20, 2008 7:25 am

Re: AppleTV: Always defaults to "Commentary" audio track?

Post by iJoel »

Another note of interest:
Try this, have a video with 4 audio tracks.

1. AAC/AC3 English - Alt. Group 1
2. French AAC - Alt. Group 2
3. Japanese AAC Alt. Group 2

& then add an English Subtitle track with Alt. Group 2.

On the apple tv there will be no audio pane, but there will
be a subtitle pane. With 3 Language Choices, English, Japanese,
and French. Of course, there is only one 'real' subtitle' track,
but the ATV get's confused because the other 2 audio tracks are in
Alt. Group 2 as well. So what happens when you choose one that doesn't exist?

It plays both the French & Japanese AAC at the same time while displaying the
English subs. Weirddd ;P.

Post Reply