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

SRT with position properties #31

Closed
oreo0725 opened this issue Nov 24, 2020 · 2 comments
Closed

SRT with position properties #31

oreo0725 opened this issue Nov 24, 2020 · 2 comments
Assignees
Labels

Comments

@oreo0725
Copy link

Hi,

I have a .SRT file with position properties, like following:

1
00:00:12,000 --> 00:00:15,123
This is the first subtitle

2
00:00:16,000 --> 00:00:18,000
Another subtitle demonstrating tags:
<b>bold</b>, <i>italic</i>, <u>underlined</u>
<font color="#ff0000">red text</font>

3
00:00:20,000 --> 00:00:22,000  X1:40 X2:600 Y1:20 Y2:50
Another subtitle demonstrating position.

Got this error when trying to open the file

astisub: line 15: parsing srt duration 00:00:22,000  X1:40 X2:600 Y1:20 Y2:50 failed: astisub: Invalid number of millisecond digits detected in 00:00:22,000  X1:40 X2:600 Y1:20 Y2:50

It seems that astisub not recognize such position property.
Is it possible to be supportable?

referenece:

@asticode asticode self-assigned this Nov 25, 2020
@asticode
Copy link
Owner

I've added limited support for this feature :

  • the lib will not fail on these kind of lines anymore
  • but the position won't be parsed since I haven't found an official documentation regarding this anywhere

@oreo0725
Copy link
Author

Yes,

This seems not belong to the official SPEC and some players support such position function but some doesn't.

In my case, I use astisub to validate subtitle content correctness rather than getting the parsed properties.
So this fix in v.0.10.0 is enough for me.

Thanks for quickly support.

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

No branches or pull requests

2 participants