@gitruck/cli 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +12 -4
- package/README.md +12 -4
- package/dist/index.js +183 -183
- package/package.json +1 -1
- package/skills/gtrk-matrix/SKILL.md +3 -0
- package/skills/gtrk-narration/SKILL.md +6 -0
- package/skills/gtrk-tools/SKILL.md +3 -2
- package/skills/gtrk-travel-recap/SKILL.md +7 -0
- package/skills/gtrk-vlog-docu/SKILL.md +3 -0
- package/skills/gtrk-voiceover/SKILL.md +3 -0
package/README.en.md
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
| 🔎 | `gtrk matrix` | B-roll retrieval + **candidate track laying**: consumes the FILM_BROLL dispatch → produces a candidate list + downloads preview proxies and lays N candidate tracks (`--lay N`, default 1; open it in opencut and toggle track visibility to compare; `--lay 0` produces the list only); `matrix search "<query>"` is a one-off ad-hoc search; `matrix fetch <clip_id...>` pulls raw footage during the fine cut (free re-signing + download for already-granted materials, drag straight into Jianying); **local-footage mode**: `matrix index --dirs <folders>` builds a slice-free index → `--local --dirs` retrieves and lays tracks (**your footage never leaves your machine**) → `matrix lay` consumes the (editable) plan; `matrix describe` understands candidates on demand |
|
|
42
42
|
| 🎨 | `gtrk mg` | MG motion-graphics particle laying: consumes the MG dispatch → lays html-particle assets (transparent overlay / full-screen bed, produced by your show's MG skill) into the `.gtrk` `beat_track`; `mg lint <particle.html>` runs the statically checkable subset of the house rules, `mg status --project <dir>` is an orchestration dashboard; `mg render <particle.html> --duration <sec>` renders a single particle in the cloud, independent of any project, into a Jianying-readable qtrle transparent MOV (the fine-cut supplement channel); aux overlay particles can be layered on the same span (one beat derives a main particle plus `-aux<n>`). The old name `gtrk rrv` remains as a deprecated alias; `gtrk mg fetch` pulls neutral block skeletons from the HyperFrames registry (offline snapshot candidates, three-source fetch with our mirror first, mechanical rewrite then lint) |
|
|
43
43
|
| 🎙️ | `gtrk project init` | Audio-first project bootstrap: build a `.gtrk` project from a voice-over — main path `--tts-task <task_id>` references a completed TTS task (fetches the audio plus sentence timecodes directly, zero ASR); fallback path `--audio`+`--transcript` takes your own voice-over as a pair. Once landed, `gtrk split --project` continues the production pipeline as usual |
|
|
44
|
-
| 🎼 | `gtrk audio lay` / `tighten` | Audio-track atoms: `lay` appends an audio track to a `.gtrk` project (BGM/score; idempotent same-source replacement, no track pile-up); `--beat-align` runs cloud
|
|
44
|
+
| 🎼 | `gtrk audio lay` / `tighten` | Audio-track atoms: `lay` appends an audio track to a `.gtrk` project (BGM/score; idempotent same-source replacement, no track pile-up); `--beat-align` runs cloud analysis and **pins the BGM’s emotional peak onto the cut’s climax**, tiling outward on bar lines and tiling **not at all** when both sides are already long enough (billed once; the climax comes from the `split.beats` criterion chain and can be overridden with `--climax <track-sec>`; `--no-loop` lays only the anchored span and leaves head/tail silence; without a key / on failure / when the track has no highlight it degrades to no anchoring and the command still succeeds). `tighten` tightens the pauses between sentences in the voice-over (purely local, zero billing; only silence straddling a sentence boundary is compressed, within-sentence breaths untouched) |
|
|
45
45
|
| 🎯 | `gtrk audio align` | Audio-video alignment part (fully local, zero billing): cross-correlates an external audio recording (lav mic / recorder) against the video to measure offset + confidence; high confidence swaps the track directly (video stream untouched byte-for-byte), low confidence emits an alignment project for the client timeline, then `--resume` reads the confirmed offset back; `--offset` swaps at an explicit offset |
|
|
46
46
|
| 🧰 | `gtrk tool <name>` | Single-shot tool family: image-to-camera-move, image/video matting, image black-border removal / aspect adaptation / cleanup / square conversion / LivePhoto, smart collage covers and vertical stitching (multi-image input), video black-border removal / aspect adaptation / stabilization / vaporwave filter / mechanical & semantic shot segmentation / motion highlights / AI subtitles, vocal-accompaniment separation / speaker diarization / pitch-and-tempo shift, piano-to-MIDI and piano restoration, audio denoising, silence removal, MAD, and more; `gtrk tool list` shows every input/output/live price/status. Single request, single result, shared runner — adding a tool means adding one descriptor |
|
|
47
47
|
| 💬 | `gtrk feedback` | Tell us what feels wrong: `gtrk feedback "<one line>" --command <command>`. **Disclosed submission** — when an assistant files it for you it must first read the exact content back to you and only add `--disclosed` once you agree; in a pipe or any non-interactive environment, sending without that declaration is refused outright. Content is redacted before it leaves your machine (local paths, credentials, e-mail addresses, phone numbers and the like are replaced by shape), so what you are shown is exactly what gets sent |
|
|
@@ -555,6 +555,7 @@ gtrk matrix --local --dirs <folder-or-file,...> --project <dir> # ② local ret
|
|
|
555
555
|
gtrk matrix lay --project <dir> [--plan <path>] # ③ consume the (edited) plan and lay tracks, zero retrieval cost
|
|
556
556
|
```
|
|
557
557
|
|
|
558
|
+
- **Repeat the flag when a path contains an ASCII comma**: `--dirs` / `--materials` split on ASCII commas by default; when a path carries one, repeat the flag instead (`--dirs "A" --dirs "B"` — it **accumulates**, it does not overwrite). A whole string that exists on disk is never split, and the full-width comma "," never participates in splitting. **When enumeration reports `0/0`, check this first**, then check the folder for broken symlinks.
|
|
558
559
|
- **Your footage never leaves your machine**: only 512px sampled frames are sent to Gitruck Cloud's own embed endpoint for vectorization, discarded on arrival; results reference your local originals by absolute path (no downloads, no proxies). Indexing is metered by frames actually sampled (pre-held before the run, settled to actual usage afterwards); text-side retrieval costs zero credits.
|
|
559
560
|
- **Images are first-class**: images are indexed, retrievable and layable; when selected, an image goes through cloud `image_move` and lands as a 5-second camera-move video — **the image itself does go to the cloud** (2 credits per image, summarized for confirmation before laying; same image + same params is reused forever, never re-billed). Zero images to the cloud → `--no-image-broll`.
|
|
560
561
|
- **No material reuse**: within one laying round each material unit is used once globally (local video per scene, images per file); when candidates run dry, slots stay empty rather than repeat; `--dedup-scope material` tightens to file level.
|
|
@@ -624,11 +625,16 @@ Project entry points that start from **a voice-over** instead of a talking-head
|
|
|
624
625
|
| `gtrk project init --tts-task <task_id>` | **Main path**: references a completed `audio_tts_clone` task — the server hands over the audio and sentence timecodes directly (zero ASR, zero extra billing); the audio download lands in the project's `audio/` |
|
|
625
626
|
| `gtrk project init --audio <voice-over> --transcript <transcript.json>` | **Fallback path**: your own voice-over audio plus its sentence-timecoded transcript as a pair (produced by `gtrk transcript <voice-over> --json`; for TTS-synthesized voice-overs take the main path instead of re-running ASR) |
|
|
626
627
|
| `gtrk audio lay --project <dir> --file <bgm.mp3>` | Appends an audio track to the project; **idempotent same-source replacement** (re-running with the same source replaces instead of piling up tracks; zero-reference protection when stripping the old one); `--volume <0..1>` (default 0.1, bed volume — the contract carries linear gain only, never dB; the client's volume panel shows -20.0, the same scale on both sides), `--offset <ms>` sets the in-point |
|
|
627
|
-
| `gtrk audio lay … --beat-align` |
|
|
628
|
+
| `gtrk audio lay … --beat-align` | **Climax anchoring** (`audio_music_analyze`, billed once): pins the BGM’s emotional peak `H` (the server’s `highlight.time`) onto the cut’s climax `A`; the mapping is always `track_sec = A + (bgm_sec − H)`. **Both sides long enough ⇒ zero tiling** (exactly one clip); only a short side is tiled outward, with seams snapped to downbeats (the two hard track boundaries are cut without snapping). `A` comes from the criterion chain over `struct_meta.split.beats`: elevation → container flip → callback closure → `0.75×total` fallback, and **the CLI reports which rung was used — the fallback is explicitly flagged as a guess**. Without a key / on analysis failure / when the track has no highlight it degrades to no anchoring and the command never fails over it |
|
|
629
|
+
| `gtrk audio lay … --beat-align --climax <track-sec>` | Climax **escape hatch**: always overrides the chain above. Out of range (≤ `--offset` or ≥ the project end) or non-numeric **errors out immediately** rather than falling back silently — an explicitly wrong value should be visible at once. Must be used together with `--beat-align` |
|
|
630
|
+
| `gtrk audio lay … --no-loop` | No tiling: with `--beat-align` it lays only the anchored span and leaves head/tail silence (**the silent seconds are reported**); without `--beat-align` it keeps a single pass instead of looping to fill the project |
|
|
628
631
|
| `gtrk audio tighten --project <dir>` | Tightens the pauses **between sentences** in the voice-over track (**purely local, zero billing**): only silence that straddles a sentence boundary is compressed — **within-sentence breaths and quoted original-audio spans are left alone** — and the output honestly reports how many within-sentence breaths were skipped. `--keep <sec>` silence to keep after tightening, `--min-silence <sec>` leave anything shorter untouched, `--boundary-tol <sec>` tolerance for "sits on a sentence boundary", `--dry-run` report how many spots and how many seconds would be compressed without writing. For the three defaults see `gtrk audio tighten --help` (measured, accepted values — tune them for another subject or voice) |
|
|
629
632
|
|
|
630
633
|
`project init` also takes `--canvas <WxH>` (default 1080x1920), `-o/--out`, `--reupload`, `--no-open` and `--json` with the same semantics as `oralcut`; with `--json` both commands emit a single-line result JSON on stdout (human logs go to stderr).
|
|
631
634
|
|
|
635
|
+
> ⚠️ **`--beat-align` was redesigned wholesale on 2026-09-02** (change `redesign-beat-align-climax-anchor`). The old implementation pushed the whole BGM back by `firstDownbeat` seconds — it analysed the **BGM’s own timeline**, which has no consumer on the project timeline at all, so the net effect was **paying for one cloud analysis in exchange for an equally long silence at the head of the cut**.
|
|
636
|
+
> ⇒ **Artifacts produced with `--beat-align` are no longer byte-reproducible**; the default path without that flag is **byte-for-byte unchanged**.
|
|
637
|
+
|
|
632
638
|
> **Run `tighten` before laying tracks**: it changes the voice-over track's length, and `gtrk split` / `gtrk matrix` reproject beat timecodes against the project as it stands — tighten first and you save a round of rework. To get it right at synthesis time instead, in-house voices accept `--fragment-interval` during TTS (see `audio_tts_clone` below); cloud voices do not support that parameter, which is when you tighten after synthesis instead.
|
|
633
639
|
|
|
634
640
|
### `gtrk tool <name> [inputs...]` — the single-shot tool family
|
|
@@ -643,13 +649,13 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
|
|
|
643
649
|
| `image_matting` | One image | Transparent-background png (`--param` can request a backing plate) | Queried live before the run | Live |
|
|
644
650
|
| `image_blackborder_remove` | One local image | Image with black borders removed | Queried live before the run | Live |
|
|
645
651
|
| `image_canvas_adapt` | One local image; optional target width/height and `normal` / `rectangle` / `square` | Aspect-adapted image | Queried live before the run | Live |
|
|
646
|
-
| `image_purify` | One local image (only material you have the rights to process) | Image cleaned of watermarks, logos or overlays | Queried live before the run | Live |
|
|
652
|
+
| `image_purify` | One local image; optional `full_screen` / `region` and region boxes (only material you have the rights to process) | Image cleaned of watermarks, logos or overlays | Queried live before the run | Live |
|
|
647
653
|
| `video_matting` | One video (**≤ 10 minutes**, uploaded as-is with no proxy) | Transparent-background webm | Queried live before the run | Live |
|
|
648
654
|
| `video_blackborder_remove` | One local video | Video with black borders removed | Queried live before the run | Live |
|
|
649
655
|
| `video_canvas_adapt` | One local video; optional target width/height, clip range, canvas mode and audio-free output | Aspect-adapted video | Queried live before the run | Live |
|
|
650
656
|
| `video_stabilizer` | One local video; optional `fast` / `exp` / `turbo` | Stabilized video | Queried live before the run | Live |
|
|
651
657
|
| `video_vaporwave` | One local video; the filter takes an exact preset name | Vaporwave-filtered video | Queried live before the run | Live |
|
|
652
|
-
| `video_purify` | One local video; optional `full_screen` / `subtitle` / `custom`, `ffmpeg` / `raft
|
|
658
|
+
| `video_purify` | One local video; optional `full_screen` / `subtitle` / `custom` / `region`, `ffmpeg` / `raft`, a normalized ROI and region boxes with optional time ranges (only material you have the rights to modify) | One cleaned video | Queried live before the run | Live |
|
|
653
659
|
| `video_upscale` | One local video (**≤ 1 minute**); optional `2` / `3` / `4`× and `Reality` / `Anime` | One upscaled video | Queried live before the run | Live |
|
|
654
660
|
| `video_interpolate` | One local video; optional `2` / `3` / `4`×, with no extra one-minute limit | One frame-interpolated video | Queried live before the run | Live |
|
|
655
661
|
| `video_segment` | One local video; optional `--detector content\|adaptive`, `--threshold` | Shot-range structure in `result-output.json` (structured data, not a downloadable file) | Queried live before the run | Live |
|
|
@@ -686,11 +692,13 @@ The seven shared video tools — black-border removal, aspect adaptation, stabil
|
|
|
686
692
|
- `gtrk tool image_blackborder_remove ./photo.jpg [--json]` — automatically crops black borders from one image.
|
|
687
693
|
- `gtrk tool image_canvas_adapt ./photo.jpg --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle [--json]` — image aspect conversion; omitting the canvas parameters uses the server defaults. Per the actual runtime contract the canvas mode accepts only `normal`, `rectangle` and `square`, not the `fit` from older docs.
|
|
688
694
|
- `gtrk tool image_purify ./photo.jpg [--json]` — clean watermarks, logos or overlays from an image you have the rights to process.
|
|
695
|
+
- `gtrk tool image_purify ./photo.jpg --purify-scope region --purify-region 0.02,0.02,0.15,0.08 [--json]` — remove a box directly: no recognition, **everything inside the box is processed**; smaller boxes that fit the element tightly give better results.
|
|
689
696
|
- `gtrk tool video_blackborder_remove ./clip.mp4 [--json]` — automatically crops black borders from one video while keeping the original audio.
|
|
690
697
|
- `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 12 --clip-end 60 --without-audio [--json]` — video aspect conversion; `--clip-start/--clip-end` are start/end frame numbers, omitted fields use the server defaults, and the canvas mode accepts only `normal`, `rectangle`, `square`.
|
|
691
698
|
- `gtrk tool video_stabilizer ./clip.mp4 --stabilizer-method turbo [--json]` — video stabilization; supports `fast`, `exp` and `turbo`, where `exp` is experimental and you should check the result yourself.
|
|
692
699
|
- `gtrk tool video_vaporwave ./clip.mp4 --vaporwave-filter "灼熱苦夏" [--json]` — add a vaporwave filter using an exact preset name; omitting it explicitly uses `愈漸升溫`.
|
|
693
700
|
- `gtrk tool video_purify ./clip.mp4 --purify-scope custom --purify-method ffmpeg --purify-roi 0,0.78,1,0.2 [--json]` — clean a video you have the rights to modify; the ROI is a normalized `x,y,w,h` and is only used together with `custom`. `raft` supports videos under 20 minutes, `ffmpeg` has no such limit; restoring occluded content is not promised.
|
|
701
|
+
- `gtrk tool video_purify ./clip.mp4 --purify-scope region --purify-region 0.8,0.02,0.18,0.08,0,5 --purify-region 0.3,0.85,0.4,0.1,120 [--json]` — remove boxes directly; repeat the option for more boxes (up to 16), each optionally followed by `start,end` in seconds (omit `end` to run to the end). No recognition — **everything inside the box is processed, including the main subject**; `ffmpeg` blurs the box while `raft` repaints it, and tighter boxes give better results. `--purify-region` only works with `region`.
|
|
694
702
|
- `gtrk tool video_upscale ./clip.mp4 --upscale-times 3 --upscale-type Anime [--json]` — experimental video upscaling; input up to 60 seconds, neither side may exceed 4000 px after scaling, supports `2`, `3`, `4`× and `Reality`, `Anime`.
|
|
695
703
|
- `gtrk tool video_interpolate ./clip.mp4 --interpolate-multiplier 3 [--json]` — frame interpolation; supports `2`, `3`, `4`×, does not apply the one-minute limit from older docs, and neither side of the source may exceed 4000 px.
|
|
696
704
|
- `gtrk tool video_segment ./clip.mp4 [--detector adaptive] [--threshold 27] [--json]` — mechanical shot segmentation; produces **structured** `result-output.json` (`scene_list` with each range's start/end/duration), not a downloadable file.
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
| 🔎 | `gtrk matrix` | B-roll 检索+**候选铺轨**:消费 FILM_BROLL 派单 → 产候选清单 + 下载 preview 代理铺 N 条候选轨(`--lay N` 默认 1,opencut 打开即可用轨道小眼睛对比;`--lay 0` 只出清单);`matrix search "<词>"` 单条 ad-hoc;`matrix fetch <clip_id...>` 精剪期拉原片(已授予素材免费重签+下载落盘,直接拖进剪映);**本地素材模式**:`matrix index --dirs <素材夹>` 免切片建索引 → `--local --dirs` 检索铺轨(**素材本体不上云**)→ `matrix lay` 消费(可编辑的)plan;`matrix describe` 按需理解候选 |
|
|
42
42
|
| 🎨 | `gtrk mg` | MG 动态图颗粒铺轨:消费 MG 派单 → 把 html-particle 颗粒(透明叠加 / 满屏底层,由你栏目的 MG 生产 skill 所产)铺进 `.gtrk` 的 beat_track;`mg lint <颗粒.html>` 铁律静态子集校验、`mg status --project <dir>` 编排看板(缺 HTML / 已产未铺 / 已铺);`mg render <颗粒.html> --duration <sec>` 脱离工程独立云渲单颗颗粒为剪映可读 qtrle 透明 MOV(精剪补给口);aux 叠层颗粒同段多铺(一 beat 派生主 + `-aux<n>`)。旧名 `gtrk rrv` 保留为弃用别名;`gtrk mg fetch` 从 Hyperframes registry 取中性块骨架(快照随包离线候选、三源取块我方镜像优先、机械改写后过 lint) |
|
|
43
43
|
| 🎙️ | `gtrk project init` | 音频驱动工程起盘:从一条配音建 `.gtrk` 工程——主路 `--tts-task <task_id>` 引用已完成的 TTS 配音任务(直取产物音频+句级时码,零 ASR);兜底 `--audio`+`--transcript` 自备配音成对给。落好即可 `gtrk split --project` 接成片流水线 |
|
|
44
|
-
| 🎼 | `gtrk audio lay` / `tighten` | 音频轨零件:`lay` 往 `.gtrk` 工程追加一条音频轨(BGM/配乐上轨,同源幂等替换不堆轨);`--beat-align`
|
|
44
|
+
| 🎼 | `gtrk audio lay` / `tighten` | 音频轨零件:`lay` 往 `.gtrk` 工程追加一条音频轨(BGM/配乐上轨,同源幂等替换不堆轨);`--beat-align` 云端分析把 **BGM 的情绪峰值压到成片的高潮点上**,锚点前后按小节线平铺补齐、两侧都够长时零平铺(计费一次;高潮点取自 `split.beats` 的判据链,可用 `--climax <轨秒>` 覆盖;`--no-loop` 只放锚点那一段、头尾留白;无 Key / 失败 / 曲子缺高潮点自动降级为不锚定,命令不失败)。`tighten` 收紧配音的句间停顿(纯本地零计费,只压跨句界的静音、句内换气不动) |
|
|
45
45
|
| 🎯 | `gtrk audio align` | 音画对轨零件(纯本地零计费):外录音轨(领夹麦/录音笔)与视频互相关测偏移+置信度;高置信直接换轨(视频流零像素改动),低置信产对齐工程交客户端拖齐后 `--resume` 读回;`--offset` 显式偏移直换 |
|
|
46
46
|
| 🧰 | `gtrk tool <name>` | 单点工具族:图转运镜、图片/视频抠像、图片去黑边/比例转换/净化/转方图/LivePhoto、智能拼图封面/拼长图(多图输入)、视频去黑边/比例转换/防抖/蒸汽波滤镜/机械·智能分镜/运镜高光/智能字幕、人声伴奏分离/说话人分轨/变调变速、钢琴转MIDI/修复、音视频降噪、静音移除、MAD 等;`gtrk tool list` 查全部输入/产物/实时价格/状态。单发单收、共享 runner,接新工具只加一个 descriptor |
|
|
47
47
|
| 💬 | `gtrk feedback` | 把用得不顺手的地方反馈给我们:`gtrk feedback "<一句话>" --command <命令名>`。**告知式提交**——助手代提时必须先把要发的内容原样念给你、得到同意后才加 `--disclosed` 重跑;管道/非交互环境下没有这句声明会直接拒发。发送前内容会先做一遍脱敏(本机路径、凭据、邮箱、手机号等按形态替换),你看到的就是将要发出的那一份 |
|
|
@@ -571,6 +571,7 @@ gtrk matrix --local --dirs <素材夹或素材文件,...> --project <目录> #
|
|
|
571
571
|
gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(可编辑后的)plan 铺轨,零检索开销
|
|
572
572
|
```
|
|
573
573
|
|
|
574
|
+
- **路径里有英文半角逗号就重复传**:`--dirs` / `--materials` 缺省按半角逗号分隔;路径自带逗号时改成重复传(`--dirs "A" --dirs "B"`,**累加不覆盖**)。整串在盘上存在时会自动不拆,中文全角「,」从不参与拆分。**枚举报 `0/0` 时先看这一条**,其次看素材夹里有没有断链(失效的软链接)。
|
|
574
575
|
- **素材本体永不上云**:只把 512px 抽帧图送同合云自建 embed 端点向量化、即传即弃;产物以绝对路径直引本地原文件(免下载免代理)。索引按实际抽帧张数会话计量(跑前预扣、跑完多退少不补),文本检索零积分。
|
|
575
576
|
- **图片一视同仁**:图片可检索可铺轨;被选中时经云端 `image_move` 转 5 秒运镜视频入轨——**图片本体会上云**(2 积分/张,铺轨前汇总确认;同图同参恒复用不重复扣费)。零图片上云 → `--no-image-broll`。
|
|
576
577
|
- **同素材不二用**:单轮铺轨一个素材单元全局只用一次(本地视频按场景、图片按文件),候选枯竭宁空不重复;`--dedup-scope material` 收严到文件级。
|
|
@@ -640,11 +641,16 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
|
|
|
640
641
|
| `gtrk project init --tts-task <task_id>` | **主路**:引用一个已完成的 `audio_tts_clone` 配音任务——服务端直取产物音频与句级时码(零 ASR、零额外计费),音频下载落工程 `audio/` |
|
|
641
642
|
| `gtrk project init --audio <配音> --transcript <transcript.json>` | **兜底路**:自备配音音频 + 句级时码稿成对给(时码稿由 `gtrk transcript <配音音频> --json` 产出;TTS 合成的配音请走主路,别重跑 ASR) |
|
|
642
643
|
| `gtrk audio lay --project <目录> --file <bgm.mp3>` | 往工程追加一条音频轨;**同源幂等替换**(同一来源重跑替换不堆轨、零引用保护剥旧);`--volume <0..1>`(默认 0.1 垫底音量——契约 volume 只写线性增益、不写 dB;客户端音量面板显示 -20.0,两侧同一标尺)、`--offset <ms>` 定入点 |
|
|
643
|
-
| `gtrk audio lay … --beat-align` |
|
|
644
|
+
| `gtrk audio lay … --beat-align` | **高潮点锚定**(`audio_music_analyze`,计费一次):把 BGM 的情绪峰值 `H`(服务端 `highlight.time`)压到成片高潮点 `A` 上,映射恒为 `轨秒 = A + (BGM 秒 − H)`;**两侧都够长就零平铺**(恰好 1 个 clip),不够长才按小节线平铺补齐、接缝吸附 downbeat(轨的两个硬边界处的截断不吸附)。`A` 取自 `struct_meta.split.beats` 的判据链:升华段 → 容器转折 → 回扣段 → `0.75×全片`兜底,**命中哪一档 CLI 如实报出,兜底档会明示是猜的**。无 Key / 分析失败 / 曲子缺高潮点一律降级为不锚定,命令不失败 |
|
|
645
|
+
| `gtrk audio lay … --beat-align --climax <轨秒>` | 高潮点**逃生门**:一律覆盖上面那条判据链。越界(≤ `--offset` 或 ≥ 工程末尾)或非数**直接报错**,不静默回落 —— 显式给错了值要当场知道。须与 `--beat-align` 同用 |
|
|
646
|
+
| `gtrk audio lay … --no-loop` | 不平铺补齐:开了 `--beat-align` 时只放锚点那一段、头尾留白(**留白秒数如实报出**);未开 `--beat-align` 时保留单次、不循环叠满至工程末尾 |
|
|
644
647
|
| `gtrk audio tighten --project <目录>` | 收紧配音轨的**句间**停顿(**纯本地、零计费**):只压跨句界的静音,**句内换气与原声引用段不动**,出参如实报「跳过句内换气 N 处」。`--keep <秒>` 收紧后保留的静音、`--min-silence <秒>` 短于此不动、`--boundary-tol <秒>` 判「贴着句界」的容差、`--dry-run` 只报会压几处共几秒、不写盘。三个缺省值见 `gtrk audio tighten --help`(实测认可值,换题材/音色可调) |
|
|
645
648
|
|
|
646
649
|
`project init` 另有 `--canvas <WxH>`(默认 1080x1920)、`-o/--out`、`--reupload`、`--no-open`、`--json`,语义与 `oralcut` 一致;两命令 `--json` 恒出单行结果 JSON(人读日志走 stderr)。
|
|
647
650
|
|
|
651
|
+
> ⚠️ **`--beat-align` 的语义在 2026-09-02 整套换过**(change `redesign-beat-align-climax-anchor`,主理人拍板)。旧实现是「把整条 BGM 后推 `firstDownbeat` 秒」—— 分析的是 **BGM 自己的时间轴**,工程时间轴里根本没有它的消费方,净效果只是**付一次云端分析的钱换来片头一段等长静音**。
|
|
652
|
+
> ⇒ **开过 `--beat-align` 的旧产物不再逐字节可复现**;没开这个 flag 的缺省路径产物**字节零变化**。
|
|
653
|
+
|
|
648
654
|
> **`tighten` 该在铺轨之前跑**:它会改配音轨时长,`gtrk split` / `gtrk matrix` 的 beat 时码按当刻工程重投影——先收紧再铺轨,省一次返工。想要合成时就对,自训音色可在 TTS 阶段直接传 `--fragment-interval`(见下节 `audio_tts_clone`);云引擎音色不支持该参数,才用本命令在合成之后收。
|
|
649
655
|
|
|
650
656
|
### `gtrk tool <name> [输入...]` — 单点工具族
|
|
@@ -659,13 +665,13 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
|
|
|
659
665
|
| `image_matting` | 单张图片 | 透明背景 png(可 `--param` 请求背景底板) | 运行前实时查询 | 已上线 |
|
|
660
666
|
| `image_blackborder_remove` | 单张本地图片 | 去黑边图片 | 运行前实时查询 | 已上线 |
|
|
661
667
|
| `image_canvas_adapt` | 单张本地图片;可选目标宽高与 `normal` / `rectangle` / `square` | 比例适配图片 | 运行前实时查询 | 已上线 |
|
|
662
|
-
| `image_purify` |
|
|
668
|
+
| `image_purify` | 单张本地图片;可选 `full_screen` / `region` 与区域框(仅处理你有权处理的素材) | 清理水印、Logo 或叠加元素后的净化图片 | 运行前实时查询 | 已上线 |
|
|
663
669
|
| `video_matting` | 单条视频(**≤10 分钟**,原片直传不压代理) | 透明背景 webm | 运行前实时查询 | 已上线 |
|
|
664
670
|
| `video_blackborder_remove` | 单条本地视频 | 去黑边视频 | 运行前实时查询 | 已上线 |
|
|
665
671
|
| `video_canvas_adapt` | 单条本地视频;可选目标宽高、片段、画布模式和无音轨输出 | 比例适配视频 | 运行前实时查询 | 已上线 |
|
|
666
672
|
| `video_stabilizer` | 单条本地视频;可选 `fast` / `exp` / `turbo` | 防抖视频 | 运行前实时查询 | 已上线 |
|
|
667
673
|
| `video_vaporwave` | 单条本地视频;滤镜使用精确预设名称 | 蒸汽波滤镜视频 | 运行前实时查询 | 已上线 |
|
|
668
|
-
| `video_purify` | 单条本地视频;可选 `full_screen` / `subtitle` / `custom`、`ffmpeg` / `raft
|
|
674
|
+
| `video_purify` | 单条本地视频;可选 `full_screen` / `subtitle` / `custom` / `region`、`ffmpeg` / `raft`、归一化 ROI 与可带时间段的区域框(仅处理有权修改的素材) | 一条净化视频 | 运行前实时查询 | 已上线 |
|
|
669
675
|
| `video_upscale` | 单条本地视频(**≤1 分钟**);可选 `2` / `3` / `4` 倍与 `Reality` / `Anime` | 一条超分视频 | 运行前实时查询 | 已上线 |
|
|
670
676
|
| `video_interpolate` | 单条本地视频;可选 `2` / `3` / `4` 倍,不附加 1 分钟限制 | 一条插帧视频 | 运行前实时查询 | 已上线 |
|
|
671
677
|
| `video_segment` | 单条本地视频;可选 `--detector content\|adaptive`、`--threshold` | 分镜区间结构 `result-output.json`(结构化数据,非下载文件) | 运行前实时查询 | 已上线 |
|
|
@@ -702,11 +708,13 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
|
|
|
702
708
|
- `gtrk tool image_blackborder_remove ./photo.jpg [--json]` — 自动裁去单张图片四周黑边。
|
|
703
709
|
- `gtrk tool image_canvas_adapt ./photo.jpg --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle [--json]` — 图片比例转换;省略画布参数时沿用服务端默认。画布模式按实际运行时契约只接受 `normal`、`rectangle`、`square`,不接受旧文档中的 `fit`。
|
|
704
710
|
- `gtrk tool image_purify ./photo.jpg [--json]` — 清理你有权处理的图片中的水印、Logo 或叠加元素。
|
|
711
|
+
- `gtrk tool image_purify ./photo.jpg --purify-scope region --purify-region 0.02,0.02,0.15,0.08 [--json]` — 按框直接去除:不做识别,**框内全部内容都会被处理**;框越小、越贴近要去除的元素效果越好。
|
|
705
712
|
- `gtrk tool video_blackborder_remove ./clip.mp4 [--json]` — 自动裁去单条视频四周黑边并保留原音轨。
|
|
706
713
|
- `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 12 --clip-end 60 --without-audio [--json]` — 视频比例转换;`--clip-start/--clip-end` 是起止帧序号,省略字段时沿用服务端默认,画布模式只接受 `normal`、`rectangle`、`square`。
|
|
707
714
|
- `gtrk tool video_stabilizer ./clip.mp4 --stabilizer-method turbo [--json]` — 视频防抖;支持 `fast`、`exp`、`turbo`,其中 `exp` 为实验方式,产物观感需自行检查。
|
|
708
715
|
- `gtrk tool video_vaporwave ./clip.mp4 --vaporwave-filter "灼熱苦夏" [--json]` — 使用精确预设名称添加蒸汽波滤镜;省略时显式使用 `愈漸升溫`。
|
|
709
716
|
- `gtrk tool video_purify ./clip.mp4 --purify-scope custom --purify-method ffmpeg --purify-roi 0,0.78,1,0.2 [--json]` — 净化用户有权修改的视频;ROI 为归一化 `x,y,w,h` 且只和 `custom` 同用。`raft` 仅支持 20 分钟以内视频,`ffmpeg` 不套用该限制;不承诺还原被遮挡内容。
|
|
717
|
+
- `gtrk tool video_purify ./clip.mp4 --purify-scope region --purify-region 0.8,0.02,0.18,0.08,0,5 --purify-region 0.3,0.85,0.4,0.1,120 [--json]` — 按框直接去除,可重复给多个框(最多 16 个);框后可带 `start,end`(秒,`end` 省略即到结尾)。不做识别,**框内全部内容都会被处理(包括画面主体)**;`ffmpeg` 在框内做模糊、`raft` 做修复补全,框越小、越贴边效果越好。`--purify-region` 只能和 `region` 同用。
|
|
710
718
|
- `gtrk tool video_upscale ./clip.mp4 --upscale-times 3 --upscale-type Anime [--json]` — 实验性视频超分;输入最多 60 秒,放大后任一边不得超过 4000 px,支持 `2`、`3`、`4` 倍和 `Reality`、`Anime`。
|
|
711
719
|
- `gtrk tool video_interpolate ./clip.mp4 --interpolate-multiplier 3 [--json]` — 视频插帧;支持 `2`、`3`、`4` 倍,不套用旧文档中的 1 分钟限制,原视频任一边不得超过 4000 px。
|
|
712
720
|
- `gtrk tool video_segment ./clip.mp4 [--detector adaptive] [--threshold 27] [--json]` — 机械分镜;产**结构化** `result-output.json`(`scene_list` 各段起止/时长),非下载文件。
|