feat(clip,dub,caption): add --from-stdin batch mode#213
Merged
Conversation
Abstract transcribe's batch primitive (--from-stdin/--concurrency/--force) into a shared app/batch.py runner and wire it into clip, dub, and caption, so each processes a piped list of sources concurrently — making the media commands as pipeline-composable as transcribe already was (find … | assembly caption --from-stdin). - app/batch.py: a generic concurrent runner parameterized by a per-source worker — stdin source expansion, a live status table, one NDJSON record per source under --json, and a fail-summary that exits non-zero. Lighter than transcribe's sidecar/--llm/--llm-reduce path on purpose. - clip/dub/caption: --from-stdin reads one path/URL per line and runs each source's existing single-source pipeline concurrently. A re-run skips sources whose output already exists (--force redoes them); --out and -t/--transcript-id are rejected in batch mode (they can't span many sources). - options.py: the batch option factories now take per-command help text so the flags read naturally on each command (video vs audio, caption vs dub vs clip). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PJdgpwb2zQAJSyyMQvijh
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.
Abstract transcribe's batch primitive (--from-stdin/--concurrency/--force)
into a shared app/batch.py runner and wire it into clip, dub, and caption, so
each processes a piped list of sources concurrently — making the media commands
as pipeline-composable as transcribe already was (find … | assembly caption
--from-stdin).
worker — stdin source expansion, a live status table, one NDJSON record per
source under --json, and a fail-summary that exits non-zero. Lighter than
transcribe's sidecar/--llm/--llm-reduce path on purpose.
source's existing single-source pipeline concurrently. A re-run skips sources
whose output already exists (--force redoes them); --out and -t/--transcript-id
are rejected in batch mode (they can't span many sources).
flags read naturally on each command (video vs audio, caption vs dub vs clip).
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015PJdgpwb2zQAJSyyMQvijh