Repository navigation
Pipelines phase 2: captions (PRD and implementation) - #297
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d104cce29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… provider Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… no HLS subtitle track, no chunking) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 28, 2026
…tep 1)
POST /media/seal/{mediaId} takes an optional processing: { videoStreaming },
overriding the app's setting for that upload. Exposed in MCP (seal_media),
the SDK (seal(mediaId, { processing })) and the CLI (--video-streaming on
upload and seal). Sealing again ignores it. media.sealed gains
video_streaming and processing_overridden.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…captions.ready (pipelines phase 2, step 2) - generateCaptions per app (REST, MCP, SDK, CLI --captions, dashboard Captions card) and in the seal override; settings report captionsAvailable from live transcribe workers. - New transcribe job class, served only when WORKER_CLASSES lists it (WORKER_CONCURRENCY_TRANSCRIBE). jobs_no_worker counts it only while captions are queued; transcribe_queue_lag pages after 6 hours. - captions is a background derivative: it never holds up or changes the media's processing status or error. - New opt-in webhook media.captions.ready, sent when captions settle, only to endpoints that list it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2, step 3) - apps/transcribe: transcribe.py runs faster-whisper (large-v3-turbo int8, Silero VAD) on a 16 kHz WAV and writes timed segments as JSON; download_model.py bakes a pinned model revision into the image; requirements resolved in the image's Python. - codelit/medialit-transcribe: the API image plus Python, the transcriber and the model, running the worker with WORKER_CLASSES=transcribe. Built by the release workflow from the same tag's API image. - Transcriber interface in the API (faster-whisper through runLimited without an address-space limit, and a fake for tests). - Compose: the transcription worker behind the captions profile, in the self-hosting and local files. CI: check-transcriber.sh builds the image with the tiny model and transcribes synthesized speech. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tiny model drops plurals ("caption make video"), so CI checks stems.
The full image measured 4.94 GB on disk; it transcribed 74.5 s of speech
in 64 s on 2 CPUs (3.4 s model load) with a 1.73 GB memory peak.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docker images reported 4.94 GB because the containerd image store counts both the compressed layers and their unpacked copies. Unpacked, it is the API image (1.2 GB) plus the model (1.62 GB) and the Python libraries (0.44 GB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck (pipelines phase 2, step 4) - media.captions in the transcribe class: size check, download, probe, no_audio_stream and duration limits, minutes (kind captions), ffmpeg extraction to 16 kHz WAV, the transcriber, and captions.vtt, transcript.txt and transcript.json under captions/ - Seal plans captions for video (unless audio is known absent) and audio - derivatives.captions gains language and files; params merge on finish - captions.made and captions.failed events, transcriber failed log, captions_volume alert with a daily cooldown - MediaLitVideo adds the captions <track> and forwards a ref - Dashboard file details show captions; medialit get notes them on stderr - Stack worker serves transcribe with TRANSCRIBER=fake; tests and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Testing with two real 10-minute talks: - With condition_on_previous_text off, large-v3-turbo dropped punctuation and capitals for most of one talk (351 of 580 s). Turning it on (the faster-whisper default) brought that to 0, with no repeats on either talk, for about 13% more time. faster-whisper still drops the context when a window falls back to a higher temperature, and cleanSegments removes repeats that get through. - A segment just over one cue left its last word or two in a cue of their own, on screen for under a second. buildCues now keeps the same number of cues and shares the words evenly. Co-Authored-By: Claude Opus 5.5 <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.
Phase 2 of #247 (#259): Whisper transcription with WebVTT captions (#269), including the audio extraction from #266. Design in
docs/prds/pipelines-phase-2.md, implemented in steps on this branch, as phase 1 was.Closes #269. Closes #259.
Progress
large-v3-turboint8 chosen over whisper.cpp)processing: { videoStreaming, generateCaptions }onPOST /media/seal/{mediaId}, MCPseal_media, SDKseal(), CLI--video-streaming/--captions.generateCaptionsper app, andcaptionsAvailable;transcribejob class, served only when listed inWORKER_CLASSES;media.captions.readywebhook.apps/transcribe(the script and a pinned model);codelit/medialit-transcribeimage, built by the release workflow from the same tag's API image;captionsprofile;tinymodel.media.captions: audio extraction, transcription,captions.vtt,transcript.txtandtranscript.json, and processing minutes;derivatives.captions.{url, language, files}in REST, MCP, the SDK and models;<track>andrefforwarding inMediaLitVideo;medialit geton stderr;captions_volumealert.Before captions reach QA or prod
<track>with native HLS on an iPhone (inline and fullscreen).Testing
Each step runs the unit tests, the database-backed tests and the REST, MCP and CLI integration stack. The stack's worker serves
transcribewith the fake transcriber, so the suites check captions on private and public video and on audio uploads, a silent video, and the seal override.Local browser smoke for step 4, with the real
large-v3-turbomodel:<track>, showing the right text at the right time.readyat seal; its captions followed.medialit getprinted the URL on stdout and the captions on stderr.Two real 10-minute talks were then tested locally: one uploaded from the dashboard with HLS, one with
medialit upload. Both were captioned in English at about 1.7× real time with 10 minutes charged. Their bytes matched and the captions showed on screen in sync. Two problems found there are fixed in b6c02fe:condition_on_previous_textis now on; with it, that stretch is 0, with no repeats, for about 13% more time.QA (
pr-297-b6c02feimages, arm64, throughdeploy.sh):medialit login(OAuth in the browser),whoami,settings, an audio upload (readyat seal, captionsqueued, bytes match), andgetwith the captions note on stderr.processing: {generateCaptions: false, videoStreaming: "off"}gave no captions and no HLS, with matching bytes, size and thumbnail. tus PNG in two PATCHes, with HEAD returning the offset, then matching bytes, size and thumbnail.medialit-transcribeis now scaled to 0 on QA. Captions need a node with room (D4).🤖 Generated with Claude Code