Video subtitle generation

A command line programme to generate SRT format subtitles for use in video players.

The subtitles are generated from the full transcript text of a video. By default, each subtitle will have a maximum of 10 words.

Current status

Youngling. Actively-developed.

Usage

CLI

$ subtitles INPUT-FILENAME.txt LENGTH-IN-SECONDS > OUTPUT-FILENAME.srt $ subtitles transcript.txt 300 > subtitles.srt # True example

Webassembly

``` import init, * as subtitles from 'path/to/subtitles.js';

(async () => await init())();

let transcripttext = 'Lots of text goes here; newline is acceptable.'; let audiolengthinseconds = 99;

const textforsrtfile = subtitles.preparesrtcontent(transcripttext, audiolengthin_seconds); ```

Build instruction

CLI

$ cargo build --release

Webassembly

Install wasm-pack. Then... $ wasm-pack build --target web $ cp pkg/{subtitles_bg.wasm,subtitles.js} /path/to/website/js/

Licence

Simplified BSD licence