-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Subrib parser compatibility #2145
Comments
I don't think negative times are SubRip compliant. Please feel free to refer to a source that says something different, if you've found one. What would it mean for a subtitle to occur during negative time? Thanks! |
Compliant or not, I used a tool that shifted times to match movie, and it shifted some times to negative range. It played OK on a video player and I didn't care about negative ones. |
It seems preferable for you to ask whoever writes the tool you're using to fix the bug (i.e. by clipping the output to t=0). Making non-compliant additions to other software as a means to work around the problem is not the best approach, and furthermore, it encourages the creation of more tools that generate non-compliant output. Unless you can find a reference that says negative timestamps are allowed, I think you should report the issue to whoever created the tool and get a fix on that side. |
I don't remember the tool. But many players handled it. You could simply ignore negative timestamps instead of breaking entire parsing. You have already "Skipping invalid index: " in there which is also support for non-compliant files. Another point of view: Subrip is probably not standardized at form of "RFC" or similar. You you should point to make the parser as permissive as possible. Btw, are negative timecodes really documented somewhere to be prohibited? |
I see what you mean now. You're right. To clarify:
|
Marking as bug; we will resolve by skipping as per first bullet point. Thanks! |
Issue: #2145 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140868079
Issue: #2145 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140868079
SubripSubtitle.java
Try to feed it with this text file:
It will not work as it's not expecting negative times, yet I encountered such srt file.
The text was updated successfully, but these errors were encountered: