Subtitle-Resync
Subtitle-Resync copied to clipboard
A tool to automatically generate in-sync subtitles of different versions of the same base media (such as with edits)
Subtitle-Resync
High-speed subtitle synchronization tool
GSoC 2019 | CCExtractor Development
Subtitle-Resync is a high-speed subtitle synchronization tool, capable
of automatically generating in-sync subtitles of different versions of
the same base audiovisual content (such as, with and without commercials).
It has been developed under GSoC 2019 with CCExtractor development.
See what is it & how does it work
Usage
Refer the docs for a detailed guide to install and use Subtitle-Resync.
- Clone the repository from Github:
git clone https://github.com/CCExtractor/Subtitle-Resync.git
- Navigate to
install
directory:
cd install
- Run
build.sh
sh ./build.sh
- Sync!
./resync -o /path/to/original/audio.wav -m /path/to/modified/audio.wav -s /path/to/original/subtitle.srt
Notes
Requirements
Refer the docs for installing the dependencies of Subtitle-Resync.
-
CMake
Minimum version 3.14 is required.
-
Boost Libraries
Minimum version 1.60 is required.
Argument properly
Refer the documentation for proper usage of the tool.
-
Audio Files
Make sure the audio is uncompressed raw PCM (16-bit signed int), mono sampled at 16000 Hz (Enough to cover human speech frequency range).
Using ffmpeg you can run:
ffmpeg -i /path/to/video.ts -acodec pcm_s16le -ac 1 -ar 16000 output/path/name.wav
-
Subtitle Files
The input subtitle file should be a clean and proper SubRip (SRT) file.
Quick Demo
You can find the list of parameters and their brief description by running resync
without any arguments.
- IN:
./resync -o /path/to/original/audio.wav -m /path/to/modified/audio.wav -s /path/to/original/subtitle.srt
What will this trigger?
- Read the original audio and modified audio.
- Extract audio fingerprints from the audio files.
- Compare the fingerprints and detect the different segments in the original content.
- Adjust the subtitle file and generate an in-sync subtitle file.
See Subtitle-Resync in action here.
License
GNU General Public License 3.0 (GPL-v3.0)
Check LICENSE.md for details on
Subtitle-Resync's license.
The individual licenses of the libraries used can be found in license
directory.
Community
You may reach CCExtractor community through the slack channel where most CCExtractor developers hang out.
- CCExtractor Development on Slack
We foster a welcoming and respectful community. 👐
Contributing
Any contribution to the project would be highly appreciated!