Audio Video Sync, Alignment & Latency Test

While carrying out product reviews of media players or even just trying out a software media player, it’s useful to find out whether the audio and video are in sync.  Sure, there are a lot of audio video synchronisation videos out there, but when the audio and video are out of sync, it’s useful to find out just how frames or milliseconds they are off by.

av_off_syncUnfortunately, most of the videos give just a spinning/moving mark, which while this is great to see how accurate the sync is, they don’t really give an indication to how far out of sync the audio is if we need to know how much it should be corrected by.  For example, the widely available BBC HD sync test clip shows a moving bar, but when I try following this to listen to the snap sound, the reaction time for me to stop my eye or finger ends up going beyond where the snap sounded, just like how a driver takes a brief moment to react to immediate danger.

What my audio video alignment test video does here is flash a white square for one frame with a 10ms length beep 520ms or 13 frames before the flash, then does this again 480ms or 12 frames before the flash, repeating until the beep and flash happen simultaneously and continue until the beep is 520ms or 13 frames after the flash.  In theory, when this video is played back, where the beep and flash occur simultaneously, the info at the bottom of the screen reveals how much the audio is behind or ahead, as shown in the example to the right.

The advantage here is that while ideally the audio and video should ideally be in perfect sync, by knowing how much the audio is ahead or behind of the video, this can be corrected for in some media players. For product reviews, it’s useful for the product reviewer to say just how much the audio is off by.  For example, it could be used as a simple audio latency test for wireless speakers or cordless headphones.

I have created two versions in two formats of this video, both in Avidemux 2.5.2.  The AVI AV sync test is useful for testing portable and set-top media players that don’t support the MP4 codec or which require a lower resolution.  The alignment test allows the user to check how far out of skew the sound is from the video (up to 520ms / 13 frames), while the sync test is for making sure the audio is in perfect sync with the video.

MP4 file Specifications:

AVI Specifications:

Note: Always play both clips from the start!  Some media players go off sync when starting playback midway, seeking, fast-forward or rewinding.

From my testing, both videos show in perfect sync when played multiple times in Windows Media Player 12 (Windows 7 x64), at least on my PC with FFDShow installed.  When I tried the videos in VLC 1.0.5, for some reason it varies between being in sync and 3 frames ahead of the audio and VLC stutters when playing the AVI file.

Update: By request, I have added a second AV sync test above, which is where the beep and flash remain in sync for the duration of the video.

6th May ’12: After getting a report that one of the samples is a frame out of sync, I checked all the clips with Sony Vegas and found that the two MP4 clips had the audio one late.  The two AVI files were in sync.  The two MP4 files have now been corrected.  When I originally created these files, I had no way of verifying the sync of the MP4 files due to very few applications capable of displaying H264 video with an audio graph frame by frame.

6 thoughts on “Audio Video Sync, Alignment & Latency Test”

  1. I read your article ‘audio-video-sync-alignment-latency-test’ and curious how do you check audio/video sync ?

    I have a mp4 video file and my feeling says audio is out of sync with video. But don’t know how to verify that. Any tools ? methods ?

    Thanks.

  2. Is it just me, or are the download links not working? They sound quite useful as I have been struggling with DAC related lag issues for awhile at home.

Leave a Reply

Your email address will not be published. Required fields are marked *