pysubs2 icon indicating copy to clipboard operation
pysubs2 copied to clipboard

[Feature Request] Handle WebVtt cue settings

Open moi15moi opened this issue 2 years ago • 4 comments

It would be nice if pysubs2 could interpret all the cue settings: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#cue_settings

  • vertical
  • line
  • position
  • size
  • align

This would allow to correctly convert some .ass tag into cue vtt setting and vice-versa.

moi15moi avatar Jan 28 '23 02:01 moi15moi

I agree :) The WebVTT support is very basic at the moment.

What is more relevant for your use-case: converting existing .ass to .vtt, or getting .ass formatting out of existing .vtt files?

tkarabela avatar Jan 29 '23 23:01 tkarabela

In my case, it would be .ass to .vtt file, but of course, .vtt to .ass is needed.

I don't know it if it can help you, but I have created an library that parse .ass tag: https://github.com/moi15moi/ass_tag_analyzer It parse tag like VSFilter/Libass.

Here is a website to test some webvtt feature (but we can't test all the setting :/): https://ronallo.com/demos/webvtt-cue-settings/

vertical: \frz tag (I don't totally understand the difference between lr and rl) line: Sometime the x value of \pos() position: Sometime the y value of \pos()¸ size: There isn't really a .ass tag for this. The only way is to modify the left and the right margin, but we would need to know the text length which is not possible align: \an or \a

moi15moi avatar Jan 30 '23 00:01 moi15moi