Apple TV AC3 Audio Out Of Sync

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.
fallapart13

Re: Apple TV AC3 Audio Out Of Sync

Post by fallapart13 »

Just a thought - could it be possible that VLC (or related files) could be the cause of our AC3 troubles?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by TedJ »

fallapart13 wrote:I feel like there is some problem with the files HandBrake is generating. As a test, I thought I would try to see if VisualHub might be able to fix the file and resync the audio in a way that works on my system. Since it's already in an .m4v container, I figured the encode shouldn't take long at all. Wrong. Using a quad-core Xeon MacPro it's estimating the time to re-encode at more than 5 hours. Something is screwy about these files...
Even though it's already in an m4v/mp4 container visualhub will still re-encode the video/audio, unless you add the following to the advanced options... "-vcodec copy" and "-acodec copy". This should remux using the existing video/audio streams.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

I'm pretty sure it is not Handbrake causing the out of sync issue. I have played suspect files (both AAC and AC3) using VLC and they are fine. A lot of people don't notice the problem, but the audio from the optical output is definitely ahead of the video (by component and HDMI). You can hear it when you turn up the volume of the TV whilst outputting to an AV Amplifier. I am not going to let this problem stop me from encoding movies, well, not until somebody comes on here and informs us that the problem still exists when using a HDMI compatible amplifier anyway.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

Fallapart13, have just read your other post. It is very interesting to hear that visualhub does not create the same sync issues. I am going to stop encoding for the time being until this problem is sorted out. Maybe it is something to do with VLC??
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Apple TV AC3 Audio Out Of Sync

Post by jbrjake »

....and how is VLC making the audio go out of sync on an ATV exactly? Try to keep the conjecture inside the realm of the possible, please.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

Sorry jbrjake, just thinking out loud. Does handbrake use some sort of VLC components for its synchronization of audio? I am not really up on the technicalities of this area. Whatever it is that is causing it, a lot of people are starting to notice this problem, albeit some only notice when they actually sit back and watch for it. Also, bear in mind that I have witnessed varying timing issues ranging from completely out of sync to only just being off, but I must stress that not one of my encodes is in sync in the same way as when watching the actual DVD via a dedicated DVD player.
fallapart13

Re: Apple TV AC3 Audio Out Of Sync

Post by fallapart13 »

I am a part of Apple's Developer Connection and have submitted a bug report to see if they have any further information or to see if they can identify a bug in their firmware.
lone_tree
Experienced
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by lone_tree »

Now that I'm up-to-speed on this thread, I'll throw my two cents in. I have noticed sync issues with certain older DVDs that were encoded either full screen or non-anamorphic and hard-telecined (aka the encode is set to 29.97 fps and not soft-flagged like modern DVDs). It seems that they cause may be the Detelecine + Decomb filter combo that I use on ALL my encodes. When I go back and view these encoded files, the audio can be off by almost .5 seconds or more. That's not surprising to me. What is surprising though, is that even some modern DVD encodes seem to be off when played in QT, but are otherwise fine in VLC.

In short, I think the problem may be with QT and not necessarily HB. That's not to say HB is in the clear because, as someone noted previously, VisualHub files seem to not have the issue. I don't fault HB, however, because I think they are encoding to the format specs and not band-aiding anything for QT specifically. The whole problem is reminiscent of the anamorphic video problem we were seeing in previous version of QT.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Apple TV AC3 Audio Out Of Sync

Post by jbrjake »

.....this thread is turning into a train-wreck, guys. Video filters causing audio desync? Um, no. VLC, which has absolutely nothing to do with encoding the video? Definitely not.

It's impossible to even look into this problem when you all tell us different things.
lone_tree wrote:I think the problem may be with QT
This was a thread about the AppleTV, and it was specifically noted in the first page that the audio sync was *not* off in QuickTime, only on the ATV.

How about you all concentrate on some possibilities that aren't so out there. For example, what happens if you make the ac3 track the primary audio track?
lone_tree
Experienced
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by lone_tree »

I'm not claiming VLC or QT is causing the problem. I think there may be a problem in the way QT reads the file as it's playing that may cause a problem with audio sync. I know this to be true in some instances because I've had audio sync issues with QT that were resolved once I closed the app and restarted.

