Repository navigation
feat: add pipeline to run several edits as one ffmpeg process (#125) - #162
Merged
Merged
Conversation
Steps (trim, crop, scale, speed, redact, callout, reframe, zoom, then an optional export_preset or export_gif) take their tools' options and are fused into one filter graph, with frame size, fps, and duration tracked through the chain. Builders expose their filter fragments so the tools and pipeline share one implementation. Docs recipe REC 07. Closes #125 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Closes #125.
pipeline { input, steps, quality?, dryRun?, output? }runs a chain of edits as one ffmpeg process: one re-encode instead of one per edit, and no intermediate files. Steps take the same options as their tools:trim,crop,scale,speed,redact,callout,reframe,zoom(keyframes).export_presetorexport_gifmay come last.How it fuses
cropFilter,scaleFilter,redactSteps,calloutSteps,zoomFilter, andexportPresetPartsout of the builders, and moved callout asset prep and the GIF size ladder into utils. The standalone tools' output is unchanged; existing tests pin it.trimis an input seek; later trims use trim/atrim. Audio follows trims and speed changes, and is copied untouched when nothing changes timing. Labels are namespaced per step, so repeated ops don't collide.export_giftail is the one two-stage case: a high-quality mp4, then the size-budget ladder.dryRunreturns what each step became and the fused ffmpeg command.Done-when check (integration, real ffmpeg, runs on CI): trim → crop → scale → export_preset runs as one process with a single
-i. It matches the four tools run one by one: same 1080×1080 size, same duration, SSIM > 0.95. A second test fuses speed + redact + callout (duration halves, redaction and callout drawn) and ends in a GIF.End to end through the built server: the REC 01 bug-repro chain (redact → trim → callout → GIF) as one
pipelinecall took 368 ms, with progress reported, and produced the same GIF. It's now docs recipe REC 07, "The whole edit in one call".Bumps to 0.30.0.
🤖 Generated with Claude Code