Repository navigation
Closed
Labels
Description
Summary
inference-gateway/desktop#288 (closes inference-gateway/desktop#279) adds captions to content projects: a captions track kind in <stem>.timeline.json, four style presets shared by the preview and the export, burned-in captions via a generated .ass file plus a sidecar .srt, and captions generation documented in the bundled video-editing skill.
Behavior to document:
- Timeline contract: a track with
"kind": "captions", astylepreset name and an optionalposition(bottomdefault,center,top). Its clips haveid,start,end,textand optionalwords(per-word{ text, start, end }in absolute seconds). One captions track per timeline; caption clips never carrysrcorstatus. Unknown style names fall back to the default preset. - Preset catalogue:
classic(white text on a dark band),bold(large uppercase with a thick outline),highlight(words pop to the accent colour as spoken and stay),karaoke(words fill as spoken, dim ahead of the playhead).highlightandkaraokeneedwords; without it both render the whole line. - Editor: the captions lane sits with the overlay lanes above the video, the preset is a select on the lane header, and
+on the lane inserts a caption at the playhead (starting after any clip the playhead sits in, so captions never overlap). Caption clips are edited in place in the inspector and move, trim and delete like the other kinds. "Speak this" turns a caption into a draft spoken clip with the same text and range for the existing TTS flow; the two tracks are independent afterwards. - Generation: the toolbar's captions button asks the agent; the
video-editingskill takes the text from the spoken clips when the timeline has them, otherwise from the whisper transcript, in chunks of about 5 s and at most ~12 words, breaking at sentence ends and pauses. Word timing for the two word presets comes from a secondwhisper-cli -ml 1pass. - Export: captions are burned in with
subtitles=<stem>.asschained onto the picture, one ASS style per preset,\k/\kfkaraoke tags timed fromwords(a pause before a word gets its own tag). A sidecarexport/<stem>.srtis written for platforms that accept uploaded subtitles. The ffmpeg check now also requires thesubtitlesfilter (libass); a missing one is an error, not a silent skip.
Affected pages:
- Desktop > Content projects > Timeline: add the captions track to the contract section, the preset catalogue and the editor description.
- Desktop > Content projects > Skills: add the captions rules to the video-editing page.
- Desktop > Troubleshooting: "Export fails with no ffmpeg with libass found" (install a full ffmpeg), "Highlight and Karaoke show a plain line" (the clips have no
words).
Source: inference-gateway/desktop#288 (.agents/skills/video-editing/SKILL.md has the reference text).
Acceptance Criteria
- The timeline contract page lists the
captionstrack,style,positionand every clip field above. - The preset catalogue is documented with which presets need
words. - The video-editing skill page covers where caption text comes from and the chunking rules.
- The troubleshooting page covers the libass prerequisite and the missing-
wordsfallback.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Sep 18, 2026
Contract update after review feedback on inference-gateway/desktop#288:
x/y- the centre of the caption block as fractions of the frame, set by dragging the block on the preview. When both are set they win overposition, and the export burns them in as{\an5\pos(X,Y)}instead of the style's alignment and margin. Double-clicking the block clears them back toposition.classica broadcast subtitle on a translucent box,bolda huge uppercase yellow punch line with a thick outline,highlightwhite turning green per word as spoken and staying,karaokedim until spoken then white.edenreich commentedon Sep 19, 2026
@claude Can you review the changes in the actual repo and document the changes?
inference-gateway-maintainer commentedon Sep 19, 2026
Claude finished @edenreich's task in 5m 6s —— View job •
docs/issue-696-20260919-1812• Create PR ➔Captions documented - PR #697
inference-gateway/desktop@maindesktop.mdlint:md), format (format:check), build - all passWhat I found reviewing the desktop repo
The implementation has moved past the issue body. Captions are not burned in with libass or an
.assfile any more:backend/src/timeline.rs- "The burn-in itself is drawn on the canvas with the rest of the frame, so there is no ASS file and no libass any more". The ffmpeg check wantsadelay,amix,apadand thelibx264,aacencoders, and the error is "no ffmpeg that can mix audio and encode H.264 found".frontend/lib/export.ts- the frontend composes every frame on a canvas at exactlyn / fpsand pushes raw RGBA into a waiting ffmpeg, so there is no video filter in the export at all.frontend/lib/render.ts+timeline.ts- one renderer and one preset table for both the preview and the export, so they cannot drift..agents/skills/video-editing/SKILL.md- confirms the same: "Captions no longer need libass - the desktop draws them itself."So I documented what ships rather than the
.asspipeline, and the libass troubleshooting entry became the ffmpeg error users actually see.What went into
desktop.mdcaptionstrack in the sample JSON; thecaptionstrack kind; a field table for trackstyle/position/x,yand clipid,start,end,text,words; one track per timeline, neversrcorstatus.classic,bold,highlight,karaokeas four whole looks, withhighlightandkaraokeneedingwordsand falling back to a plain line without it. Unknown names fall back toclassic.+inserting at the playhead (after any caption the playhead sits in, so they never overlap), in-place text editing, drag to place / double-click to reset, Speak this, and the+ Captionslane button.whisper-cli -ml 1word pass only for the two word presets.export/<stem>.srtsidecar.Two adjacent statements were corrected because captions made them contradictory: the ffmpeg scale/pad/overlay description, and the claim that a VP9
.webmcard keeps its alpha on export (it does not - same renderer as the preview).Remaining drift in that section that I did not touch (
fps, video clipscale/x/y, Fit and Fill,offsettrims, multi-clip video track) is tracked in #698.| Branch
inference-gateway-releaser commentedon Sep 22, 2026
🎉 This issue has been resolved in version 0.9.14 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