This Ruby Gem provides conversion of subtitle files in the .scc (Scenarist Closed Captions) format to the more modern WebVTT format that can be used in browsers with HTML5 videos.
The processing is modeled after this paper by the W3C.
gem install subconv
$ subconv --help
Usage: subconv [options] SCC-FILE
-o, --out-file FILENAME Write output to specified file instead of stdout
-f, --fps FPS Assume given video fps for timecode calculation (default: 29.97)
-c, --no-color Remove all color information from output
-F, --no-flash Remove all flash (blinking) information from output
-s, --simple-positions Convert to simple top/bottom center-aligned captions
-n, --no-positions Removes all positional information
-h, --help Show this help message and quit.
The API can also be used programmatically, the bin/subconv
file is just an
example for this.
- EIA-608 parsing and conversion to WebVTT
- Pop-on captions
- Full positioning
- All special characters defined in the standard
- All colors
- Italics
- Underline
- Flash
- Optional removal of certain features during the conversion
- Color
- Flash
- Conversion of fine position information to just top/bottom center
Note that with all features removed, most browsers can display the captions as-is,
but for the colors etc. to work you will need to include a stylesheet that defines
appropriate styles. The one used in the W3C report is packaged here in dist/eia608.css
.
Even then, browsers currently do not correctly support numerous settings yet. Infamously,
Firefox can not apply classes/styles inside cues at all.
- Roll-up captions
- Paint-on captions
- EIA-708