Add drop-frame timecode support to SCCWriter#378
Open
OlteanuRares wants to merge 2 commits into
Open
Conversation
Implement drop-frame (DF) timecode formatting for the SCC writer, controlled by a new parameter. When enabled, timestamps use the standard 10-minute block method (FRAMES_PER_10MIN=17982) with frame-skip at non-10th minute boundaries and semicolon separators. Also refactors the writer's timing pipeline: - Extract SCC_TOKENS_PER_CAPTION_MAX (80) as a named constant - Fix token counting (split() instead of len/5 heuristic) - Add monotonic frame deduplication pass (PASS 3) - Split captions exceeding 80 tokens into multiple lines - Guard CI coverage step against test failures Based on the work by @foxPrateek in PR #354, reimplemented with review feedback addressed: drop_frame=False default, math.floor consistently, PAC range(2) preserved, _format_timestamp dispatcher, named constants, helpers outside loops, no unused imports. Co-Authored-By: foxPrateek <foxPrateek@users.noreply.github.com>
🟡 PR Compliance ReviewRisk Level: MEDIUM
REVIEW REQUIRED - Address issues before merging Full report available in workflow artifacts |
🟡 PR Compliance ReviewRisk Level: MEDIUM
REVIEW REQUIRED - Address issues before merging Full report available in workflow artifacts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds drop-frame timecode support to
SCCWritervia a newdrop_frame=Falseparameter. Reimplements the work from community PR #354 (by @foxPrateek, closed due to inactivity) with all review feedback addressed.Changes
drop_frameflag onSCCWriter— whenTrue, outputs DF timestamps with semicolon separators using the standard 10-minute block methodSCC_TOKENS_PER_CAPTION_MAX,_SCC_PREFIX,_SCC_SUFFIXas named constants_format_timestampdispatcher,_format_timestamp_df,_format_timestamp_ndf,_microseconds_to_frameBackward compatibility
SCCWriter()with no args produces identical output to before. Default is NDF.Test plan