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

TTML styling conversion #9

Open
saintberry opened this issue Feb 11, 2019 · 4 comments
Open

TTML styling conversion #9

saintberry opened this issue Feb 11, 2019 · 4 comments
Assignees

Comments

@saintberry
Copy link

Are there any plans to add features for converting the styling in TTML input to various output formats (I'm hoping for VTT)

@asticode asticode self-assigned this Feb 11, 2019
@asticode
Copy link
Owner

Well I've prepared the code for that, but never found the time to implement it fully.

The first step would be this todo which consists of converting all the TTML string values into pointers to their correct types (like for ssa style attributes for instance).

The second step would be to implement the content of the propagate methods for each type of subtitle (the ttml one is here) which are called everytime style attributes are parsed. To do that, you'll need to check if one attribute is present (!= nil), and fill other subtitle type's style attribute accordingly. You can check this example to understand the logic.

I won't have time to work on this, but I'd be happy to review a PR.

@saintberry
Copy link
Author

Thanks for the detailed response. When I get sometime I'll try take a look and send over a PR.

@dlecorfec
Copy link
Contributor

Hello, my use case would be close (converting EBU-STL to WebVTT while keeping colors). I still can't fully understand astisub's architecture. Any additional hints for this specific case? ;)

@dlecorfec
Copy link
Contributor

Ah, it seemed easier than planned, see PR #12 (not sure if it's the proper way, though ...)

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

3 participants