Skip to content

Commit 81cb003

Browse files
committed
refactor(engine): shorten the frame count doc to two lines
1 parent d1cedcf commit 81cb003

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎packages/engine/src/services/videoFrameExtractor.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,8 @@ export function isVideoFrameFormat(value: unknown): value is VideoFrameFormat {
149149

150150
const SLOT_EDGE_TOLERANCE_BELOW_EXPORT_SNAP_FRAMES = 1e-4;
151151
/**
152-
* Resolve the frame count produced for a requested extraction duration.
153-
*
154-
* Both paths sample with FFmpeg's fps filter. A CFR window gets a frame for every
155-
* output slot it covers, at least as many as exportClipWindow shows; a VFR window
156-
* rounds up, keeping the slot a trailing still covers. Keep this calculation shared
157-
* by superset slicing and producer coverage accounting so a complete extraction
158-
* cannot be rejected because the two paths disagree by one frame.
152+
* Frames a window gets: one per output slot it covers (CFR), or rounded up (VFR).
153+
* Superset slicing and the coverage gate share it, so they never disagree by a frame.
159154
*/
160155
export function extractionFrameCountForDuration(
161156
durationSeconds: number,

0 commit comments

Comments
 (0)