Open henke37 opened 6 years ago
We could use https://www.npmjs.com/package/ass-to-vtt (we already use srt-to-vtt).
I skimmed the code of that one. It's buggy at best and defective by design at worst.
Ass files have a lot of formatting. It has karaoke, it has multiple styles, it has absolute positioning, it has vector graphics, it has animation, it has clipping, it has rotation, it has colors.
Maybe we shouldn't seek to only store vtt. With so many features, ass seems richer and the transform to vtt looks like a downgrade only useful to keep compatiblity maxed.
https://sunnyli.github.io/videojs-ass/example.html showcases a videojs plugin for ASS.
That one seems to depend on https://github.com/Arnavion/libjass for the actual work. The later is promising, even if it might not support all tags yet.
Just to say that I found a test file to check type, color, position, etc. on caption here.
I imported the first one on a new video here (unlisted). Just activate English captions, the image doesn't matter.
Several things works great like italic and bold, some not like colors or position.
Maybe it can be a good test suite for this issue.
I recommend some cation for that page, it seems like it hasn't been updated in seven years.
@henke37 there are a little update from libass, he re commend to follow this project https://github.com/Dador/JavascriptSubtitlesOctopus
Support for subtitles in the .ass format, since #72 only has the boring types.