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

Add timestamps class v2 #69

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

moi15moi
Copy link
Contributor

@moi15moi moi15moi commented Mar 26, 2023

This pull request will implement #57.
Is also overwrite this PR #65.

Important to note, I haven't been able to get the information if the microdvd end frame value is inclued or not.
Aegisub consider it like inclued, so I decided to do like them. Edit (2023-04-29): I test with ffmpeg. It also inclued the end_frame.
Because of that, I needed to change the value of some tests.

moi15moi and others added 30 commits January 8, 2023 17:12
In general, player like mpv or mpc round up.
If the ms is 0.5, it will round to 1.

So, this commit reproduce this type of rounding, but there is no standard in the video industry
An subtitle cannot contain negative timestamps, so we make it 0
If the fps was invalid, Timestamps.from_fps would raise an ValueError that would been catched. We don't want that, so I moved out the call to from_fps of the try except
@tkarabela tkarabela self-assigned this Apr 2, 2023
@tkarabela
Copy link
Owner

Hi @moi15moi, do you plan to add more commits or is this ready to merge? :)

@moi15moi
Copy link
Contributor Author

moi15moi commented Apr 2, 2023

It would be ready except if you find that the end_time of the microdvd is exclued.

Also, you may wanna see how the shift method is currently done.

@tkarabela
Copy link
Owner

Ok :) I will look at the code when I have time and merge it.

@moi15moi
Copy link
Contributor Author

Ok :) I will look at the code when I have time and merge it.

Hi, would you check it soon?

@moi15moi
Copy link
Contributor Author

Hi, here is a little bump to know if you will be able to review the PR soon

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

Successfully merging this pull request may close these issues.

2 participants