The only reason I mention QT is because we know the ATV uses some form of QT to play the files (or so I understood from previous threads). So, obviously, something is different with the QT on the ATV and the QT for our computers. Outside of QT, I think there are only a couple of possibilities which have already been touched on: 1)Setup issues with TV/receiver or 2)Optical audio vs. HDMI audio differences.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

Already tried making the AC3 Dolby Digital as the Primary Track and it is still the same outcome unfortunately. Does anybody connect the ATV to a HDMI amplifier via HDMI for their Dolby Digital? I am currently downloading an itunes HD movie that includes a DD track to see if the sync issue stays the same.
lone_tree
Experienced
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by lone_tree »

JVHB wrote:Does anybody connect the ATV to a HDMI amplifier via HDMI for their Dolby Digital?
Not yet, but I plan on trying it out. I am also curious. I have suspicions about not using HDMI audio when using HDMI video.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by dynaflash »

I have done it both ways. Have not experienced sync issue with ac3 either way that I noticed, but I would wager your receiver could be a variable, though not sure about that.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

Like I have mentioned previously, I moved back to a component connection, thinking it was a HDMI issue, and the problem remained the same.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

To try and get somewhere with this problem today I encoded a music video with the following for comparisons

1 - AAC Primary and AC3 Secondary Track
2 - AC3 Primary and AAC Secondary Track
3 - A Solo AAC Track
4 - The same music video from the iTunes store

Results are that the iTunes download and the encode with a solo AAC track are the same i.e. The audio is in sync. However, when including AAC and AC3, in any order, this creates a sync problem. I am nearly finished on downloading the HD movie from iTunes that includes both AAC and an AC3, and I will post results later.
Hansel
Posts: 10
Joined: Thu Mar 05, 2009 10:07 am

Re: Apple TV AC3 Audio Out Of Sync

Post by Hansel »

1 - AAC Primary and AC3 Secondary Track
2 - AC3 Primary and AAC Secondary Track
3 - A Solo AAC Track
4 - The same music video from the iTunes store
I have tried the exact thing, and I came to the same conclusion as you. That #3 and #4 is in sync but #1 and #2 is not.

I've been handbraking quite a lot of DVD's lately using the universalpreset @61% all the time. The strange thing is that this AC3 out of sync problem came from nowhere. The problem started about the time when I downloaded 2.3.1.
But the strange thing is that:
- All of my handbraked DVD's encoded with universal preset @61% prior 2.3.1 is completely in sync on my Apple TV.
- If I encode one of the DVD's again (that I encoded before 2.3.1 and that still works fine) with the same universal preset that I used before the AC3 will be out of sync.

I'm using the latest version of VLC. Please note that can't say for sure that the problem started with 2.3.1, the only thing I can say is that the problem started around that time.
fallapart13

Re: Apple TV AC3 Audio Out Of Sync

Post by fallapart13 »

Thinking about this a bit more, I think I could have an idea as to what the problem is - the AppleTV firmware. I believe that there is a timing difference between HDMI and the optical audio output. Let me explain...

My AppleTV is hooked up using HDMI for video only (direct to my TV) and the optical is hooked up directly to my audio receiver. Since there is no setting in the AppleTV menu to choose the output for the audio, I have to assume that it's sending audio through BOTH the optical output and the HDMI output simultaneously. If the timing for the audio signal is slightly different, then that could cause the audio to be out of sync. Since the HDMI signal carries both audio and video, it makes sense that it would remain tightly in sync. But since the optical is separated it could, theoretically, not be synced with the video.

As I said, both of these AppleTV units have been hooked up the identical way that they are now and have never exhibited this problem until the 2.3/2.3.1 firmware updates.

I also noticed that unplugging the unit from power for 10 minutes, plugging it back in and testing the identical file that minutes earlier was out of sync, that the video and audio were much closer to being in sync. Does this make any sense?
lone_tree
Experienced
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by lone_tree »

Hansel and JVHB, you are both using optical audio, correct?
Hansel
Posts: 10
Joined: Thu Mar 05, 2009 10:07 am

