Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.14k stars 1.52k forks source link

Advanced substation type subtitles #845

Open henke37 opened 6 years ago

henke37 commented 6 years ago

Support for subtitles in the .ass format, since #72 only has the boring types.

Chocobozzz commented 6 years ago

We could use https://www.npmjs.com/package/ass-to-vtt (we already use srt-to-vtt).

henke37 commented 6 years ago

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.

rigelk commented 6 years ago

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.

henke37 commented 6 years ago

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.

roipoussiere commented 6 years ago

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.

henke37 commented 6 years ago

I recommend some cation for that page, it seems like it hasn't been updated in seven years.

MikaXII commented 4 years ago

@henke37 there are a little update from libass, he re commend to follow this project https://github.com/Dador/JavascriptSubtitlesOctopus