-
Notifications
You must be signed in to change notification settings - Fork 22
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
STL reader: option to set a generic, basic style #416
Conversation
README.md
Outdated
|
||
Overrides line positions, force to bottom with defined safe margin in percents: 0 means sticked to bottom of display | ||
|
||
Default: disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does disabled
mean since force_bottom_set_margin
is a float?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the default be None
?
README.md
Outdated
@@ -171,6 +181,14 @@ Specifies a maximum number of rows for open subtitles, either the MNR field of t | |||
|
|||
Default: `23` | |||
|
|||
#### force_bottom_set_margin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### force_bottom_set_margin | |
#### force_bottom_align_with_margin |
66396ac
to
898c7d0
Compare
Thank you for the review, I am not good at namings and close to a newbee in python. |
@ngaullier I was looking at the results of It is not clear to me how removing line padding and relaxing font size and line height makes it better for end-users. Is this to address player incompatibility? If so, is it an incompatibility at the XML syntax level or with TTML features? |
It is a mix of things. |
Thanks for the details. It does feel like multiple separate issues:
For (2), the plan has been to allow the user to specify filters to be applied between the reading and the writing steps. This would conceivably allow the creation of a, say, Netflix filter that would remove features prohibited by Netflix, regardless of the input. Makes sense? The mechanics for implementing such filters mostly exists and just needs to be exposed at the CLI level. |
I like the idea but technically speaking, it seems like an enormous work (out of my own limited python skills). So I don't catch how I could make the TTML writer use ISDs or any other way to make filters available to ttml output ? |
I see two different but related types of filters:
I think I have a draft branch somewhere implementing the framework. Would you be available to test the framework and potentially help create practical filters? |
Yes, I will try. I would think I won't be helpful for the creation of the framework itself, but testing and creating filters should not be a big issue for me, I guess. |
I will take a stab at the framework soon |
I fear it may take a long time to complete the whole thing. Do you think it could be possible to have a first step, which would implement the definitive cli of course but with an intermediate internal code ? I mean "disable_ebu_style" would be renamed sth like "skip_formating" and both options with "force_bottom_align_with_margin" would fill in a new "filter" overall options block; they would be mapped as STL parser options at a first step, but ready to be moved to a new schema later on when available ? |
Sorry for the radio silence. I have spent quality time with the document filter framework and have concluded (I think) that it is not possible to generally split the problem of filtering a document into multiple independent filters. For example,
A preferable approach would be to define filters that target a specific profile/delivery spec. The implementation of each of these filters could reuse building blocks, e.g. merge regions. Does this make sense? If so, can you describe the kind of document that you would like to end up with, i.e. the delivery spec that you are targeting? For example:
Based on that I can take a first stab that you would be able to modify. |
Thank you for the feedback. I think most users are focused on delivery spec rather than custom processing rules, so this would be fine.
|
@ngaullier I have take a stab at [introducing document filters](filters: #423) and would appreciate your feedback. The initial filter is the
The PR needs to be cleaned-up a little bit, but the core functionality is there. If ok, we should close this PR and move the discussion to that other one. |
It seems great, I will get more time to look at this tomorrow. Just a first quick feedback: the naming rules between isd- and doc- filters may need to be split, and the implementation of the supported style props filters could be unified. I tried a draft branch to play with it and see what it would imply, you can have a quick look at https://github.com/ngaullier/ttconv/tree/refactor_supportedstylefilters |
Yes, that is the plan. I can taken care of this if you can check if the document filter matches your expectations. |
It is really super great. The "lcd" filter is just great itself. (BTW, I think its name is kind of mysterious for a user, so maybe the acryonym should be placed somewhere in the readme). Thank you very much. Your tool is already great and this feature will make it even greater. |
Doh! That was my intent :)
+1
"Later" |
@ngaullier I would appreciate your review on #423 . I have bumped the version to 1.1.0 since we are breaking internal contracts. |
In lcd, bg_color works but not color, I think that direct "set_style" should be replaced by an "_apply_color" recursion like bg_color.
I think the latter more straightforward as it does not require additional documentation. |
Do you mean that setting
By |
Yes, setting color does not override text color. Sorry, my words were misleading. Last thing: |
Do you have a specific example?
Ok.
Ok.
Ok. |
Maybe it is specific to ebu stl input, I have not tested broadly at all. You can try this file for example, but there should not be anything exotic with this file, except it is ebu stl. |
Indeed! Seems I have to buy some new eyes and I did not read your answer carefully enough: the body, yes! Sorry about that. It is ok. |
@ngaullier I think I have addressed your feedback (many thanks) with the latest commit. It would be good if you could add your review to #423 |
Replaced by #423 |
The EBU mapping is not always welcome. For simple distribution to end users, a more generic/simplified format appears to be sometimes a better choice.
The first patch disables the "ebu style".
The second disables the vertical positioning in favor of a fixed bottom position, with an adjustable margin.