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

Refactor #4

Merged
merged 19 commits into from
Dec 16, 2024
Merged

Refactor #4

merged 19 commits into from
Dec 16, 2024

Conversation

moi15moi
Copy link
Owner

A big refactor is needed to close #2 and #3.

For the moment, I only edited the Algorithm conversion explanation.md doc.

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 98.83811% with 15 lines in your changes missing coverage. Please review.

Project coverage is 97.35%. Comparing base (683a8b4) to head (8efb844).

Files with missing lines Patch % Lines
video_timestamps/abc_timestamps.py 91.89% 6 Missing ⚠️
video_timestamps/video_timestamps.py 96.18% 5 Missing ⚠️
video_timestamps/fps_timestamps.py 97.18% 2 Missing ⚠️
video_timestamps/rounding_method.py 88.88% 1 Missing ⚠️
video_timestamps/text_file_timestamps.py 95.45% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   94.83%   97.35%   +2.52%     
==========================================
  Files          17       16       -1     
  Lines         949     1438     +489     
==========================================
+ Hits          900     1400     +500     
+ Misses         49       38      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@moi15moi
Copy link
Owner Author

Actually, I just realised that since $$pts_time \in \mathbb{Q}^{+}$$, I could use Fraction instead of int.
With this change, we could support any unit.

MKVToolNix cannot provide the PTS (Presentation Time Stamp) of a frame directly. Instead, it only offers timestamps in milliseconds, which lack the precision needed for certain tasks.
1. Rename ms to number
2. Correct the round_method so it round correctly for negative number.
Now, we only support ffprobe has a video "parser", so we don't need a abstract class anymore
Don't round the timestamps.
The decision or rounding will be taken from ABCTimestamps.
Now, we have FPSTimestamps, VideoTimestamps and TextFileTimestamps.
They now support different unit of time (milliseconds, nanoseconds, etc)
There isn't any reason to not use ubuntu-latest
@moi15moi moi15moi merged commit 2830624 into main Dec 16, 2024
30 checks passed
@moi15moi moi15moi deleted the Refactor branch December 16, 2024 01:22
@moi15moi moi15moi linked an issue Dec 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle properly m2ts fps RoundingMethod.FLOOR doesn't actually work for the TimeType.EXACT
2 participants