Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Yes. MakeMyClip Editor transcribes with whisper.cpp on your machine; install it

### Can Claude add captions or subtitles to a video?

Yes. After transcription, MakeMyClip Editor's `clip timeline captions` (or the UI's Captions button) puts captions timed to the words on a track above the video, and export burns them in. Captions come as short phrases or one word at a time, with your choice of size, color, position, and background. Non-Latin scripts use an installed font that has the glyphs. In the Premiere export, captions become `.srt` files. On Linux, the bundled FFmpeg can't draw text, so set `MAKEMYCLIP_FFMPEG_PATH` to an FFmpeg built with libfreetype and libharfbuzz.
Yes. After transcription, MakeMyClip Editor's `clip timeline captions` (or the UI's Captions button) puts captions timed to the words on a track above the video, and export burns them in. Captions come as short phrases or one word at a time, with your choice of size, color, position, and background. On a vertical canvas they sit above the bottom quarter, clear of the Shorts, Reels and TikTok buttons, and a line is never wider than fits at its font size. Non-Latin scripts use an installed font that has the glyphs. In the Premiere export, captions become `.srt` files. On Linux, the bundled FFmpeg can't draw text, so set `MAKEMYCLIP_FFMPEG_PATH` to an FFmpeg built with libfreetype and libharfbuzz.

### Can it cut Shorts or Reels out of a podcast?

Expand Down
2 changes: 1 addition & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ To read what's said in a clip, run `timeline transcribe <clipId>`: it returns th

To cut by words, use the `index` values from `timeline transcribe`: `timeline cut-words <clipId> <fromIndex> <toIndex>` removes those words (inclusive) and moves later clips on the track up. Add `--transcript <transcriptId>` from the same `timeline transcribe` output so the cut is refused, not misplaced, if the clip was transcribed again since. The transcript also lists `retakes`, phrases said twice in a row; `timeline remove-retakes <clipId>` cuts the earlier take of each (`--dry-run` lists them first). Each is one edit that `timeline undo` reverses. A cut splits the clip, so transcribe the resulting clips again before the next cut, and run `timeline check` afterwards.

To caption speech, run `timeline captions` once the cuts are done: it turns the stored transcripts into text clips on a `captions` track above the video, timed to the words, and export burns them in. With no clip id it captions every transcribed clip and replaces the whole caption track; `timeline captions <clipId>` replaces only the captions over that clip. Captions are short phrases (up to 7 words, broken at pauses and sentence ends); `--words 1` shows one word at a time. Style with `--font <size> --color <color> --anchor <position> --background <color|none>` (default white on a dark box, bottom center). Captions don't move with later cuts, so run it again after one. It's one edit that `timeline undo` reverses, and `timeline frame <sec>` shows a captioned frame. Text outside Latin (Cyrillic, Chinese, Japanese, Korean) is drawn with an installed font that has its glyphs; if none does, export says which characters are missing — install a font (for CJK, Noto Sans CJK) or set `MAKEMYCLIP_FALLBACK_FONT` to a font file. Nothing is downloaded.
To caption speech, run `timeline captions` once the cuts are done: it turns the stored transcripts into text clips on a `captions` track above the video, timed to the words, and export burns them in. With no clip id it captions every transcribed clip and replaces the whole caption track; `timeline captions <clipId>` replaces only the captions over that clip. Captions are short phrases (up to 7 words, broken at pauses and sentence ends); `--words 1` shows one word at a time. Style with `--font <size> --color <color> --anchor <position> --background <color|none>` (default white on a dark box, bottom center). On a vertical (portrait) canvas captions sit above the bottom quarter and keep 14% in from each side, clear of the Shorts, Reels and TikTok overlays; `--margin <px>` sets the distance from the bottom (or top) edge. A line never gets wider than fits at its font size (22 characters at the default size on 1080x1920), so a bigger `--font` makes shorter lines. Captions don't move with later cuts, so run it again after one. It's one edit that `timeline undo` reverses, and `timeline frame <sec>` shows a captioned frame. Text outside Latin (Cyrillic, Chinese, Japanese, Korean) is drawn with an installed font that has its glyphs; if none does, export says which characters are missing — install a font (for CJK, Noto Sans CJK) or set `MAKEMYCLIP_FALLBACK_FONT` to a font file. Nothing is downloaded.

