Skip to content

hogart/vtt2srt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vtt2srt

WebVTT to .srt converter. Sometimes bad internet connection leaves you no option but to download some videos instead of watching them in your browser. But those videos often come with closed captions in WebVTT, and this format is not widely supported in media players yet.

Installation

npm install vtt2srt

bower install vtt2srt

Or download and include vtt2srt.js manually in your page.

Programmatic usage

var fs = require('fs');
var vtt2srt = require('vtt2srt');

var vtt = fs.readFile('captions.vtt', function (err, captionsBuff) {
    console.log(vtt2srt(vtt));
});

Commandline converter

node bin/convert.js < elephants_dream.vtt > elephants_dream.srt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published