Skip to content

Add reusable video preparation and raw measurement APIs - #579

Merged
kstonekuan merged 2 commits into
mainfrom
feat/reusable-video-primitives
Sep 20, 2026
Merged

kstonekuan merged 2 commits into
mainfrom
feat/reusable-video-primitives

Conversation

@kstonekuan

@kstonekuan kstonekuan commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Video integrations currently have to rebuild camera export, model-video preparation, and raw-measurement helpers outside HFlow. Add public file-level APIs so callers can reuse those operations without creating an episode or persistent workspace.

  • Export a selected MCAP camera while retaining irregular timestamps and decoded pixels; reject unsupported media and never overwrite existing output.
  • Add nearest-position keyframe sampling, unpadded fitting, and explicit JPEG quality while preserving current sampling defaults.
  • Expose frame statistics with explicit luma-range and cache policy, raw blur measurements, and duration-weighted camera-shake summaries.
  • Prepare model video through the existing JPEG and canonical H.264 recipe without an intermediate MCAP. Existing transform bytes/defaults are unchanged.
  • Document the public contracts and cover timestamps, pixel parity, coverage, invalid inputs, and output preservation with synthetic media.

Validation:

  • uv run --locked ruff check --fix
  • uv run --locked ruff format
  • uv run --locked ty check
  • uv run --locked pytest -q: 2,254 passed, 8 skipped
  • Python 3.11 affected API tests: 105 passed
  • Downstream HUD media/pipeline regressions: 178 passed
  • Lychee checks for changed documentation: 55 links passed
  • Python 3.12 native overlay: all seven changed implementation modules compiled; all 105 affected API tests passed against the compiled modules

@kstonekuan
kstonekuan merged commit e0b4446 into main Sep 20, 2026
8 checks passed
@kstonekuan
kstonekuan deleted the feat/reusable-video-primitives branch September 20, 2026 05:23
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.

1 participant