feat: render (ffmpeg proxy preview) + compile (declarative spec → draft)#29
Merged
Conversation
…aft) Two commands that close the biggest gaps in a headless CapCut workflow: seeing the result of an edit, and authoring a whole draft in one shot. - `render` — low-res ffmpeg proxy of the timeline (main video track trim + per-segment speed, audio mix, optional --burn-captions) so you can watch an edit without opening CapCut. A preview, not CapCut's final render. The ffmpeg command is built by a pure, deterministic buildRenderPlan that is unit-tested without invoking ffmpeg; --dry-run prints the plan. Read-only. - `compile` — builds a whole draft from a declarative JSON spec (the inverse of `describe`) via the same factory functions the imperative add-* commands use. Times in seconds; media paths relative to the spec. Validates the full spec and checks every media file exists before writing anything; mirrors the result to both draft_content.json and draft_info.json. ffmpeg is an opt-in shell-out (only when actually rendering), mirroring how `caption` shells to whisper. Still zero npm-dep, JSON-by-default. 12 new tests (171 total, all passing). Bumps to v0.10.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Adds the two highest-utility next commands on top of v0.9, both validated end-to-end before merge.
render— watch an edit without opening CapCutA low-res ffmpeg proxy of the timeline: flattens the main video track (per-segment source trim + speed), mixes every audio-track segment, and with
--burn-captionsdraws the text segments in. Explicitly a preview, not CapCut's final render (no multi-track compositing/effects). Read-only — never mutates the draft.buildRenderPlanthat is unit-tested without invoking ffmpeg.--dry-runprints that plan and needs no ffmpeg at all.captionuses for whisper. Still zero npm-dep.compile— build a whole draft from a declarative JSON specThe inverse of
describe: instead of chaining 30 mutatingadd-*commands (each a place to drift), an agent emits one spec andcompileconstructs the draft atomically via the same factory functions the imperative commands use.draft_content.jsonanddraft_info.jsonso every downstream command reads the same data.Verification
compile, 6renderincl. a real ffmpeg render gated on host availability + a pure-plan suite).compileoutput passescapcut lint(cross-tool validity check).npm test) green.compilewas writing todraftsDir/spec.nameinstead of--out(dir name vs draft display-name conflation), and the dualdraft_content.json/draft_info.jsontemplate files are now kept consistent.Bumps to v0.10.0; CHANGELOG + README updated.
🤖 Generated with Claude Code