To make a vertical (9:16), square (1:1) or feed (4:5) version, run `timeline reframe 9:16`. It changes the canvas shape, keeping its short side (1920x1080 becomes 1080x1920), and fills it: `--fit cover` (the default) crops what overflows, `--fit contain` shows the whole picture with bars. Look at `timeline frame <sec>` first to see where the speaker is, then pass `--x` (0 shows the left edge of the source, 0.5 the center, 1 the right edge; `--y` likewise, top to bottom) to keep them in frame. `--x` sets every media clip on the timeline now; clips added later start centered. To frame one clip differently, run `timeline framing <clipId> --x 0.3` (also `--scale` 1–4 to punch in, `--fit cover|contain|inherit`, `--reset`). Check with `timeline frame <sec>` after; the `timeline check` contact sheet shows the source frames, not the crop. Captions keep their size, since the short side doesn't change. Each is one edit that `timeline undo` reverses. A reframed cut exports as mp4; the editor-project export refuses it.

Expand Down
3 changes: 0 additions & 3 deletions docs/backlog/caption-safe-zone.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/backlog/caption-width-follows-font-size.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/backlog/caption-width-font-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Caption width from the font's own metrics

Caption lines are fitted by `textWidthEm` in `src/timeline/captions.ts`, an estimate per character class that errs wide for Arial and DejaVu Sans (W and m at 1 em, other capitals 0.8, non-Latin letters 0.95–1.1). A font wider than those, or a glyph outside the classes, can still overflow the safe area. Read the advance widths from the font file the caption is drawn with (`fontFileFor` in `src/ffmpeg/font.ts` already parses its character map) and fit lines by them.
2 changes: 1 addition & 1 deletion llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- **Transcribe locally:** `clip timeline transcribe <clipId>` returns each word with its timeline time, via whisper.cpp on the user's machine; `clip timeline transcribe --sentences` lists a long recording as numbered sentences
- **Edit by transcript:** `clip timeline cut-words <clipId> <fromIndex> <toIndex>` cuts a range of words
- **Remove repeated takes:** `clip timeline remove-retakes <clipId>` cuts the earlier take of each phrase said twice in a row
- **Captions:** `clip timeline captions` burns in captions timed to the words (short phrases or one word at a time)
- **Captions:** `clip timeline captions` burns in captions timed to the words (short phrases or one word at a time); on a vertical canvas they stay clear of the Shorts, Reels and TikTok overlays, and their width follows the font size
- **Reframe:** `clip timeline reframe 9:16` turns a landscape cut vertical (also 1:1, 4:5); `--x` picks the part that shows, `clip timeline framing <clipId>` sets one clip's zoom and position
- **Loudness:** `clip timeline loudness -14` normalizes the exported mp4 to -14 LUFS (or `-16` for podcasts) in two passes
- **Shorts from a long recording:** `clip timeline short best-1 <clipId> <fromIndex> <toIndex>` (MCP: the `make_short` verb) turns a range of transcript words into a 9:16 short on a timeline of its own, captioned and at -14 LUFS, keeping the cuts made on the main timeline; `--timeline <id>` points any command at a short
Expand Down
18 changes: 16 additions & 2 deletions src/cli-timeline.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { appendOp } from './session/store.js';
import { CaptionError, DEFAULT_CAPTION_WORDS, planCaptions } from './timeline/captions.js';
import {
CaptionError,
captionSideMargin,
DEFAULT_CAPTION_WORDS,
planCaptions,
} from './timeline/captions.js';
import { invalidColorMessage, isColor } from './timeline/color.js';
import {
buildFrameAtPlan,
Expand Down Expand Up @@ -90,7 +95,7 @@ Every command works on the main timeline unless --timeline <id> names another
clip timeline transcribe [<clipId>] [--sentences] [--from S] [--to S] [--model <model.bin>] [--language <code>]
clip timeline cut-words <clipId> <fromIndex> <toIndex> [--transcript <id>]
clip timeline remove-retakes <clipId> [--dry-run] [--transcript <id>]
clip timeline captions [<clipId>] [--words N] [--track T] [--font N --color C --anchor A --background C|none] [--dry-run]
clip timeline captions [<clipId>] [--words N] [--track T] [--font N --color C --anchor A --background C|none --margin PX] [--dry-run]
clip timeline reframe <9:16|1:1|4:5|16:9|WxH> [--fit cover|contain] [--x 0..1] [--y 0..1] [--dry-run]
clip timeline framing <clipId> [--fit cover|contain|inherit] [--scale 0.1..4] [--x 0..1] [--y 0..1] [--reset]
clip timeline loudness <-14|-16|LUFS|off>
Expand Down Expand Up @@ -722,6 +727,15 @@ export async function runTimeline(args: string[]): Promise<void> {
style.background = flags.background === 'none' ? null : flags.background;
if (flags.anchor) style.anchor = AnchorSchema.parse(flags.anchor);
const comp = await readComposition(timeline);
const margin = optionalNum('margin', flags.margin);
if (margin !== undefined) {
if (!Number.isInteger(margin) || margin < 0) {
throw new CaptionError(
`--margin must be a whole number of pixels, got "${flags.margin}".`,
);
}
style.margin = { x: captionSideMargin(comp), y: margin };
}
const media = await buildMediaMap();
const plan = await planCaptions(
comp,
Expand Down
2 changes: 1 addition & 1 deletion src/mcp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function buildMcpServer(): McpServer {
{
title: 'Edit the timeline',
description:
'Apply one or more editing verbs to the document as ONE undoable change. Verbs: add_media, add_text, add_color, trim, move, split, remove, remove_silence, cut_words, remove_retakes, caption_speech, reframe, set_framing, set_loudness, transition. remove_silence cuts the pauses out of a media clip (sensitivity 0–1, default 0.5) and moves later clips on its track up; it applies nothing when no pause is found. cut_words cuts words fromIndex..toIndex out of a clip, sending the transcriptId from the timeline_transcript call they came from; remove_retakes cuts the earlier take of each phrase said twice in a row. caption_speech turns stored transcripts into captions on a track above the video (short phrases, or one word at a time with maxWords 1), replacing captions already there; export burns them in. Captions do not move with later cuts, so caption after cutting, or run it again after a cut. reframe changes the output shape (aspect 9:16 for Shorts/Reels/TikTok, 1:1, 4:5, 16:9) and fills it (fit cover, the default, crops; contain shows bars); x/y (0 = left/top, 0.5 = center, 1 = right/bottom) pick the part of every current media clip that shows. set_framing sets the fit, zoom (scale 0.1–4) and position of one media clip. Check the result with timeline_show atSec. set_loudness sets the integrated loudness the mp4 export normalizes to (targetLufs -14 for YouTube/Shorts/Reels/TikTok, -16 for podcasts, null for off). ' +
'Apply one or more editing verbs to the document as ONE undoable change. Verbs: add_media, add_text, add_color, trim, move, split, remove, remove_silence, cut_words, remove_retakes, caption_speech, reframe, set_framing, set_loudness, transition. remove_silence cuts the pauses out of a media clip (sensitivity 0–1, default 0.5) and moves later clips on its track up; it applies nothing when no pause is found. cut_words cuts words fromIndex..toIndex out of a clip, sending the transcriptId from the timeline_transcript call they came from; remove_retakes cuts the earlier take of each phrase said twice in a row. caption_speech turns stored transcripts into captions on a track above the video (short phrases, or one word at a time with maxWords 1), replacing captions already there; export burns them in. Captions do not move with later cuts, so caption after cutting, or run it again after a cut. On a portrait canvas they sit above the bottom quarter and stay narrow enough to keep clear of the Shorts, Reels and TikTok overlays (margin sets the distance from the edge), and their width follows the font size. reframe changes the output shape (aspect 9:16 for Shorts/Reels/TikTok, 1:1, 4:5, 16:9) and fills it (fit cover, the default, crops; contain shows bars); x/y (0 = left/top, 0.5 = center, 1 = right/bottom) pick the part of every current media clip that shows. set_framing sets the fit, zoom (scale 0.1–4) and position of one media clip. Check the result with timeline_show atSec. set_loudness sets the integrated loudness the mp4 export normalizes to (targetLufs -14 for YouTube/Shorts/Reels/TikTok, -16 for podcasts, null for off). ' +
"make_short turns a long recording into a vertical short on a timeline of its own: send it with `timeline` set to a new id such as \"best-1\" (never main). It plays the given word ranges (read the source timeline's sentences with timeline_transcript and no clipId; the source defaults to main) with a little padding, cut from the source's clips so its silence and retake cuts carry in, on a 9:16 canvas filled edge to edge (x picks the part of the frame that shows), normalized to -14 LUFS, with captions. Pick whole sentences (15–60 s in all is typical); the result's warnings name a range that starts or ends mid-sentence. Look at a frame with timeline_show (same timeline, atSec), then adjust with reframe x. Undo on that timeline removes it; replace rebuilds it. Every other verb also takes `timeline`, so a short can be edited like main. " +
'Batch related verbs into a single call. Media paths must be inside the workspace. Returns the updated document summary, including whether it can now render.',
inputSchema: { timeline: timelineInput, verbs: z.array(EditableVerbSchema).min(1) },
Expand Down
Loading
Loading