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, see further down for a longer sample), 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.

Extended AV sync test frame29th Jul ’18: After a few requests for a longer alignment test, I created a new variant from scratch in Vegas Movie Studio and exported it as a 1280×720 video at 25 frames per second using the Sony AVC codec (H264 video with AAC audio).  I reimported the MP4 file to verify that the 40ms tone matches up with the ‘In sync with’ flash shown in the middle just after the minute mark.

To reduce the playtime, this clip shows 5 lines, each offset 1 second apart as shown in the above right screenshot.  For example, if the beep sounds the instant the white square appeared as shown above, it means that the audio is 1240ms behind the video.

MP4 extended test file specifications:

14 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 ?


  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.

  3. I am testing BT AV latency where the delays are often>1sec. Do you happen to have a version of [] where the timing between flash+tone is about 2 seconds?

    1. I’ve now added a longer version above. As I no longer have the original template, I created a new one from scratch, this time with 5 lines and the flash offset one second apart per line. Otherwise the clip would be very long and very tedious to create. This covers from -2480ms to +2480ms.

  4. I am having a specific lip-sync issue that is happening from 4K/HDR sources only. Do any of your clips have HDR enabled?

  5. This is brilliant, thanks for creating these files. Would you consider creating test files for 23.976fps and 60fps to verify all scenarios? It might be useful since not everyone plays 25fps content, and Blu-rays are 23.976fps.

  6. Hello,

    These files are very helpful. Thank you! A known bug with Kodi is that different framerates may be delayed by different amounts. Could you make a version of your extended test for the most common framerates? 23.976, 24, 30, 60?

Leave a Reply

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