Re: Apple TV AC3 Audio Out Of Sync

Post by Hansel »

Hansel and JVHB, you are both using optical audio, correct?
I am using optical audio and component for video.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by dynaflash »

There is one other thing worth noting though probably has nothing to do with it. I have verified that atv 2.3.1 has re-enabled AC3 only audio (which was previously borked on atv 2.3) ... so *something* changed audio track - wise with the atv 2.3.1 update. Though, as I said I can report no such sync issues with either atv I own. Family/Kids watch movies all of the time on them.
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by JVHB »

Yes I use optical for my audio and HDMI for video.

Well I have just downloaded Hancock in HD with a AC3 Dolby Digital Track from iTunes and it too is also slightly out of sync, very similar to what I regard as my good encodes with HB i.e it is more than watchable for most people, but nevertheless it is still out of sync. I think I am coming to the conclusion that the problem lies with the ATV itself and my overwhelming sensitivity to lip sync. Why my HB encoded interlaced music videos are more out of sync than my non-interlaced movie encodes is something I cannot fathom. Whatever it is, it also happens with content from the iTunes store which, for me, points the finger straight back at Apple and the ATV. It's back to the PS3 for me and my never ending wait for them to add AC3 passthru.
lone_tree
Experienced
Posts: 75
Joined: Mon May 05, 2008 10:23 pm

Re: Apple TV AC3 Audio Out Of Sync

Post by lone_tree »

dynaflash wrote:There is one other thing worth noting though probably has nothing to do with it. I have verified that atv 2.3.1 has re-enabled AC3 only audio (which was previously borked on atv 2.3) ... so *something* changed audio track - wise with the atv 2.3.1 update. Though, as I said I can report no such sync issues with either atv I own. Family/Kids watch movies all of the time on them.
Do you use HDMI audio or optical audio?
phil_carter
Posts: 1
Joined: Sun Mar 08, 2009 10:39 am

Re: Apple TV AC3 Audio Out Of Sync

Post by phil_carter »

Hi, sorry to jump in , but like to add my experience. I have encoded around 500+ movies using mtr and handbrake both .92 and .93. These are all fine playing back on QT on my mac. On the apple tv I use Dolby Digital out via optical to an amplifier and hdmi connection to my plasma. My wife has always complained about the sound being out. I am more immune to it but do notice it sometimes.

I ran a quick test ...

1. Played back scene 1 of a DVD using both HDMI audio via the TV speakers + Optical audio DD via the amp
RESULT : I get an echo effect where the audio is out on the amp and correct on the tv speaker

2. Switched off DD out on the apple tv and ran the same test
RESULT : No echo , sound is in sync on both amp and tv speakers

After reading the above posts it seems that this could have multiple points where the problem exists. Dolby Digital latency in the AMP, or latency/sync issue on the Apple TV when Dolby Digital is turned on between the Optical and HDMI output. It just doesn't have the issue when Dolby Digital is switched off. My guess is that something is causing the latency problem on the ATV when Dolby Digital is turned on. It doesn't seem according the above posts that this is unique to the HDMI output as it exists on component also.

This doesn't help much but I also have the problem ... the only fix for me is to not use Dolby Digital when watching films with my wife ....!
Modular1
Posts: 7
Joined: Sat Dec 20, 2008 4:34 am

Re: Apple TV AC3 Audio Out Of Sync

Post by Modular1 »

i get the sound out of sync issue too. only via the optical output though. sometimes it occurs sometimes it doesnt. ive assumed it was down to amp latency via the optical output, but sometimes pausing the apple tv then starting again will sort it out. maybe this points to some kind of optical out clock issue. i dunno. its bloody annoying though. ive got lipsync control on the amp which never seems to knock the sync in satisfactory. sometimes the file seems more out of sync 1 minute than the next. pausing and restarting sometimes works, sometimes makes it worse.
Modular1
Posts: 7
Joined: Sat Dec 20, 2008 4:34 am

Re: Apple TV AC3 Audio Out Of Sync

Post by Modular1 »

i can confirm that turning off dolby digital in the apple tv settings cures the problem but (obviously) removes the functionality. :(
Locked