Repository navigation
VFR: separate frame positions and durations - #591
MuhammadBilalKhan267 wants to merge 11 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 |
Addresses #569. Targets 0.8.
This draft begins replacing FPS-based frame/time conversions with explicit frame positions and durations.
FramePositioncarries a frame’s ordinal and timestamp;FrameDurationcarries a frame count and exact elapsed time.Implemented so far:
RELATIVE/SOURCEframe numbering inVideoStream, removing duplicated backend position getters.StatsManagerto integer frame keys with timestamp metadata for CSV export.ThresholdDetector, retaining a local fade-position buffer to resolve split points to observed frames without a global frame index.Remaining work includes
FlashFilter, the other detectors,SceneManager, API/CLI integration, and outputs. Known backend timestamp limitations and final-frame duration handling remain deferred.Focused timecode tests pass. Existing backend, detector, and integration tests still need porting, and end-to-end validation is pending.
Feedback on the types, numbering and seek semantics, and local buffer approach would help guide the remaining migration.