Skip to content

fix(producer): scale frame coverage by playback rate - #3542

Merged
miga-heygen merged 1 commit into
mainfrom
fix/playback-rate-coverage-1787952018
Sep 4, 2026
Merged

fix(producer): scale frame coverage by playback rate#3542
miga-heygen merged 1 commit into
mainfrom
fix/playback-rate-coverage-1787952018

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

Valid slow-playback clips no longer fail the extracted-frame coverage gate. Coverage now compares delivered frames against the unique source-frame window consumed by the authored slot, using the same normalized playback rate as extraction, while retaining the existing source-duration ceiling and incomplete-extraction protection.

Fixes reported:1787952018.741109.

Test plan

  • packages/producer/src/services/render/videoFrameCoverage.test.ts (39 passed)
  • Producer typecheck
  • oxlint and oxfmt --check on changed files
  • Exact Terra fixture with the default 95% gate: extracts 60 frames, expects 60, reports minimum coverage 1, and produces a valid 4.000s MP4 without HF_VIDEO_COVERAGE_THRESHOLD=0

Compound Engineering
Codex

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at exact head. Correct fix — a slowed slot at playbackRate 0.5 consumes half the source media, so expectedFrames must scale by playbackRate. Uses the existing normalizePlaybackRate from core. New test verifies the math (4s slot at 0.5x → 60 source frames at 30fps, ratio 1.0).

— Miga

@miga-heygen
miga-heygen enabled auto-merge (squash) September 4, 2026 18:06
@miga-heygen
miga-heygen merged commit 353b9eb into main Sep 4, 2026
53 checks passed
@miga-heygen
miga-heygen deleted the fix/playback-rate-coverage-1787952018 branch September 4, 2026 18:06
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.

2 participants