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
22 changes: 16 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to capcut-cli are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.38.0] - 2026-11-27

### Added
- Match synthesized dub clip peaks with explicit `--normalize-peak`, bounded boosts and per-clip gain reports; meter played prefixes before saving and keep dry-run free of TTS/assets. ([pyvideotrans#1251](https://github.com/jianchang512/pyvideotrans/issues/1251))
- Render selected timeline intervals with `--start`/`--end` on an in-memory draft copy, rebasing video, audio and captions without changing source files. ([Concat#848](https://github.com/jub0t/Concat/issues/848))
- `remove --ripple --ripple-captions` trims/drops intersecting caption timing and shifts later content while retaining crossing-media and animated-caption safeguards. ([lossless-cut #3209](https://github.com/mifi/lossless-cut/issues/3209)).
- `lint --fix` wraps existing Thai, Lao, Khmer and Myanmar lines at Unicode boundaries while moving editable style ranges with inserted newlines and preserving cue timing. ([OpenCut #924](https://github.com/OpenCut-app/OpenCut/issues/924)).
- Thai, Lao, Khmer and Myanmar captions join without inserted token spaces and split long aligner tokens at Unicode boundaries; estimated internal timings and unresolved caps are reported explicitly. ([OpenCut #924](https://github.com/OpenCut-app/OpenCut/issues/924)).
- WebM proxy outputs select VP9/Opus/WebVTT, refuse incompatible video encoders, and check required encoder availability before rendering; MP4 defaults stay unchanged. ([lossless-cut #3230](https://github.com/mifi/lossless-cut/issues/3230)).
- Proxy fidelity reports known HDR/wide-gamut source metadata and refuses it with `render --strict`; source-color evidence stays explicit when unavailable. ([Concat #858](https://github.com/jub0t/Concat/issues/858)).
- SRT/WebVTT imports map inline bold, italic, underline, and font-color tags to editable ranges across import, quickstart, and compile; escaped tags stay literal, and keyword emphasis preserves inline styling. ([OpenCut #925](https://github.com/OpenCut-app/OpenCut/issues/925), [pyvideotrans #1341](https://github.com/jianchang512/pyvideotrans/issues/1341)).
- Subtitle input honors UTF-16LE/BE byte-order marks, and `import-srt`, `import-ass`, `quickstart`, `detect-retakes` and `dub` accept `--encoding` for an explicitly chosen code page. Strict UTF-8 remains the default for files without a BOM; malformed text and NUL characters are refused before a draft is written ([OpenCut#925](https://github.com/OpenCut-app/OpenCut/issues/925), [subtitleedit#16978](https://github.com/SubtitleEdit/subtitleedit/issues/16978)).
- `README.ja.md`, a Japanese translation of the README, linked from the language selector in all three READMEs and shipped in the npm package.

## [0.37.1] - 2026-11-23

### Fixed
Expand Down Expand Up @@ -39,12 +55,6 @@ All notable changes to capcut-cli are documented here. The format follows [Keep
- Portable macOS downloads for Apple Silicon and Intel, with a bundled Node runtime, license and SHA-256 checksum. Both CLI names run without Node or npm on PATH.
- Native macOS archive checks before release publication, including relocated paths, bundled-template compilation and runtime-target validation.

## [Unreleased]

### Added

- `README.ja.md`, a Japanese translation of the README, linked from the language selector in all three READMEs and shipped in the npm package.

## [0.34.0] — 2026-11-14

### Added
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ npm install -g capcut-cli

### Portable downloads without installing Node or npm

Download `capcut-cli-v0.37.1-linux-x64.tar.gz` and its `.sha256` file from the [release assets](https://github.com/renezander030/capcut-cli/releases). Verify and extract them together:
Download `capcut-cli-v0.38.0-linux-x64.tar.gz` and its `.sha256` file from the [release assets](https://github.com/renezander030/capcut-cli/releases). Verify and extract them together:

```sh
sha256sum -c capcut-cli-v0.37.1-linux-x64.tar.gz.sha256
tar -xzf capcut-cli-v0.37.1-linux-x64.tar.gz
./capcut-cli-v0.37.1-linux-x64/capcut --version
./capcut-cli-v0.37.1-linux-x64/capcut describe --compact
sha256sum -c capcut-cli-v0.38.0-linux-x64.tar.gz.sha256
tar -xzf capcut-cli-v0.38.0-linux-x64.tar.gz
./capcut-cli-v0.38.0-linux-x64/capcut --version
./capcut-cli-v0.38.0-linux-x64/capcut describe --compact
```

On Linux arm64 (aarch64), choose `capcut-cli-v0.37.1-linux-arm64.tar.gz` and its matching `.sha256` file, then use the same verification and extraction commands with that filename. Use the archive matching the machine architecture; these archives bundle Node, not ffmpeg or the desktop editor.
On Linux arm64 (aarch64), choose `capcut-cli-v0.38.0-linux-arm64.tar.gz` and its matching `.sha256` file, then use the same verification and extraction commands with that filename. Use the archive matching the machine architecture; these archives bundle Node, not ffmpeg or the desktop editor.

Keep the whole extracted directory together; it includes the Node runtime and its license. Both `capcut` and `capcut-cli` launchers work after moving the directory. Linux archives target x64 or arm64 with glibc (not Alpine/musl); optional FFmpeg/Whisper tools remain separate. This is a portable directory, not a single-file executable.

Expand All @@ -52,18 +52,18 @@ You can add the extracted directory to `PATH` or create symbolic links to `capcu
On macOS, choose `darwin-arm64` for Apple Silicon or `darwin-x64` for Intel. Download the matching archive and checksum from the same release, then verify and extract them (Apple Silicon example):

```sh
shasum -a 256 -c capcut-cli-v0.37.1-darwin-arm64.tar.gz.sha256
tar -xzf capcut-cli-v0.37.1-darwin-arm64.tar.gz
./capcut-cli-v0.37.1-darwin-arm64/capcut --version
shasum -a 256 -c capcut-cli-v0.38.0-darwin-arm64.tar.gz.sha256
tar -xzf capcut-cli-v0.38.0-darwin-arm64.tar.gz
./capcut-cli-v0.38.0-darwin-arm64/capcut --version
```

On Windows x64 (from release 0.37.1 on), download `capcut-cli-v0.37.1-win-x64.zip` and its `.sha256` file. In PowerShell, compare the hash with the one in the `.sha256` file, extract, and run the `capcut.cmd` launcher:
On Windows x64 (from release 0.37.1 on), download `capcut-cli-v0.38.0-win-x64.zip` and its `.sha256` file. In PowerShell, compare the hash with the one in the `.sha256` file, extract, and run the `capcut.cmd` launcher:

```powershell
(Get-FileHash capcut-cli-v0.37.1-win-x64.zip -Algorithm SHA256).Hash.ToLower()
Get-Content capcut-cli-v0.37.1-win-x64.zip.sha256
Expand-Archive capcut-cli-v0.37.1-win-x64.zip -DestinationPath .
.\capcut-cli-v0.37.1-win-x64\capcut.cmd --version
(Get-FileHash capcut-cli-v0.38.0-win-x64.zip -Algorithm SHA256).Hash.ToLower()
Get-Content capcut-cli-v0.38.0-win-x64.zip.sha256
Expand-Archive capcut-cli-v0.38.0-win-x64.zip -DestinationPath .
.\capcut-cli-v0.38.0-win-x64\capcut.cmd --version
```

The folder holds the official Node runtime (`runtime\node.exe` and its license); `capcut.cmd` and `capcut-cli.cmd` work from any location, also with spaces in the path, and you can add the folder to `PATH`. Arguments pass through `cmd.exe`, so quote values containing `&`, `|`, `<`, `>` or `^`. Every release builds this archive on a Windows runner and runs it there before publishing.
Expand Down
111 changes: 106 additions & 5 deletions docs/command-reference.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "capcut-cli",
"version": "0.37.1",
"version": "0.38.0",
"schema_version": 2,
"description": "Edit CapCut/JianYing draft_content.json directly. JSON in, JSON out.",
"global_flags": [
Expand Down Expand Up @@ -1575,6 +1575,35 @@
}
],
"options": [
{
"name": "normalize_peak",
"flags": [
"--normalize-peak"
],
"type": "number",
"required": false,
"description": "Normalize each synthesized clip to a true-peak dBFS target (-60 to 0); measures its played prefix with FFmpeg before saving. Use without a separate volume adjustment."
},
{
"name": "max_gain_db",
"flags": [
"--max-gain-db"
],
"type": "number",
"required": false,
"description": "Largest normalization boost in dB; clamped clips report the estimated level actually reached.",
"default": 20
},
{
"name": "ffmpeg_cmd",
"flags": [
"--ffmpeg-cmd"
],
"type": "string",
"required": false,
"description": "FFmpeg executable for peak normalization.",
"default": "ffmpeg"
},
{
"name": "tts_cmd",
"flags": [
Expand Down Expand Up @@ -1622,6 +1651,15 @@
"description": "Audio track for the clips.",
"default": "dub"
},
{
"name": "encoding",
"flags": [
"--encoding"
],
"type": "string",
"required": false,
"description": "Subtitle text encoding (for example windows-1252 or shift_jis). UTF BOMs are detected automatically; without a BOM or this option, strict UTF-8 is required."
},
{
"name": "ffprobe_cmd",
"flags": [
Expand Down Expand Up @@ -1849,7 +1887,7 @@
{
"name": "remove",
"summary": "Remove a segment, its emptied track, and the materials that orphans.",
"usage": "capcut remove <project> <segment-id> [--keep-track] [--keep-materials] [--ripple]",
"usage": "capcut remove <project> <segment-id> [--keep-track] [--keep-materials] [--ripple] [--ripple-captions]",
"positionals": [
{
"name": "project",
Expand All @@ -1863,6 +1901,15 @@
}
],
"options": [
{
"name": "ripple_captions",
"flags": [
"--ripple-captions"
],
"type": "boolean",
"required": false,
"description": "With --ripple, trim/drop intersecting static caption timing; crossing media remains refused and retained text is unchanged."
},
{
"name": "keep_track",
"flags": [
Expand All @@ -1888,7 +1935,7 @@
],
"type": "boolean",
"required": false,
"description": "Close the removed time span across every track; refuses crossing segments."
"description": "Close the removed time span across every track; refuses crossing segments unless caption adjustment is selected."
},
{
"name": "active_timeline",
Expand Down Expand Up @@ -3805,6 +3852,15 @@
}
],
"options": [
{
"name": "encoding",
"flags": [
"--encoding"
],
"type": "string",
"required": false,
"description": "Subtitle text encoding (for example windows-1252 or shift_jis). UTF BOMs are detected automatically; without a BOM or this option, strict UTF-8 is required."
},
{
"name": "track_name",
"flags": [
Expand Down Expand Up @@ -4157,6 +4213,15 @@
}
],
"options": [
{
"name": "encoding",
"flags": [
"--encoding"
],
"type": "string",
"required": false,
"description": "Subtitle text encoding (for example windows-1252 or shift_jis). UTF BOMs are detected automatically; without a BOM or this option, strict UTF-8 is required."
},
{
"name": "track_name",
"flags": [
Expand Down Expand Up @@ -6495,6 +6560,15 @@
}
],
"options": [
{
"name": "encoding",
"flags": [
"--encoding"
],
"type": "string",
"required": false,
"description": "Subtitle text encoding (for example windows-1252 or shift_jis). UTF BOMs are detected automatically; without a BOM or this option, strict UTF-8 is required."
},
{
"name": "video",
"flags": [
Expand Down Expand Up @@ -6729,6 +6803,24 @@
}
],
"options": [
{
"name": "start",
"flags": [
"--start"
],
"type": "string",
"required": false,
"description": "Start of the preview range (time format; default 0). The source draft is unchanged."
},
{
"name": "end",
"flags": [
"--end"
],
"type": "string",
"required": false,
"description": "End of the preview range (time format; default timeline end). Requires start < end within the timeline."
},
{
"name": "out",
"flags": [
Expand Down Expand Up @@ -6773,7 +6865,7 @@
],
"type": "string",
"required": false,
"description": "Video encoder for the proxy (-c:v; default libx264). Hardware encoders like h264_videotoolbox/h264_nvenc/h264_qsv work when the build carries them; validated against `ffmpeg -encoders` before rendering."
"description": "Video encoder for the proxy (-c:v; default libvpx-vp9 for WebM, libx264 otherwise). Hardware encoders like h264_videotoolbox/h264_nvenc/h264_qsv work when the build carries them; validated against `ffmpeg -encoders` before rendering."
},
{
"name": "crf",
Expand Down Expand Up @@ -6833,7 +6925,7 @@
],
"type": "boolean",
"required": false,
"description": "Mux the text-track cues as a toggleable mov_text subtitle stream (the SRT is also written next to the output as <preview>.srt); skipped with a note when ffmpeg has no mov_text encoder."
"description": "Mux text-track cues as toggleable subtitles (WebVTT for WebM, mov_text otherwise); also write <preview>.srt. Skipped with a note when the selected subtitle encoder is unavailable."
},
{
"name": "all_video_tracks",
Expand Down Expand Up @@ -7220,6 +7312,15 @@
}
],
"options": [
{
"name": "encoding",
"flags": [
"--encoding"
],
"type": "string",
"required": false,
"description": "Subtitle text encoding (for example windows-1252 or shift_jis). UTF BOMs are detected automatically; without a BOM or this option, strict UTF-8 is required."
},
{
"name": "track_name",
"flags": [
Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
| `crop` | `capcut crop <project> <segment-id> [--ratio <r> \| --rect <x,y,w,h> \| --reset]` | yes | Read or set a video/photo segment's source-material crop (--ratio preset, --rect x,y,w,h, or --reset). |
| `cut` | `capcut cut <project> <start> <end> --out <path>` | yes | Extract a time range into a new standalone draft. |
| `duplicate` | `capcut duplicate <project> <segment-id> [--track <track-name>] [--new-track]` | yes | Duplicate a segment at its same timeline position onto a track above the source. |
| `remove` | `capcut remove <project> <segment-id> [--keep-track] [--keep-materials] [--ripple]` | yes | Remove a segment, its emptied track, and the materials that orphans. |
| `remove` | `capcut remove <project> <segment-id> [--keep-track] [--keep-materials] [--ripple] [--ripple-captions]` | yes | Remove a segment, its emptied track, and the materials that orphans. |
| `keyframe` | `capcut keyframe <project> <id> <property> <time> <value> [--easing <name>] \| --batch` | yes | Add a keyframe (position/scale/rotation/alpha/volume); single or --batch. |
| `transition` | `capcut transition <project> <id> <slug> [--duration <time>]` | yes | Add a transition between segments. |
| `mask` | `capcut mask <project> <id> <slug> [options] \| --off` | yes | Apply a mask (linear/circle/heart/...) with geometry flags, or --off. |
Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
| `crop` | `capcut crop <project> <segment-id> [--ratio <r> \| --rect <x,y,w,h> \| --reset]` | 是 | 读取或设置视频/图片片段的源素材裁剪(--ratio 预设、--rect x,y,w,h 或 --reset)。 |
| `cut` | `capcut cut <project> <start> <end> --out <path>` | 是 | 把一段时间范围提取为一个独立的新草稿。 |
| `duplicate` | `capcut duplicate <project> <segment-id> [--track <track-name>] [--new-track]` | 是 | 在相同的时间线位置,把片段复制到源轨道上方的轨道。 |
| `remove` | `capcut remove <project> <segment-id> [--keep-track] [--keep-materials] [--ripple]` | 是 | 删除片段、被它清空的轨道,以及由此孤立的素材;--ripple 会安全地闭合所有轨道上的空档。 |
| `remove` | `capcut remove <project> <segment-id> [--keep-track] [--keep-materials] [--ripple] [--ripple-captions]` | 是 | 删除片段、被它清空的轨道,以及由此孤立的素材;--ripple 会安全地闭合所有轨道上的空档。 |
| `keyframe` | `capcut keyframe <project> <id> <property> <time> <value> [--easing <name>] \| --batch` | 是 | 添加关键帧(位置/缩放/旋转/透明度/音量);单个或 --batch 批量。 |
| `transition` | `capcut transition <project> <id> <slug> [--duration <time>]` | 是 | 在片段之间添加转场。 |
| `mask` | `capcut mask <project> <id> <slug> [options] \| --off` | 是 | 应用蒙版(线性/圆形/爱心/……),带几何参数,或用 --off 移除。 |
Expand Down
17 changes: 17 additions & 0 deletions docs/dub-normalization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Match synthesized dub clip peaks

Local TTS tools can return clips at different levels. Normalize each played clip while placing the dub:

```sh
capcut dub ./project ./captions.srt \
--tts-cmd 'my-local-tts --output {out}' \
--normalize-peak -6 --max-gain-db 20
```

`--normalize-peak` accepts a true-peak target from -60 to 0 dBFS. FFmpeg measures each clip's played prefix, including any `--trim-overlap` shortening, before the command writes any segment gains. Select another binary with `--ffmpeg-cmd`.

The command sets individual segment volumes and keeps synthesized source files unchanged. Use this option without an additional `--volume` adjustment. Without it, dub retains its normal volume behavior and requires no FFmpeg peak measurement.

Each clip's JSON `normalization` reports its measured peak, applied gain, volume, estimated output peak and whether the maximum boost prevented reaching the target. The default maximum boost is 20 dB. Attenuation remains available when a clip is louder than the target. A silent clip, an unreadable measurement or a failing meter causes the command to remove its newly synthesized files and leave the saved draft unchanged.

`--dry-run` reports the cues and requested target without running TTS, metering audio or writing assets. Peak matching is separate from integrated loudness normalization: use `loudness` for a LUFS delivery target. Overlapping clips, later effects and lossy encoding can change the final mix peak; check the exported result for delivery.
13 changes: 13 additions & 0 deletions docs/render-color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Source color in proxy renders

The proxy renderer does not preserve HDR or convert HDR and wide-gamut video into SDR. Its fidelity census reports known PQ, HLG, BT.2020, P3, and Dolby Vision source metadata under `hdr_color`. `render --strict` refuses these sources before writing the proxy; use the editor for a color-managed export.

Actual renders inspect source metadata with ffprobe. The `source_color` report gives the number of readable probes and lists paths whose color metadata remains unknown. Untagged or unreadable input is not proof of SDR, and this report does not assess how the picture looks on a display.

A normal dry run stays independent of ffprobe and reports `mode: "not_probed"`. To include a source metadata check in a dry run, select ffprobe explicitly:

```sh
capcut render ./project --dry-run --strict --ffprobe-cmd /path/to/ffprobe
```

This is a fidelity warning and strict refusal, not a tone-mapping filter. Choosing another encoder does not remove the warning.
Loading
Loading