Obviously, before we use the tool we need to install it, this installation guide here will help you do so. Once we have the tool installed this guide is all we need to use it to our purpose.
CCExtractor, the de-facto subtitle tool, can be used to extract the subtitles from the original files.
Using CCExtractor:
ccextractor [options] inputfile1 [inputfile2...] [-o outputfilename]
Everything about CCExtractor can be found here.
The tools require the audio to be in specific format. The audio needs to be raw PCM(16-bit signed int). It should be mono(single channel) sampled at 16KHz.
Converting any media to the specified format can be achieved using ffmpeg.
ffmpeg -i /path/to/video.ts -acodec pcm_s16le -ac 1 -ar 16000 output/path/name.wav
Running Subtitle-Resync without any instruments lists all the parameters that are to be passed.
-
Syntax
We need 3 files to be passed to the tool. One is the original/reference file, an edited file and the original subtitle for the original/reference file.
./resync -o /path/to/original/audio.wav -m /path/to/modified/audio.wav -s /path/to/original/subtitle.srt
-
Output As output we get an in-sync subtitle file. By default, the output subtitle file is saved in the
outputdirectory in the main tree of the project.
| Parameter | Value | Description |
|---|---|---|
|
FILE /path/to/original/audio.wav |
Original Audio File REQUIREMENT: TOOL A, YES TOOL B, NO |
|
FILE /path/to/modified/audio.wav |
Modified Audio File REQUIREMENT: YES |
|
FILE /path/to/original/subtitle.srt |
Original subtitle file REQUIREMENT: YES |