Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.89 KB

File metadata and controls

58 lines (37 loc) · 1.89 KB

Usage

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

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.

FFmpeg

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

Using Subtitle-Resync

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 output directory in the main tree of the project.

Here’s a list of the usage parameters that can be used.

Parameter Value Description

-org OR -o

FILE /path/to/original/audio.wav

Original Audio File REQUIREMENT: TOOL A, YES TOOL B, NO

-mod OR -m

FILE /path/to/modified/audio.wav

Modified Audio File REQUIREMENT: YES

-srt OR -s

FILE /path/to/original/subtitle.srt

Original subtitle file REQUIREMENT: YES

Examples of using Tool A