An automatic timeline shifter to match a subtitle from one video to another based on audio spectrum comparison.
The shifter can match a subtitle synced to one video to another video. A typical scenario is TV and BD releases for the same episode, from which the project name comes.
The purpose of this project is to save the effort of manual timeline shifting. Generally, it provides better accuracy than manual shifting. It attempts to match subtitles by finding similarities in audio streams. The application of SIMD instruction set and multi-threading allows it to typically process 24 minutes of TV and BD within 10 seconds, including decoding and matching.
The latest Windows binary release can be found in the Releases
section.
Two video or audio files and one subtitle file (ASS/SRT) that synced to one of them are needed. For the video files, the first audio stream is loaded. With FFmpeg, different video and audio formats are supported.
For each timeline of the subtitles, the program will extract the corresponding audio spetrum from the source audio stream and match the most similar part of the target audio stream to obtain the offset that should be applied to the output subtitles.
For Windows users, the executable in Releases
provides graphic interface.
For users of other platforms, BDMatchCore
, including the core functionality of the project, can be modified and compiled into a command-line executable. A makefile
and an example of CLI usage
are provided for reference.
- X64 Platform (ARM is not supported currently)
- Windows 7 or newer
- CPU with AVX instruction set
- .Net Framework 4.5 or newer
- Microsoft Visual C++ Redistributable for Visual Studio 2019
- Windows 10 1809 (17763) or newer
- CPU with AVX instruction set
- .Net 8 or newer (Release with .Net runtime is available in
Releases
) - Windows App SDK 1.5.2 or newer (Releases from 2.0.1 onwards include this runtime by default)
- Microsoft Visual C++ Redistributable for Visual Studio 2022
- FFmpeg shared and dev builds
- FFTW shared and dev builds