Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Handle WebVtt cue settings #64

Open
moi15moi opened this issue Jan 28, 2023 · 2 comments
Open

[Feature Request] Handle WebVtt cue settings #64

moi15moi opened this issue Jan 28, 2023 · 2 comments

Comments

@moi15moi
Copy link
Contributor

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 moi15moi changed the title [Feature Request] Add WebVtt cue settings to handle [Feature Request] Handle WebVtt cue settings Jan 28, 2023
@tkarabela
Copy link
Owner

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?

@moi15moi
Copy link
Contributor Author

moi15moi commented Jan 30, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants