Repository navigation
feat(cli): check --prepare-media makes the video copies alone, and a stopped copy resumes - #6114
Merged
miguel-heygen merged 1 commit intoOct 23, 2026
Conversation
…stopped copy resumes A long source is copied in one-minute pieces that stay in the cache, so a copy that is killed or runs out of time continues from its finished pieces. check --prepare-media runs only that step: no browser, no report, a per-file result as JSON, and exit 1 when a copy failed.
miguel-heygen
merged commit Oct 23, 2026
950bf3e
into
fix/check-copies-at-composition-size
15 of 16 checks passed
Collaborator
Author
|
Folded into #6104 (same copy path, one PR): resumable pieces and check --prepare-media ship there, with the same evidence. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
hyperframes check --prepare-mediamakes only the browser-playable video copies and exits, and a copy that is stopped continues from its finished pieces instead of starting over.Why
A long HEVC or ProRes video can take longer to copy into a browser-playable file than a caller allows a check to run. The copy was then killed, left a half-written temp file, and the next check started over from zero, so such a project could never finish checking from a caller with a short clock.
Related work
Stacked on #6104 (same copy path); retarget to
mainwhen it merges.How
hyperframes check --prepare-media [--json]makes only those copies and exits. It opens no browser and writes no report, and each file stays bounded by the existing 15 minute transcode limit.--jsonprints{ ok, prepared: [{ file, state: "ready" | "cached" | "failed", reason? }], total, ready, failed }; progress stays on stderr. Exit code is 0 when every copy is ready, 1 when any failed. It honors--proxy/--no-proxyand takes the same project lock as a check.Test plan
Synthetic 200 s 1080p HEVC with audio, on Linux with ffmpeg 7.0:
check --prepare-media --json, stopped at 25 s, rerunstate: ready, exit 0; a third run reportscachedin 3 msTests: new cases for piece resume (the rerun encodes only the missing pieces, then joins and leaves only the final file), short sources staying one pass, stale-piece sweep, and
--prepare-mediaentering throughcreateCheckCommand(no check pipeline call, JSON shape, exit 1 on a failed copy). Removing the "skip a finished piece" line turns the resume test red (expected [ '0', '60', '0', '60', '120' ] to deeply equal [ '0', '60', '60', '120' ]). 3 green runs of the cli check tests (170) and studio-server helpers (523); typecheck and oxlint clean.Not covered: