I've been working on a small Python tool called delay-check that calculates the time offset (delay) between two audio/video files, ideal for synchronization tasks (e.g. matching a dubbed track to an original).
How it works:
1. Extracts audio fingerprints using MFCC coefficients
2. Applies cross-correlation to find the optimal offset
3. Validates the delay across multiple segments (25%, 50%, 75%, end) for consistency
4. Reports delay, correlation score, confidence level, and time drift
Key features:
- Supports video containers (MKV, MP4, MKA) and many audio formats (WAV, AC3, AAC, DTS, FLAC, MP3, etc.)
- Multi-track selection (interactive if multiple audio tracks are found)
- Fully configurable via JSON (analysis time, sample rate, MFCC params, etc.)
- Detailed logging
- Confidence scoring with drift detection to catch VFR or different-source issues
Examples:
# Compare two audio files directly
# Extract audio track from a video and compare against an audio fileCode:delay-check original.ac3 dubbed.ac3 delay-check original.aac dubbed.aac delay-check original.wav dubbed.wav
# Compare two video files (will use their first audio track)Code:delay-check movie.mkv dubbed.ac3
Repo: https://github.com/sicuskyle/delay-checkCode:delay-check original.mkv dubbed.mkv
I'd love for people to test it with their own files and report any issues or suggestions.
+ Reply to Thread
Results 1 to 2 of 2
-
-
Love the concept! How exactly does it figure out what the delay actually is though? Like does it somehow see if lips appear to move with speech or other triggers in the audio, or I saw you mentioned dubs - perhaps it only works with videos that already have audio that'd be the same between them such as music or sound effects?
I'm still not clear on what the best way to add audio to say something captured with VHS-decode if the audio is being captured by traditional means.
Similar Threads
-
[OPEN SOURCE] AudioAlign: Audio Synchronization And Analysis Tool
By forart.it in forum Latest Video NewsReplies: 10Last Post: 18th Aug 2025, 06:45 -
How do you address YC delay problems? Y/C delay cable length calculation?
By aramkolt in forum Video ConversionReplies: 12Last Post: 26th Dec 2024, 06:45 -
Cheap/open-source NLE app to merge audio + video files?
By yetanotherlogin in forum EditingReplies: 5Last Post: 4th Dec 2021, 07:34 -
Joining several AVI files with progressive audio delay + converting to MKV
By motorola8800 in forum Video ConversionReplies: 3Last Post: 24th Aug 2021, 20:57 -
Panning audio with time delay
By miguelmorin in forum AudioReplies: 5Last Post: 10th Jul 2021, 03:28


Quote