Icontem

JS Subtitle Grabber: Download and extract subtitles from videos

Recommend this page to a friend!
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-05-19 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 50 All time: 492 This week: 2Up
Version License JavaScript version Categories
subtitle-grabber 1.0MIT/X Consortium ...5Text processing, Video
Description Author

This object can download and extract subtitles from videos.

It takes the selector of a video element on the page and makes it available for download.

It can also grab the subtitle lines of a video and make them available for download in the SRT format.

Innovation Award
JavaScript Programming Innovation award winner
May 2016
Winner
HTML5 added support to playback video in many formats on Web pages.

Some formats include not only the video stream but also text tracks that are often used for presenting subtitles.

This object can take a HTML5 video element on a given page and make the video data and the subtitles available for download.

Manuel Lemos
  Performance   Level  
Name: Andras Toth <contact>
Classes: 22 packages by
Country: Hungary Hungary
Age: 46
All time rank: 61 in Hungary Hungary
Week rank: 3 Up1 in Hungary Hungary Equal
Innovation award
Innovation award
Nominee: 15x

Winner: 9x

Details
Usage:

/**
 * selector: string or video element
 */

var grabber = new SubtitleGrabber(selector);

/**
 * return TextTrack Array
 */

grabber.getTextTracks();

/**
 * index: selected track index, encoding: character encoding
 * callBack: function
 */

grabber.getSrtLines(index, encoding, callBack);
grabber.getSrtLines(0, 'utf-8', function(lines){console.log(lines);});

/**
 * download video
 */

grabber.downloadVideo();

/**
 * download srt file
 */

grabber.downloadSrt(index, encoding, filename);
grabber.downloadSrt(0, 'utf-8', 'video.srt');
  Files folder image Files  
File Role Description
Plain text file subtitlegrabber.js Class class
Accessible without login Plain text file usage.txt Doc. example usage

 Version Control Unique User Downloads Download Rankings  
 0%
Total:50
This week:0
All time:492
This week:2Up