Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(cli): take auto zoom and caption bounds from the editor's own paths

EtienneLescot220e894ad55d
diff --git a/electron/cli/args.test.ts b/electron/cli/args.test.ts
index 2b1f5fb6d..ddf012321 100644
--- a/electron/cli/args.test.ts
+++ b/electron/cli/args.test.ts
@@ -217,6 +217,19 @@ describe("parseCliArgs", () => {
).toMatchObject({ kind: "error" });
});
+ it("bounds caption word counts to what the editor's caption settings allow", () => {
+ expect(parse(["captions", "a.openscreen", "--max-words", "12"])).toMatchObject({
+ maxWordsPerCaption: 12,
+ });
+ expect(parse(["captions", "a.openscreen", "--max-words", "13"])).toMatchObject({
+ kind: "error",
+ message: expect.stringContaining("from 1 to 12"),
+ });
+ expect(parse(["captions", "a.openscreen", "--min-words", "0"])).toMatchObject({
+ kind: "error",
+ });
+ });
+
it("parses info and help", () => {
expect(parse(["info", "demo.openscreen", "--json"])).toMatchObject({
kind: "info",
diff --git a/electron/cli/args.ts b/electron/cli/args.ts
index d0e4ec247..23926da47 100644
--- a/electron/cli/args.ts
+++ b/electron/cli/args.ts
@@ -2,6 +2,10 @@
// unit-tested under plain vitest.
import path from "node:path";
+import {
+ CAPTION_WORDS_PER_LINE_MAX,
+ CAPTION_WORDS_PER_LINE_MIN,
+} from "../../src/lib/ai-edition/captions/wordsPerLine";
import type { CliExportRequest, CliRecordRequest, CliRequest } from "../../src/lib/cliContracts";
export interface CliInfoCommand {
@@ -69,7 +73,7 @@ Usage:
openscreen sources [--json] [-o <file>] List displays, windows and microphones
openscreen pack <project.openscreen> --out <dir> Copy project + media into one portable folder
openscreen captions <project.openscreen> Add auto-captions (on-device Whisper) to a project
- [--min-words <n>] [--max-words <n>]
+ [--min-words <1-12>] [--max-words <1-12>]
openscreen info <project.openscreen> [--json] Inspect a project file
openscreen help Show this help
@@ -430,8 +434,16 @@ function parseCaptions(args: string[], cwd: string): CliCommand {
if (arg === "--min-words" || arg === "--max-words") {
const [value, next] = takeValue(args, i, arg);
const count = Number(value);
- if (!Number.isInteger(count) || count < 1) {
- throw new Error(`${arg} must be a positive integer, got "${value}"`);
+ // The editor's caption settings clamp to the same range, so a larger value would
+ // write a project the editor then shows differently.
+ if (
+ !Number.isInteger(count) ||
+ count < CAPTION_WORDS_PER_LINE_MIN ||
+ count > CAPTION_WORDS_PER_LINE_MAX
+ ) {
+ throw new Error(
+ `${arg} must be an integer from ${CAPTION_WORDS_PER_LINE_MIN} to ${CAPTION_WORDS_PER_LINE_MAX}, got "${value}"`,
+ );
}
if (arg === "--min-words") minWordsPerCaption = count;
else maxWordsPerCaption = count;
diff --git a/src/cli/CliExportRunner.tsx b/src/cli/CliExportRunner.tsx
index 8edbfe2ae..de080359e 100644
--- a/src/cli/CliExportRunner.tsx
+++ b/src/cli/CliExportRunner.tsx
@@ -13,7 +13,6 @@ import {
toFileUrl,
validateProjectData,
} from "@/components/video-editor/projectPersistence";
-import type { CursorTelemetryPoint } from "@/components/video-editor/types";
import { migrateProjectDataToAxcutDocument } from "@/lib/ai-edition/document/migrate";
import {
collectEffectiveClipDims,
@@ -23,10 +22,12 @@ import {
import { applyProbedDuration } from "@/lib/ai-edition/document/timeline";
import { type AxcutDocument, isAxcutDocumentFile } from "@/lib/ai-edition/schema";
import { getEditorSettings } from "@/lib/ai-edition/store/editorSettings";
+import {
+ appendAutoZoomSuggestions,
+ collectAutoZoomSuggestionsForDocument,
+} from "@/lib/ai-edition/timeline/apply-auto-zooms";
import { assetCameraSource } from "@/lib/ai-edition/timeline/camera";
import { resolveClipSourceEndSec } from "@/lib/ai-edition/timeline/clipDuration";
-import { DEFAULT_ZOOM_DEPTH, ZOOM_DEPTH_SCALES } from "@/lib/ai-edition/timeline/zoom-scale";
-import { buildAutoZoomSuggestions } from "@/lib/ai-edition/timeline/zoom-suggestions";
import type { CliDoneResult, CliExportRequest } from "@/lib/cliContracts";
import { GIF_SIZE_PRESETS, type GifSizePreset } from "@/lib/exporter";
import { calculateMp4ExportSettings } from "@/lib/exporter/mp4ExportSettings";
@@ -36,7 +37,6 @@ import { exportGifNative, exportMultiNative, nativeBridgeClient } from "@/native
import type { CompositorClipInput } from "@/native/contracts";
import { buildSceneDescription, resolveVisibleClips } from "@/native/sceneDescription";
import { type ExportProject, loadDocumentProject } from "./exportProject";
-import { clampZoomFocus } from "./vendor/zoomHelpers";
const MP4_EXPORT_FPS = 60;
@@ -116,33 +116,6 @@ function gifOutputDims(
return { width: even(tierDims.width), height: even(tierDims.height) };
}
-function appendAutoZoomRanges(
- axcutDocument: AxcutDocument,
- cursorTelemetry: CursorTelemetryPoint[],
- totalMs: number,
-): number {
- const suggestions = buildAutoZoomSuggestions({
- cursorTelemetry,
- totalMs,
- existingRegions: axcutDocument.zoomRanges,
- defaultDurationMs: Math.max(1000, Math.round(totalMs * 0.05)),
- });
- let nextId = 1;
- for (const suggestion of suggestions) {
- axcutDocument.zoomRanges.push({
- id: `cli-auto-zoom-${nextId++}`,
- startMs: Math.round(suggestion.span.start),
- endMs: Math.round(suggestion.span.end),
- depth: DEFAULT_ZOOM_DEPTH,
- customScale: ZOOM_DEPTH_SCALES[DEFAULT_ZOOM_DEPTH],
- focus: clampZoomFocus(suggestion.focus),
- focusMode: "auto",
- source: "auto",
- });
- }
- return suggestions.length;
-}
-
/**
* A legacy v2 project (`{ version, media, editor }`), as written before the editor saved the
* document itself: migrated to an AxcutDocument, with what the migration cannot know probed.
@@ -237,7 +210,6 @@ async function loadLegacyProject(project: EditorProjectData): Promise<ExportProj
};
}
}
-
return {
document: axcutDocument,
editor,
@@ -262,7 +234,8 @@ async function runExport(request: CliExportRequest): Promise<CliDoneResult> {
} else {
throw new Error("Project file is not a valid .openscreen project");
}
- const { editor, document: axcutDocument } = project;
+ const { editor } = project;
+ let axcutDocument = project.document;
const format = request.format ?? editor.exportFormat;
if (request.audioPath && format === "gif") {
@@ -275,20 +248,17 @@ async function runExport(request: CliExportRequest): Promise<CliDoneResult> {
const gifSizePreset = request.gifSizePreset ?? editor.gifSizePreset;
const outPath =
request.outPath ?? replaceExtension(request.projectPath, format === "gif" ? ".gif" : ".mp4");
- // Cursor telemetry: only needed to compute --auto-zoom suggestions. The
- // native compositor discovers the `<video>.cursor.json` sidecar itself.
- let cursorTelemetry: CursorTelemetryPoint[] = [];
+ // Use the same per-clip auto-zoom suggestions as the editor, including its default span and
+ // anchoring behavior.
if (request.autoZoom) {
- try {
- cursorTelemetry = await nativeBridgeClient.cursor.getTelemetry(project.screenVideoPath);
- } catch {
- cursorTelemetry = [];
- }
- }
-
- if (request.autoZoom) {
- const added = appendAutoZoomRanges(axcutDocument, cursorTelemetry, project.durationMs);
- window.electronAPI.cliLog("info", `Auto-zoom: added ${added} region(s) from cursor telemetry`);
+ const suggestions = await collectAutoZoomSuggestionsForDocument(axcutDocument, (videoPath) =>
+ nativeBridgeClient.cursor.getTelemetry(videoPath).catch(() => []),
+ );
+ axcutDocument = appendAutoZoomSuggestions(axcutDocument, suggestions);
+ window.electronAPI.cliLog(
+ "info",
+ `Auto-zoom: added ${suggestions.length} region(s) from cursor telemetry`,
+ );
}
// Output sizing mirrors the ExportDialog: crop-aware smallest clip on the
diff --git a/src/cli/captionAnnotations.test.ts b/src/cli/captionAnnotations.test.ts
index 34cee80d9..e42ca60f2 100644
--- a/src/cli/captionAnnotations.test.ts
+++ b/src/cli/captionAnnotations.test.ts
@@ -1,4 +1,5 @@
import { describe, expect, it } from "vitest";
+import { DEFAULT_CAPTION_SETTINGS } from "@/lib/ai-edition/captions/settings";
import type { CaptionSegment } from "@/lib/captioning/transcribe";
import { captionSegmentsToAnnotationRegions } from "./captionAnnotations";
@@ -32,4 +33,18 @@ describe("captionSegmentsToAnnotationRegions", () => {
expect(regions.map((r) => r.content)).toEqual(["hello there", "second line"]);
});
+
+ it("looks like the editor's captions, not a faint annotation", () => {
+ const [region] = captionSegmentsToAnnotationRegions(words("one", "two"), 1, 1);
+ expect(region.style).toMatchObject({
+ fontSize: DEFAULT_CAPTION_SETTINGS.fontSize,
+ fontWeight: DEFAULT_CAPTION_SETTINGS.fontWeight,
+ color: DEFAULT_CAPTION_SETTINGS.color,
+ backgroundColor: "rgba(0, 0, 0, 0.55)",
+ });
+ // Inside the 16:9 safe column, bottom edge 1.5% off the frame's.
+ expect(region.position.x).toBe(16);
+ expect(region.size.width).toBe(68);
+ expect(region.position.y + region.size.height).toBeCloseTo(98.5);
+ });
});
diff --git a/src/cli/captionAnnotations.ts b/src/cli/captionAnnotations.ts
index 890f54b2b..66875c7d7 100644
--- a/src/cli/captionAnnotations.ts
+++ b/src/cli/captionAnnotations.ts
@@ -4,6 +4,12 @@
// from the live captioning module so the CLI can't drift from the editor.
import type { AnnotationRegion, AnnotationTextStyle } from "@/components/video-editor/types";
+import {
+ captionBackgroundCss,
+ captionSafeColumn,
+ DEFAULT_CAPTION_SETTINGS,
+ defaultCaptionInsetY,
+} from "@/lib/ai-edition/captions/settings";
import {
type CaptionSegmentLayoutOptions,
dedupeAdjacentCaptionRepeats,
@@ -13,24 +19,28 @@ import {
} from "@/lib/captioning/annotationsFromCaptions";
import type { CaptionSegment } from "@/lib/captioning/transcribe";
-/** Wide lower-third bar; `position.x` is top-left as % of container, so center with (100 - width) / 2. */
-const CAPTION_WIDTH = 92;
+// The look and place of the editor's own captions (`DEFAULT_CAPTION_SETTINGS`): bold 48 px
+// white on a 55% black plate, in the landscape safe column, just off the bottom edge. The CLI
+// used to write 24 px regular text on no plate, which read as faint over any bright frame.
+// `.openscreen` projects carry no transcript, so the CLI cannot write the editor's transcript-
+// driven captions; matching their appearance is what keeps the two from looking different.
+const LANDSCAPE = 16 / 9;
const CAPTION_HEIGHT = 12;
-const CAPTION_BOTTOM_MARGIN = 2;
+const CAPTION_COLUMN = captionSafeColumn(LANDSCAPE);
const CAPTION_POSITION = {
- x: (100 - CAPTION_WIDTH) / 2,
- y: 100 - CAPTION_HEIGHT - CAPTION_BOTTOM_MARGIN,
+ x: CAPTION_COLUMN.x,
+ y: 100 - CAPTION_HEIGHT - defaultCaptionInsetY(LANDSCAPE),
};
-const CAPTION_SIZE = { width: CAPTION_WIDTH, height: CAPTION_HEIGHT };
+const CAPTION_SIZE = { width: CAPTION_COLUMN.width, height: CAPTION_HEIGHT };
const CAPTION_STYLE: AnnotationTextStyle = {
- color: "#ffffff",
- backgroundColor: "rgba(255, 255, 255, 0)",
- fontSize: 24,
- fontFamily: "Inter",
- fontWeight: "normal",
+ color: DEFAULT_CAPTION_SETTINGS.color,
+ backgroundColor: captionBackgroundCss(DEFAULT_CAPTION_SETTINGS),
+ fontSize: DEFAULT_CAPTION_SETTINGS.fontSize,
+ fontFamily: DEFAULT_CAPTION_SETTINGS.fontFamily,
+ fontWeight: DEFAULT_CAPTION_SETTINGS.fontWeight,
fontStyle: "normal",
textDecoration: "none",
textAlign: "center",
@@ -44,8 +54,8 @@ export function captionSegmentsToAnnotationRegions(
): AnnotationRegion[] {
// Don't echo-collapse raw word tokens before grouping: repeated words ("I … I") share a
// normalized key and would merge spans while keeping only the first token's text.
- const minW = layout?.minWordsPerCaption ?? 2;
- const maxW = layout?.maxWordsPerCaption ?? 7;
+ const minW = layout?.minWordsPerCaption ?? DEFAULT_CAPTION_SETTINGS.minWordsPerLine;
+ const maxW = layout?.maxWordsPerCaption ?? DEFAULT_CAPTION_SETTINGS.maxWordsPerLine;
const granularity = layout?.timestampGranularity ?? "word";
const grouped =
diff --git a/src/cli/vendor/zoomHelpers.ts b/src/cli/vendor/zoomHelpers.ts
deleted file mode 100644
index e2fc32a4a..000000000
--- a/src/cli/vendor/zoomHelpers.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// Vendored for the CLI: clampFocusToDepth was deleted from
-// @/components/video-editor/types in the 1.8 line with no successor. It is a
-// tiny pure predicate the CLI export runner still needs.
-
-export interface ZoomFocusPoint {
- cx: number;
- cy: number;
-}
-
-function clamp(value: number, min: number, max: number): number {
- if (Number.isNaN(value)) return (min + max) / 2;
- return Math.min(max, Math.max(min, value));
-}
-
-export function clampZoomFocus(focus: ZoomFocusPoint): ZoomFocusPoint {
- return { cx: clamp(focus.cx, 0, 1), cy: clamp(focus.cy, 0, 1) };
-}
diff --git a/src/components/ai-edition/CaptionsPane.tsx b/src/components/ai-edition/CaptionsPane.tsx
index 574aa25db..2111d696b 100644
--- a/src/components/ai-edition/CaptionsPane.tsx
+++ b/src/components/ai-edition/CaptionsPane.tsx
@@ -19,6 +19,10 @@ import {
DEFAULT_CAPTION_SETTINGS,
untranslatedUnits,
} from "@/lib/ai-edition/captions";
+import {
+ CAPTION_WORDS_PER_LINE_MAX,
+ CAPTION_WORDS_PER_LINE_MIN,
+} from "@/lib/ai-edition/captions/wordsPerLine";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import {
useAssetTranscriptions,
@@ -630,7 +634,10 @@ export function CaptionsPane({ onClose }: { onClose?: () => void } = {}) {
);
}
-const WORD_COUNTS = Array.from({ length: 12 }, (_, i) => i + 1);
+const WORD_COUNTS = Array.from(
+ { length: CAPTION_WORDS_PER_LINE_MAX - CAPTION_WORDS_PER_LINE_MIN + 1 },
+ (_, i) => i + CAPTION_WORDS_PER_LINE_MIN,
+);
const selectStyle: React.CSSProperties = {
height: 32,
diff --git a/src/lib/ai-edition/captions/settings.ts b/src/lib/ai-edition/captions/settings.ts
index 8f5fae3a2..1f289ffe6 100644
--- a/src/lib/ai-edition/captions/settings.ts
+++ b/src/lib/ai-edition/captions/settings.ts
@@ -12,6 +12,7 @@
import { clamp } from "@/utils/math";
import type { AxcutDocument } from "../schema";
import { type TranscriptLane, voiceoverPlacements } from "../timeline/aggregated-transcript";
+import { CAPTION_WORDS_PER_LINE_MAX, CAPTION_WORDS_PER_LINE_MIN } from "./wordsPerLine";
/**
* Which frame edge the caption block is pinned to. The block grows AWAY from it:
@@ -434,8 +435,22 @@ export function getCaptionSettings(
const defaultInsetY = defaultCaptionInsetY(aspectValue);
if (!raw) return { ...d, insetY: defaultInsetY, insetX: defaultCaptionInsetX(aspectValue) };
- const minWords = Math.round(readNumber(raw.minWordsPerLine, d.minWordsPerLine, 1, 12));
- const maxWords = Math.round(readNumber(raw.maxWordsPerLine, d.maxWordsPerLine, 1, 12));
+ const minWords = Math.round(
+ readNumber(
+ raw.minWordsPerLine,
+ d.minWordsPerLine,
+ CAPTION_WORDS_PER_LINE_MIN,
+ CAPTION_WORDS_PER_LINE_MAX,
+ ),
+ );
+ const maxWords = Math.round(
+ readNumber(
+ raw.maxWordsPerLine,
+ d.maxWordsPerLine,
+ CAPTION_WORDS_PER_LINE_MIN,
+ CAPTION_WORDS_PER_LINE_MAX,
+ ),
+ );
const fontSize = readNumber(raw.fontSize, d.fontSize, 12, 200);
const backgroundEnabled = readBoolean(raw.backgroundEnabled, d.backgroundEnabled);
diff --git a/src/lib/ai-edition/captions/wordsPerLine.ts b/src/lib/ai-edition/captions/wordsPerLine.ts
new file mode 100644
index 000000000..b8f5e0847
--- /dev/null
+++ b/src/lib/ai-edition/captions/wordsPerLine.ts
@@ -0,0 +1,6 @@
+// Bounds on how many words one caption shows at once. The editor's caption settings and the
+// CLI's `--min-words` / `--max-words` both read them, so a CLI run cannot ask for a line the
+// editor would refuse. Dependency-free on purpose: the Electron main process imports it.
+
+export const CAPTION_WORDS_PER_LINE_MIN = 1;
+export const CAPTION_WORDS_PER_LINE_MAX = 12;
diff --git a/website/docs/cli.md b/website/docs/cli.md
index 7a50881a4..e75723933 100644
--- a/website/docs/cli.md
+++ b/website/docs/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` and `--max-words` set the words per caption. Defaults: 2 and 7.
+- `--min-words` and `--max-words` set the words per caption. Each takes 1 to 12, the range the editor offers. Defaults: 2 and 7.
- Running it again replaces the captions it added before. Annotations you added yourself are kept.
- The project's screen video must have an audio track, for example from `record --mic`.
- Captions are burned into the export. There is no subtitle file output. See [Captions](./captions.md).
diff --git a/website/i18n/de/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/de/docusaurus-plugin-content-docs/current/cli.md
index d09be2438..19514c828 100644
--- a/website/i18n/de/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/de/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` und `--max-words` legen die Wörter pro Untertitel fest. Standard: 2 und 7.
+- `--min-words` und `--max-words` legen die Wörter pro Untertitel fest. Erlaubt sind jeweils 1 bis 12, wie im Editor. Standard: 2 und 7.
- Ein erneuter Lauf ersetzt die Untertitel, die der Befehl vorher hinzugefügt hat. Annotationen, die du selbst hinzugefügt hast, bleiben erhalten.
- Das Bildschirmvideo des Projekts muss eine Audiospur haben, zum Beispiel aus `record --mic`.
- Untertitel werden in den Export eingebrannt. Eine Ausgabe als Untertiteldatei gibt es nicht. Siehe [Untertitel](./captions.md).
diff --git a/website/i18n/es/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/es/docusaurus-plugin-content-docs/current/cli.md
index 6fb693673..06910000c 100644
--- a/website/i18n/es/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/es/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` y `--max-words` definen las palabras por subtítulo. Valores predeterminados: 2 y 7.
+- `--min-words` y `--max-words` definen las palabras por subtítulo. Cada uno admite de 1 a 12, el rango del editor. Valores predeterminados: 2 y 7.
- Volver a ejecutarlo reemplaza los subtítulos que agregó antes. Las anotaciones que agregaste tú se conservan.
- El video de pantalla del proyecto debe tener una pista de audio, por ejemplo de `record --mic`.
- Los subtítulos se incrustan en la exportación. No se genera ningún archivo de subtítulos. Consulta [Subtítulos](./captions.md).
diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/fr/docusaurus-plugin-content-docs/current/cli.md
index e31a45aae..769b36cb6 100644
--- a/website/i18n/fr/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/fr/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` et `--max-words` fixent le nombre de mots par sous-titre. Par défaut : 2 et 7.
+- `--min-words` et `--max-words` fixent le nombre de mots par sous-titre. Chacun accepte de 1 à 12, la plage de l’éditeur. Par défaut : 2 et 7.
- La relancer remplace les sous-titres qu'elle avait ajoutés. Les annotations que vous avez ajoutées vous-même sont conservées.
- La vidéo d'écran du projet doit avoir une piste audio, par exemple issue de `record --mic`.
- Les sous-titres sont incrustés dans l'export. Aucun fichier de sous-titres n'est produit. Voir [Sous-titres et transcription](./captions.md).
diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/ja/docusaurus-plugin-content-docs/current/cli.md
index 34f060709..0ccb205ff 100644
--- a/website/i18n/ja/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/ja/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` と `--max-words` で、字幕 1 つあたりの単語数を設定します。既定値は 2 と 7 です。
+- `--min-words` と `--max-words` で、字幕 1 つあたりの単語数を設定します。どちらもエディターと同じ 1〜12 を指定できます。既定値は 2 と 7 です。
- もう一度実行すると、以前に追加した字幕が置き換えられます。自分で追加した注釈は保持されます。
- プロジェクトの画面動画には、音声トラックが必要です(たとえば `record --mic` で録音したもの)。
- 字幕はエクスポートに焼き込まれます。字幕ファイルは出力されません。[字幕と文字起こし](./captions.md)を参照してください。
diff --git a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/cli.md
index 6612753b6..401f7f615 100644
--- a/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` e `--max-words` definem a quantidade de palavras por legenda. Padrões: 2 e 7.
+- `--min-words` e `--max-words` definem a quantidade de palavras por legenda. Cada um aceita de 1 a 12, o intervalo do editor. Padrões: 2 e 7.
- Rodar o comando de novo substitui as legendas que ele adicionou antes. As anotações que você mesmo adicionou são mantidas.
- O vídeo de tela do projeto precisa ter uma faixa de áudio, por exemplo de `record --mic`.
- As legendas são embutidas na exportação. Não há saída em arquivo de legenda. Veja [Legendas](./captions.md).
diff --git a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/cli.md
index 0c723479e..7381aaaaa 100644
--- a/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/zh-CN/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` 和 `--max-words` 设置每条字幕的词数。默认值分别为 2 和 7。
+- `--min-words` 和 `--max-words` 设置每条字幕的词数。取值范围均为 1 到 12,与编辑器一致。默认值分别为 2 和 7。
- 再次运行会替换它之前添加的字幕。你自己添加的标注会保留。
- 项目的屏幕视频必须带有音轨,例如由 `record --mic` 录制的视频。
- 字幕会烧录进导出的视频中,不会输出字幕文件。请参阅[字幕](./captions.md)。
diff --git a/website/i18n/zh-TW/docusaurus-plugin-content-docs/current/cli.md b/website/i18n/zh-TW/docusaurus-plugin-content-docs/current/cli.md
index 944b32819..d284fa4a9 100644
--- a/website/i18n/zh-TW/docusaurus-plugin-content-docs/current/cli.md
+++ b/website/i18n/zh-TW/docusaurus-plugin-content-docs/current/cli.md
@@ -158,7 +158,7 @@ openscreen captions demo.openscreen --min-words 2 --max-words 7
openscreen export demo.openscreen -o demo.mp4 # captions are burned into the video
```
-- `--min-words` 與 `--max-words` 設定每則字幕的字數。預設值:2 與 7。
+- `--min-words` 與 `--max-words` 設定每則字幕的字數。兩者皆可設為 1 到 12,與編輯器相同。預設值:2 與 7。
- 再次執行會取代它先前加入的字幕。你自己加入的標註會保留。
- 專案的螢幕影片必須有音軌,例如用 `record --mic` 錄製的影片。
- 字幕會燒錄進匯出的影片,不會輸出字幕檔。請參閱[字幕](./captions.md)。