Repository navigation
VFR: separate frame positions and durations - #591
MuhammadBilalKhan267 wants to merge 44 commits into
Conversation
- Centralize frame numbering and position tracking in VideoStream. - Update backend reads, seeks, resets, and stream wrappers. - Migrate StatsManager and ThresholdDetector to FramePosition. - Add shared input parsing, exact time calculations, and local fade buffering.
- Preserve frame/time minimum units through shared input parsing. - Check frame counts or exact elapsed time without FPS conversion. - Retain original frame positions for delayed cuts. - Update the SceneDetector contract and related documentation.
|
FlashFilter and the base SceneDetector interface are now ported to The existing 240-FPS estimate remains for callback-image buffering. It does not control cut-duration checks. Removing it requires coordinated changes to SceneManager and detector buffer handling, so that work is deferred until the SceneManager port. |
- Replace FrameTimecode with FramePosition for detector inputs and returned cuts. - Rename timecode parameters to position in ContentDetector and FlashFilter.
- Preserve frame positions in the rolling buffer, detected cuts and stats. - Parse minimum scene lengths once and compare frames or exact elapsed time. - Add SceneDetector.meets_minimum for frame and time comparisons.
- Preserve frame positions in detected cuts and stats. - Parse minimum scene lengths once and use the inherited duration check.
- Preserve frame positions in detected cuts and stats. - Parse minimum scene lengths once and use the inherited duration check.
- Preserve original frame positions through prediction buffers and detected cuts. - Remove PTS/FPS-based timecode reconstruction. - Run FlashFilter once per real prediction, including non-cut frames. - Mark startup and EOF padding with None to exclude artificial frames from cut detection and filter state.
|
Ported all detectors to TransNet now passes every real prediction through FlashFilter, including non-cut frames needed to complete MERGE filtering. |
- Use FramePosition for scene boundaries and callbacks. - Add peek_timecode across backends and stream wrappers. - Check frame/time limits before every read, including skipped frames. - Report progress in frames or seconds. - Forward detect() inputs directly and align position-pair aliases. - Update documentation for the changed contracts.
|
Ported SceneManager to |
- Port CSV, HTML, EDL, FCPXML, FCP7, and OTIO writers. - Use frame ordinals for frame fields and timestamps for time fields. - Preserve rational timing until output formatting. - Update scene metadata, filename formatting, and video splitting. - Pass the export frame rate explicitly from the EDL CLI command. - Handle empty scene lists in HTML output.
|
Ported CSV, HTML, EDL, FCPXML, FCP7, OTIO, and video splitting to the new types. Frame fields now use ordinals, while timing comes from timestamps. |
- Generate exact Timecode targets from scene timestamps. - Calculate image counts using frame or time intervals without FPS conversion. - Use decoded frame positions for filenames in both extraction paths. - Remove the floating-point interval tolerance. - Temporarily use zero padding for integer margins and document the deferred VFR policy.
- Preserve frame and time units when parsing CLI inputs - Add configurable frame numbering and update detection limits - Port CLI output handlers and scene postprocessing - Load paired frame numbers and timestamps from scene CSVs - Export Timecode, FramePosition, and FrameDuration
[api] Separate stream metadata and support expanded splits [skip ci] - Separate duration seconds from reported frame counts across backends - Update CLI validation, logging, progress, and editor duration exports - Preserve the source cursor when creating fan-out consumers - Expand split commands to source start and EOF without rebuilding scene positions - Honor configured expansion and format expanded filename boundaries as zero/open-ended
Use FramePosition.frame_number in benchmark predictions, parameter sweeps, and golden cut-list generation.
- Forward timestamp formatting, timing properties, and legacy getters - Add deprecated frame_num alias and ordering by frame_number
- Preserve FramePosition and exact Timecode arithmetic - Restore frame-rate-based image margins and port the Breakthrough#608 clamp - Retain upstream weight validation and formatter regression tests
- Follow the arithmetic protocol for unsupported operands - Update negative-result tests to expect ArithmeticError - Remove unused imports and redundant code, and fix test typing - Update API examples, migration guidance, and generated CLI docs
- Preserve the FramePosition API while incorporating upstream updates - Port the new image-resizing test to FramePosition
- Pass source end frames directly to detect() - Use valid PNG compression in the resizing test - Remove a redundant CSV range comparison
Summary
Separate frame ordinals from presentation timestamps to address #569.
VFR frame numbers were derived from timestamps and average frame rate. This PR counts frames independently and ports the library to
FramePositionandFrameDurationfor 0.8.Changes
FramePositionfor frame ordinals and timestamps, andFrameDurationfor frame counts and elapsed timeRELATIVEandSOURCEnumbering and non-consuming timestamp peekingFrameTimecodeand retain selected forwarding helpers onFramePositionRemaining work
Deferred