Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
123 lines (82 sloc) 3.49 KB

Subtitle-Resync

High-speed subtitle synchronization tool

GSoC 2019 | CCExtractor Development

GSoC GPLv3 license

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.

  1. Clone the repository from Github:
git clone https://github.com/CCExtractor/Subtitle-Resync.git
  1. Navigate to install directory:
cd install
  1. Run build.sh
sh ./build.sh
  1. 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?

  1. Read the original audio and modified audio.
  2. Extract audio fingerprints from the audio files.
  3. Compare the fingerprints and detect the different segments in the original content.
  4. 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!

You can’t perform that action at this time.