Repository navigation
feat: add transcribe (whisper) and burn_subtitles (#120) - #151
Merged
Merged
Conversation
transcribe runs FFmpeg 8's whisper filter locally to an SRT, renumbering whisper's 0-based cues and removing overlaps. burn_subtitles renders an SRT/ASS with libass in the bundled font, in clean or social style. Missing whisper/libass support and missing models are explained up front. 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 #120.
What
transcribe{input, model?, language?, output?}:aresample=16000,whisper=model=…:format=srt:destination=…(FFmpeg 8, whisper.cpp; nothing leaves the machine). No model is bundled: passmodelor setSCREENCAST_WHISPER_MODEL, and the error explains where to get one. Whisper writes to a temp file; thenparseSrt→normalizeCues→formatSrtproduce the output.burn_subtitles{input, subtitles, style}:subtitles=filename=…:fontsdir=<bundled fonts>:force_style='…'with libass.clean(outlined line) orsocial(bold on a dark box, raised clear of app UI). Audio copied, viarunEditJob.hasFilter(name)inffmpeg.ts(probed once): both tools explain a missingwhisper/subtitlesfilter up front instead of failing deep in ffmpeg.Found in testing
regionLumaclaimed to average a region, but itsscale=1:1used ffmpeg's default scaler, which samples sparsely and missed thin caption text (mean 2 on a clearly captioned frame). It's now a true average, plus aregionMaxLumafor "is text drawn here". The title-card, callout, and redaction checks still pass.Verified
ggml-tiny.enmodel: 2 cues, "Open the Settings page. Then click the same button to finish the deployment." in ~1.4 s (tiny mishears "save"; larger models do better). Burned in both styles in ~0.5 s and checked visually: Inter, bottom-centred, social on a dark box. No model → clear error with the download link.captions.test.ts): SRT parsing (CRLF, 0-based, multi-line), renumber and overlap removal against whisper's real output, ordering, hour formatting, model resolution, filter-path escaping, styles.Version 0.25.0; README (35 tools), Pages,
mcp-tools.json, ROADMAP, CHANGELOG.🤖 Generated with Claude Code