@gitruck/cli 1.3.9 → 1.3.11
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/AGENT.md +41 -2
- package/CHANGELOG.md +44 -0
- package/README.en.md +22 -0
- package/README.md +22 -0
- package/assets/composite-kit/kit.js +36 -7
- package/assets/composite-kit/stage.html +23 -2
- package/dist/index.js +341 -334
- package/docs/reference.en.md +57 -18
- package/docs/reference.md +59 -21
- package/package.json +3 -3
- package/skills/gtrk-composite/SKILL.md +11 -6
- package/skills/gtrk-food-recap/SKILL.md +1 -1
- package/skills/gtrk-live-slicing/SKILL.md +2 -2
- package/skills/gtrk-long2short/SKILL.md +4 -3
- package/skills/gtrk-matrix/SKILL.md +48 -5
- package/skills/gtrk-mg/SKILL.md +404 -398
- package/skills/gtrk-narration/SKILL.md +3 -2
- package/skills/gtrk-oralcut/SKILL.md +28 -16
- package/skills/gtrk-splitter/SKILL.md +313 -298
- package/skills/gtrk-style-maker/SKILL.md +1 -1
- package/skills/gtrk-style-maker/references/craft-output-spec.md +2 -2
- package/skills/gtrk-talking-head/SKILL.md +8 -3
- package/skills/gtrk-tools/SKILL.md +5 -4
- package/skills/gtrk-vlog-docu/SKILL.md +1 -1
package/docs/reference.en.md
CHANGED
|
@@ -219,9 +219,9 @@ Common entry points: `gtrk oralcut` edits talking heads, `gtrk long2short` selec
|
|
|
219
219
|
|
|
220
220
|
### `gtrk long2short` / `gtrk pip` / `gtrk qc` — Additional commands
|
|
221
221
|
|
|
222
|
-
- `gtrk long2short <input>`: select topics and jump-cut into per-clip gtrk / Jianying / XML projects. `--split-screen` uses a 720p proxy for smart split-screen; `--output-size` selects the aspect ratio; `--subtitle-out` writes captions for each clip; `--speed-factor 0.5–2.0` writes an overall speed change (pitch preserved) into every clip project (no cloud rendering, no extra charge); `--camera-move` has the cloud write push / pull camera moves as scale keyframes on main-track segments (visible and editable in the client and Jianying, not shown by local `gtrk render` or Premiere projects; `clips.md` marks "N camera moves"), and later `gtrk patch` trims / splits keep those keyframes valid. The output root also gets a whole-source transcript `json/transcript.json`, so any clip can get a client caption track: `gtrk subtitle lay --gtrk <clip dir>/gtrk/<project>.gtrk --transcript <output root>/json/transcript.json --language <source language>` (`--language` sets the cloud line-split language, default zh-CN). Run landscape and portrait separately; content determines the number of clips. See `gtrk long2short --help` for all options.
|
|
222
|
+
- `gtrk long2short <input>`: select topics and jump-cut into per-clip gtrk / Jianying / XML projects. `--split-screen` uses a 720p proxy for smart split-screen; `--output-size` selects the aspect ratio; `--subtitle-out` writes captions for each clip; `--speed-factor 0.5–2.0` writes an overall speed change (pitch preserved) into every clip project (no cloud rendering, no extra charge); `--camera-move` has the cloud write push / pull camera moves as scale keyframes on main-track segments (visible and editable in the client and Jianying, not shown by local `gtrk render` or Premiere projects; `clips.md` marks "N camera moves"), and later `gtrk patch` trims / splits keep those keyframes valid. The output root also gets a whole-source transcript `json/transcript.json`, so any clip can get a client caption track: `gtrk subtitle lay --gtrk <clip dir>/gtrk/<project>.gtrk --transcript <output root>/json/transcript.json --language <source language>` (`--language` sets the cloud line-split language, default zh-CN). Run landscape and portrait separately; content determines the number of clips. Before extracting audio it prints the live price and an estimate for this run (stderr; `pricing` in the `--json` root result); to get a quote first for a long source, add `--dry-run` (no extraction, no upload, no charge, no folders). See `gtrk long2short --help` for all options.
|
|
223
223
|
- `gtrk pip lay`: lay a simultaneously recorded screen or second camera against the talking-head cut points. Both sources need shared audio for alignment; low-confidence matches require calibration in the client before resuming. Use `gtrk pip lay --help` for inputs, shapes, positions and offsets.
|
|
224
|
-
- `gtrk qc <video>`: inspect flash frames, black/frozen frames, volume and synchronization. Add `--gtrk` for project context and `--fail-on` for pipeline gating. Findings locate issues; they do not automatically repair the video.
|
|
224
|
+
- `gtrk qc <video>`: inspect flash frames, black/frozen frames, volume and synchronization. Add `--gtrk` for project context and `--fail-on` for pipeline gating. With `--gtrk`, in-clip jump cuts and severe too-short shots name their beat and slot, and list the beat's unused candidate segments (from the project's `split/broll-plan.json`, steadiest first). Findings locate issues; they do not automatically repair the video.
|
|
225
225
|
|
|
226
226
|
### `gtrk matrix --online` — External-platform search in current source
|
|
227
227
|
|
|
@@ -260,13 +260,13 @@ Look at any local video by timecode or by spoken line: frame grids labelled with
|
|
|
260
260
|
|
|
261
261
|
| Subcommand | What it does |
|
|
262
262
|
|---|---|
|
|
263
|
-
| `probe <video>` | Duration, display size (pixel aspect and rotation applied), frame rate and VFR, audio presence |
|
|
263
|
+
| `probe <video \| folder>` | Duration, display size (pixel aspect and rotation applied), frame rate and VFR, audio presence. Given a **folder** it looks at that level only (no recursion, hidden files skipped), picks the audio and video files (`mp4 mov mkv avi webm m4v mts` / `wav mp3 m4a flac aac ogg opus`), probes each and sorts by name: `{mode:"probe-dir", files:[{path, kind, duration, codec, width?, height?, fps?, hasAudio}], skipped:[{path, reason}], truncated?}`; a broken file goes to `skipped` without stopping the rest, and only the first 200 are probed |
|
|
264
264
|
| `lines <transcript>` | One line per utterance `u<id> start–end text`; `--find <phrase>` lists every occurrence with word-level times |
|
|
265
265
|
| `frames <video>` | Single frames by `--at` / `--every` / `--frames` / `--every-frame`; with `--transcript` or `--label` a label band is added below each frame |
|
|
266
266
|
| `tile <video>` | One labelled grid (≤60 cells) |
|
|
267
267
|
| `tiles <video>` | Paginated grids (`--cols × --rows`, default 3×3); `--ranges <json>` visits several intervals; `--every-frame` decodes each interval once and keeps every original frame |
|
|
268
268
|
| `boundaries <video>` | Visual-change candidates (`--rate` default 12, `--threshold` default 0.1, `--min-gap` merges neighbours); with `--transcript` each candidate notes which line it falls on. **Mechanical evidence, not shot detection** |
|
|
269
|
-
| `cut <video>` | Saves an evidence clip (`.mp4/.mov/.mkv`) |
|
|
269
|
+
| `cut <video>` | Saves an evidence clip (`.mp4/.mov/.mkv`, re-encoded). With `--copy` it **stream-copies** instead: no re-encode, seconds for a long raw recording (e.g. splitting raws over 2 hours); the start falls on the last keyframe before `--start`, the receipt's `seconds` is the actual length and its `note` says so; `-o` must keep the source's extension; audio-only sources work too |
|
|
270
270
|
|
|
271
271
|
```bash
|
|
272
272
|
gtrk media tiles "reference.mp4" --frames 48 --cols 6 --rows 4 --cell 320 --transcript "reading/transcript.json" -o "reading/evidence/overview"
|
|
@@ -277,7 +277,28 @@ gtrk media boundaries "reference.mp4" --rate 4 --threshold 0.12 --transcript "re
|
|
|
277
277
|
- **Intervals**: `--start/--end` (seconds or `[hh:]mm:ss.mmm`), or `--around <phrase> [--occurrence n] [--padding s]` to locate by the spoken line (needs `--transcript`; a repeated phrase must name its occurrence — `lines --find` lists them).
|
|
278
278
|
- **Transcripts**: the `gtrk transcript --json` output (v1, with word-level times) works as is; `hypit.transcript@1` is also accepted. The transcript must belong to this video — a duration or file-name mismatch prints a warning on stderr.
|
|
279
279
|
- **Labels** (below the picture, so the original captions and graphics stay visible): source seconds · timecode (plus frame number in frame-by-frame mode) · utterance id / the word being spoken with its times / the whole sentence with the current word highlighted. Moments with no timed word are labelled as such, never inferred as silence. Labels are drawn with libass; an ffmpeg without the `ass` filter fails with a pointer to `gtrk deps install --ffmpeg`.
|
|
280
|
-
- **Output**: `-o` is required — nothing lands in the current directory or next to the source; existing paths are never overwritten, and `--force` only replaces this command family's own earlier output. `frames` / `tiles` directories include an `index.json` recording each cell's file, time, word and utterance. Frame-by-frame is capped at 1800 frames per call.
|
|
280
|
+
- **Output**: `-o` is required (except `frames`, which defaults to a new folder under `$GTRK_FRAMES_DIR` when that is set) — nothing lands in the current directory or next to the source; existing paths are never overwritten, and `--force` only replaces this command family's own earlier output. `frames` / `tiles` directories include an `index.json` recording each cell's file, time, word and utterance. Frame-by-frame is capped at 1800 frames per call.
|
|
281
|
+
|
|
282
|
+
### `gtrk client <subcommand>` — read the project as it is in the editor
|
|
283
|
+
|
|
284
|
+
When the desktop client has this project open, reads the **live state** over the local bridge (which segment is selected, the playhead, unsaved edits, the picture the editor shows); otherwise reads the project files or renders a frame locally. Both paths return the same shape and `source` says which one answered. **The client is never required**: not installed, not running or showing another project, all three subcommands still exit successfully.
|
|
285
|
+
|
|
286
|
+
| Subcommand | What it does | `--json` output |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| `state` | Project summary: clips on every track with their timeline times, project duration; clips on the main track (the one carrying the voice) get a 1-based `no`. Never prints the whole `.gtrk` | `{source:"client"\|"file", project, duration, tracks:[{track, kind, index, main?, clips:[{no?, clip_id, track_st, track_ed, duration, volume?}]}], selection, playhead, viewport}`; the last three are `null` when read from files |
|
|
289
|
+
| `segment --no <N>` | Timeline times and spoken text of main-track segment N (utterances aligned to timeline times exactly as in the `gtrk split` projection view; cut utterances are left out). Out of range exits non-zero and says how many segments there are | `{source, no, clip_id, track_st, track_ed, text}` |
|
|
290
|
+
| `frame --at <sec>` | One composited frame at that timeline moment (`--width` default 768). Rendered by the client it matches the editor; rendered locally it is free and has no MG particles (`note` says so). Past the end it is pinned to the last frame, with a note | `{source:"client"\|"local-render", at, path, width, height, note?}` |
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
gtrk client state --project . --json
|
|
294
|
+
gtrk client segment --no 12 --json
|
|
295
|
+
gtrk client frame --at 31.5 --json # 31.5 s on the timeline, not 31.5 s into the raw footage
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
- `--project` defaults to the current directory (`gtrk/project.gtrk` or `project.gtrk`).
|
|
299
|
+
- `frame` writes to `$GTRK_FRAMES_DIR` by default, or `gtrk-frames/<project-path-hash>/frame-<sec>.jpg` under the system temp folder — **never into the project folder** (projects get packed up whole). `-o <file.jpg>` picks the path; an existing file needs `--force`.
|
|
300
|
+
- When the bridge was not used, `--json` carries `bridge:{tried, reason}` (`no_file` / `not_running` / `not_open` / `protocol_too_new` / `protocol_too_old` / `timeout` / …) for troubleshooting; human output says on its first line whether it read files or rendered locally.
|
|
301
|
+
- The bridge: on start the client writes `~/.gitruck/client-bridge.json` (port, token, process id, protocol version) and listens on `127.0.0.1` only; the CLI sends the token and gives each request 10 seconds.
|
|
281
302
|
|
|
282
303
|
### `gtrk oralcut <raw>`
|
|
283
304
|
|
|
@@ -285,14 +306,17 @@ gtrk media boundaries "reference.mp4" --rate 4 --threshold 0.12 --transcript "re
|
|
|
285
306
|
|---|---|---|
|
|
286
307
|
| `-s, --script <file>` | Script txt (cutting against a script is more accurate) | Looks for a `.txt` next to the raw file; otherwise reconstructs the script automatically |
|
|
287
308
|
| `-p, --preset <p>` | Pacing `steady`\|`concise`\|`compact` (loose → tight) | `concise` |
|
|
288
|
-
| `-o, --out <dir>` | Custom output folder | `<raw-name>-video-project-<timestamp>` |
|
|
309
|
+
| `-o, --out <dir>` | Custom output folder | `<raw-name>-video-project-<timestamp>` (`-2`… is appended when the same name is taken within the same second; the Jianying draft folder follows the same rule) |
|
|
289
310
|
| `-f, --formats <list>` | Comma-separated list of the three formats | `gtrk,jianying,xml` |
|
|
290
311
|
| `--jianying-draft-dir <dir>` | Jianying draft root (or `auto`) | Reads the init config / auto-detects |
|
|
291
312
|
| `--reupload` | Force re-upload, ignoring the upload cache | off |
|
|
292
313
|
| `--no-open` | Do not open the output folder when done | **opens automatically by default** |
|
|
293
314
|
| `--json` | Machine-readable: stdout carries only the result JSON (for agents / scripts) | off |
|
|
315
|
+
| `--dry-run` | Probe and quote only (live price + estimate for this run): no extraction, no upload, no charge, no folders created; with `--json`, stdout is a single line `{ ok, dry_run:true, source, duration, pricing }` | off |
|
|
316
|
+
|
|
317
|
+
`--json` output (a single stdout line on success): `{ ok, outDir, files:{gtrk,jianying,xml}, jianyingDraftPath, rendered, report, errors, taskId, fileId, pricing }`; on failure the process exits non-zero, errors go to stderr, and stdout carries no JSON.
|
|
294
318
|
|
|
295
|
-
|
|
319
|
+
> **Billing notice**: before extracting audio, the CLI anonymously looks up the live price once and prints a "billing notice" line to stderr (unit price + an estimate for this run based on the source duration; the server's settlement is final). `pricing` in the `--json` result carries the same data. If the price cannot be fetched, the line reads "live price unavailable, the server's settlement is final" and the run continues. `long2short` works the same way.
|
|
296
320
|
|
|
297
321
|
> Every run **always writes a `result.json` into the output folder** (regardless of `--json`), and once submission succeeds it also drops a `task.json` breadcrumb. Even if stdout is lost or the run crashes midway, the report and `taskId` are on disk, and `oralcut-result` below can fetch everything back in seconds without re-running the cloud job.
|
|
298
322
|
|
|
@@ -349,7 +373,9 @@ gtrk patch set --project <dir> --track audio:1 --at 3.0 --volume 0.5
|
|
|
349
373
|
| `--to <sec\|Nf>` | Target position for `move` | — |
|
|
350
374
|
| `--in` / `--out` / `--set-in` / `--set-out` / `--slip` | The five `trim` semantics (first two relative, next two absolute, `--slip` shifts only the source window) | — |
|
|
351
375
|
| `--cut <sec\|Nf>` | Cut point for `split`. ⚠️ Distinct from the addressing flag `--at` | — |
|
|
352
|
-
| `--muted` / `--volume <gain>` / `--opaque` | Element-level parameters for `set` (`--volume` is linear gain, not dB) | — |
|
|
376
|
+
| `--muted` / `--no-muted` / `--volume <gain>` / `--opaque` | Element-level parameters for `set` (`--volume` is linear gain, not dB, and must be > 0; `--volume 0` fails with `volume_zero_use_muted` — use `--muted` to silence). Track mute is a master switch: if the clip's track is muted, `--no-muted` fails with `track_muted_master` — unmute the track's speaker in the client | — |
|
|
377
|
+
| `--audio-fade-in <sec\|Nf>` / `--audio-fade-out <sec\|Nf>` | `set`: audio fade-in / fade-out length (a video clip's own sound or an audio-track clip; particles and gaps are rejected); seconds or frames, whole milliseconds; 0 deletes the key; rejected outright if the two sides together exceed the clip duration (never scaled for you); `trim` / `split` maintain fades automatically | — |
|
|
378
|
+
| `--audio-track <index>` | `set`: move an audio clip onto an existing audio track; timing, material and effective volume / mute are kept, overlaps and track settings that cannot be preserved are rejected, an emptied source track is removed; moving a clip that is audible onto a muted track fails with `audio_track_target_muted` | — |
|
|
353
379
|
| `--total <sec\|Nf\|max>` | Top-level duration for `set` (project-scoped op, mutually exclusive with element addressing) | — |
|
|
354
380
|
| `--ops <file\|->` | Batch transaction: read once, compute all, validate all, write once; any failure writes **nothing** | off |
|
|
355
381
|
| `--dry-run` | Compute and validate only, do not write | off |
|
|
@@ -365,6 +391,14 @@ gtrk patch set --project <dir> --track audio:1 --at 3.0 --volume 0.5
|
|
|
365
391
|
> ⚠️ A gap cannot be addressed with `--clip ""`: the contract lets multiple gaps share that value, so it is
|
|
366
392
|
> not an address. Use `--track/--at` instead.
|
|
367
393
|
|
|
394
|
+
**Preserving and maintaining transitions** (`transition_in` / `transition_out` / `transition_next`; created in the client — the CLI does not produce transitions in this release and adds no flags):
|
|
395
|
+
|
|
396
|
+
- `split`: the entrance transition stays on the front part; the exit transition and the transition into the next clip go to the back part (`to_clip_id` unchanged); the new cut carries no transition.
|
|
397
|
+
- Every run (a single action or a whole `--ops` batch) maintains the changed tracks once before writing: a dangling `transition_next` is deleted (never re-pointed at the new neighbour), a transition that no longer fits is shortened frame by frame (head first, then tail), and one left under 1 frame is deleted; the receipt's `warnings[]` lists each `transition_dropped` / `transition_shortened`.
|
|
398
|
+
- The granule catalog is fetched at run time from `https://api.ai-mcn.tv:9000/cloud/static/assets/transitions/catalog.json` and cached at `~/.gitruck/cache/transitions/catalog.json` (the shared static-resource cache, also used by the client, refreshed after 24 hours; `composite lay` reads only the cache and never goes online); it is not shipped in the npm package. Offline, with the catalog unavailable, or for a granule missing from it, the transition is kept as is.
|
|
399
|
+
- Pre-existing transition violations unrelated to this edit only go to `preexisting` (`transition_invalid`) and do not block.
|
|
400
|
+
- When a lay command re-lays its own tracks, the number of replaced clips that carried transitions is reported in the log and the `--json` receipt as `replacedTransitionClips`, and each maintenance deletion or shortening is listed in `transitions[]`; `gtrk project export` normalizes the upload body before submitting (the file on disk is untouched; deletions and shortenings go to `result.json` under `transitions`) and prints each cloud `transition_not_carried` warning; `gtrk render` renders hard cuts in this release and counts `transition_not_carried` (`format: "cli_render"`).
|
|
401
|
+
|
|
368
402
|
### `gtrk matrix source-import` — Put selected video URLs into a B-roll beat
|
|
369
403
|
|
|
370
404
|
When the source videos are already known, send them directly to one beat instead of running keyword search:
|
|
@@ -390,6 +424,7 @@ Each source becomes one low-resolution full-window preview candidate. `source-im
|
|
|
390
424
|
| `--lay <n>` | How many candidate tracks to lay (`0` = produce the plan only, lay nothing) | `1` |
|
|
391
425
|
| `--top-k <n>` | Candidate cap per query (overrides the dispatch's shots; server cap is 50) | dispatch value |
|
|
392
426
|
| `--material-class <c>` | Material type `real_shot` \| `concept` (matrix-member endpoint only; overrides the show policy) | show policy |
|
|
427
|
+
| `--neighbors <n>` | Bring back up to n neighboring shots on each side of a matched concept clip, taken from its source film (0–5, matrix-member endpoint only). Results gain `source_ref` (source title, sequence number, start/end in the source; called `source` in the server docs) and `neighbors[]` (with `offset` / `contiguous` / `hit`). `matrix search` prints the run in source order plus a ready-to-run `gtrk matrix fetch` line; dispatch searches write neighbors into the plan and the project, folded in the client panel, and **never auto-laid**. Ignored with a notice on the public endpoint, `--local` and `--online`; invalid values fail before any request | `0` for `matrix search`; `2` for dispatch searches |
|
|
393
428
|
| `--score-floor <f>` | Fill-confidence floor: segments scoring below this are not used and the slot stays empty — in talking-head projects the candidate track **patches empty spots with solid black**. Raising it shrinks the candidate pool, and a span that cannot be filled at all becomes pure black over the talking-head, so check the hole warnings after adjusting | `0.2` |
|
|
394
429
|
| `--black-bed` | Legacy layout: lay one solid black bed track and leave candidate clips without a background fill (for older clients that do not read clip fills); `--no-black-bed` is now the default (no-op) | off |
|
|
395
430
|
| `--force-relay` | Strip and re-lay even when you have already edited a candidate track in the client (by default it refuses and keeps that track) — **this deletes the `broll-raw-*` material registrations of confirmed source clips, orphaning those files on disk** | off |
|
|
@@ -490,7 +525,7 @@ Consumes the `dispatch.mg` dispatch landed by `gtrk split`, laying html-particle
|
|
|
490
525
|
- **Callback and seek semantics** (`x-callback-driven` / `x-engine-api-override` / `x-raf-interval`, **always non-fatal, never blocks laying**): aligned with the same-named contract section. The engine MUST use `seek(t,false)` / `time(t)` / `progress(p)` when fixing a frame; particles may drive their picture from timeline callbacks but MUST NOT override `tl.seek` or replace `window.__timelines[…]`. These lint items are reminders only and do not require seek shims.
|
|
491
526
|
- **status** (`gtrk mg status --project <dir>`): summarizes the MG pipeline — total beats in `dispatch.mg` / how many source HTML files exist / how many are laid into `.gtrk`, annotating each beat (missing HTML / produced but not laid / laid).
|
|
492
527
|
- **render** (`gtrk mg render <particle.html> --duration <sec> [--out <dir>] [--yes]`): renders a single particle in the cloud, **independent of any project**, into a Jianying-readable qtrle transparent alpha MOV (the fine-cut supplement channel — when the rough cut is already exported to Jianying and one more motion graphic is needed, you can add it without going back to the client app). The chain = lint upfront (envelope = `--duration`; any fatal item is blocked locally, zero submission, zero billing) → **billing-estimate confirmation** (live price lookup; the CLI has no local HTML render engine, so the cloud billed task is the only path for standalone particles; `--yes` skips the prompt) → inline submission to the cloud → `<composition_id>.mov` landed with `task.json`/`result.json` breadcrumbs (recoverable by task_id after a crash). **Scope**: qtrle only for now (`--format webm` is explicitly refused — Jianying cannot read VP8-alpha), particle geometry must be positive integers, and `--duration` is required; the MOV comes out at the particle's declared `data-width` / `data-height` (a 1080×1920 portrait particle yields a 1080×1920 MOV). The output never enters `.gtrk` and never lands in the Jianying draft folder; qtrle is lossless and relatively large, suited to seconds-long particles. Note it shares a word with `gtrk render` (full-video rendering) but is a different thing.
|
|
493
|
-
- **fetch** (`gtrk mg fetch <query|block> [--top 3] [--all]` / `gtrk mg fetch --pick <block> --slot <beat> --project <dir>` / `--pick <block> --as <composition_id> --duration <sec> [--out <dir>]`): the **neutral particle source** from the HyperFrames registry — MG without a show skill. Candidate mode is **offline** (the snapshot ships with the package
|
|
528
|
+
- **fetch** (`gtrk mg fetch <query|block> [--top 3] [--all]` / `gtrk mg fetch --pick <block> --slot <beat> --project <dir>` / `--pick <block> --as <composition_id> --duration <sec> [--out <dir>]`): the **neutral particle source** from the HyperFrames registry — MG without a show skill. Candidate mode is **offline** (no network: it reads the locally cached catalog `~/.gitruck/cache/mg-registry/catalog.json`, or the snapshot that ships with the package; pinned to a source commit) and lists 2–3 blocks per query with compat flags and poster links; pick mode first checks the arguments and the landing spot locally, then refreshes the catalog once (unified static-resource delivery: refreshed every 24 hours, falling back to the cache and then the bundled snapshot), then fetches the block through the mirrors the catalog lists (Gitruck Cloud first, reachable from mainland China, then GitHub raw → jsDelivr fastly → jsDelivr gcore → gh-proxy; 8 s per mirror, **every copy is checked against its sha256 and byte count**, nothing is written if all of them fail; fetched blocks are cached under `~/.gitruck/cache/mg-registry/files/`) → eight mechanical rewrites (`<template>` wrap / id rename / drop data-start and fit the slot / sink the solid backdrop into a child / swap GSAP to the contract CDN / swap fonts to a CJK font provable in our runtime mirror / fit duration to the slot / letterbox scaling, never stretch) → `gtrk mg lint` (fatal items block the write) → lands at `<project>/mg/<composition_id>.html`. **A skeleton is not a deliverable**: the returned `editable` (copy / number arrays / colors) MUST be rewritten for the beat and the show before laying. Registry neutral blocks come in one geometry only, 1920×1080 (the size is baked into each block), and `--canvas` with any other size is refused; in slot mode, a project whose `.gtrk` `video_size` is not 16:9 (7% tolerance, so 4K landscape and 17:9 DCI still fetch) is refused before anything is downloaded or written — portrait / square projects use `--source text` (no `.gtrk` or an invalid `video_size` skips the check with a notice); `excluded` blocks are refused, `review` blocks (canvas / house-rule 8 shapes) can be fetched but need a real render check. Setting `GITRUCK_MG_REGISTRY_BASE` makes it the only mirror root for both the catalog and the blocks (`<root>/catalog.json`, `<root>/files/…`, i.e. the layout of a publish staging folder or the static disk); nothing is written to the local cache.
|
|
494
529
|
|
|
495
530
|
`--json` output: `{ ok, mode:"lay"|"lint"|"status", … }` (each mode carries its own fields, e.g. `laid` / `skipped` when laying, per-beat status for `status`). Laying mode additionally carries **`track_total`** (how many laid particles currently exist on the track), **`kept`** / **`kept_ids`** (how many are **left over from the previous round** and not re-laid this time, plus their `composition_id` list) and **`removed`** (how many old self-produced particles were stripped this run) — `laid` (this run), `track_total` (total on the track) and `kept` (left over) **must be read together**, and `track_total = laid + kept` always holds. Reading `laid` alone makes "lay 1, strip 20" look identical to "patch in 1", and reading only the first two hides the cost that "a few particles on the track are not from this round" (`kept_ids` and `skipped` overlap: something that failed to land this round is still there from the previous one). When not fully green it also carries a machine-readable **`reason`**: `skipped` (some were not laid) / `empty_queue` (**write-back refused**, the project was not modified, with `refused:true` and `blocked[]`) / `no_project` (project missing, nothing laid). Runs that actually wrote back also carry **`integrity`** (the material-on-disk self-check, identical in name and shape to `gtrk matrix`; see the previous section).
|
|
496
531
|
|
|
@@ -499,13 +534,14 @@ Consumes the `dispatch.mg` dispatch landed by `gtrk split`, laying html-particle
|
|
|
499
534
|
> **Aux overlay particles**: if `gtrk split` dispatched an `overlay` particle in some beat's `aux_layers`, it derives a `<beat>-aux<n>` composition entry into `dispatch.mg` — `gtrk mg` lays it too, giving you "a main visual on the base track plus a transparent conceptual diagram stacked on the same span".
|
|
500
535
|
> **Dual-read compatibility**: `dispatch.mg` (also reads the old `rrv_mg`), the source directory `mg/` (also reads the old `rrv/`), the material prefix `mg-` (also reads the old `rrv-`) — projects created before the de-branding need zero migration.
|
|
501
536
|
|
|
502
|
-
### `gtrk composite` — composite layer (plan / review / scaffold / build / lint / lay / shots / bake)
|
|
537
|
+
### `gtrk composite` — composite layer (plan / review / status / scaffold / build / lint / lay / shots / bake)
|
|
503
538
|
|
|
504
539
|
Once the rough cut, B-roll and subtitles are settled, turn chosen time windows into **composite particles**: one code particle takes over the whole frame for that span, and the client draws the talking head and B-roll into its slots. Driven by `/gtrk-composite` (which carries the layout rules and two checkpoints); purely local, zero billing.
|
|
505
540
|
|
|
506
541
|
```bash
|
|
507
542
|
gtrk composite plan --project <dir> [--mode full|auto|ranges] [--range 11,32 | --range u0004-u0009]... [--density 0.25]
|
|
508
543
|
gtrk composite review --project <dir> [--approve W01,W03] [--reject W02] [--adjust W04=80,90.9] [--add 140,150] [--approve-all]
|
|
544
|
+
gtrk composite status --project <dir> [--json]
|
|
509
545
|
gtrk composite scaffold --project <dir> [--only W03] [--force]
|
|
510
546
|
gtrk composite shots --project <dir> --material <material id or file> [--around <sec> --span <sec> | --from <sec> --to <sec>] [--every <sec>]
|
|
511
547
|
gtrk composite build --project <dir> [--only cp-w03] [--theme <css>] [--materials <json>]
|
|
@@ -518,6 +554,7 @@ gtrk composite bake --abi
|
|
|
518
554
|
|
|
519
555
|
- `plan`: writes candidate windows to `struct_meta.composite` in the `.gtrk` (that key only, atomic write-back; the same pattern as `gtrk split` writing `struct_meta.split`); the client outline's CP row draws them as proposal blocks. Also writes a review sheet `composite/plan.md`. Re-running keeps built windows and does not re-propose rejected ones. The text signals behind the suggested layout (lists / contrasts / numbers / steps) are recognised in Chinese and English; other languages rely on B-roll density only, and the review sheet says so.
|
|
520
556
|
- `review`: approve / reject / adjust / add windows, written back to the same key; later steps only act on approved windows.
|
|
557
|
+
- `status`: read-only progress summary — window counts per state, `pending` (approved but not yet laid), laid count, one row per window with its span re-projected onto the current timeline via `source_ranges` (empty with a note when the speech was cut). All zeros when there is no composite key.
|
|
521
558
|
- `scaffold`: writes a scene skeleton `composite/scenes/cp-wNN.html` and a context sheet `cp-wNN.context.md` for each approved window; existing scenes are not overwritten.
|
|
522
559
|
- `shots`: for picking footage — a contact sheet stamped with source time codes, shot cut points, and measured black bars (values for `data-crop`); it does not pick for you and does not touch the project.
|
|
523
560
|
- `build`: scene → self-contained particle `gtrk/assets/composite/<id>.html`. Resolution matches the infra `composite-particle-profile` rules byte for byte (frame-grid window, track identity, anchors, subtitle input, `inputs_hash`); style comes from `composite/theme.css`. Write anchor keywords as they appear in the sentence: matching ignores spaces, punctuation and case on both sides, and English matches whole words (`"cold brew"` works as written; `tea` does not match `teas`).
|
|
@@ -540,7 +577,7 @@ Project entry points that start from **a voice-over** instead of a talking-head
|
|
|
540
577
|
|---|---|
|
|
541
578
|
| `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/` |
|
|
542
579
|
| `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) |
|
|
543
|
-
| `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 |
|
|
580
|
+
| `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; must be > 0 — `0` does not mute and is rejected, use `gtrk patch set --muted` to silence), `--offset <ms>` sets the in-point |
|
|
544
581
|
| `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 |
|
|
545
582
|
| `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` |
|
|
546
583
|
| `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 |
|
|
@@ -561,7 +598,7 @@ gtrk project export --gtrk <project-file> --formats jianying,xml --out <output-d
|
|
|
561
598
|
|---|---|
|
|
562
599
|
| `--project <dir>` / `--gtrk <path>` | Locate the standard `gtrk/project.gtrk`, or explicitly select a project file; use one of the two |
|
|
563
600
|
| `-f, --formats <list>` | `xml`, `fcpxml`, `otio`, `jianying`, `capcut`, `gtrk`; default `jianying,xml`; legacy fine-grained names are also accepted |
|
|
564
|
-
| `--jianying-draft-dir <dir>` | Jianying/CapCut draft root; when omitted, use user config and standard locations |
|
|
601
|
+
| `--jianying-draft-dir <dir>` | Jianying/CapCut draft root; when omitted, use user config and standard locations. The draft lands in `<draft root>/<output folder name>`; on a name clash it gets `-2`… with a warning, and the existing draft is left untouched |
|
|
565
602
|
| `--no-particles` | Skip MG particle pre-rendering while continuing structural export; skipped particles are recorded in the result |
|
|
566
603
|
| `--particle-concurrency <n>` | Particle qtrle pre-render concurrency, 1–8, default 6 |
|
|
567
604
|
|
|
@@ -615,7 +652,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
|
|
|
615
652
|
| `image_matting` | One image (phone photos with an EXIF orientation are uprighted to their display orientation before upload; the original is untouched) | Transparent-background png (`--param` can request a backing plate) | Queried live before the run | Live |
|
|
616
653
|
| `image_blackborder_remove` | One local image | Image with black borders removed | Queried live before the run | Live |
|
|
617
654
|
| `image_canvas_adapt` | One local image; optional target width/height and `normal` / `rectangle` / `square` | Aspect-adapted image | Queried live before the run | Live |
|
|
618
|
-
| `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 |
|
|
655
|
+
| `image_purify` | One local image; optional `full_screen` / `region` and region boxes, optional `--redraw` mode (only material you have the rights to process) | Image cleaned of watermarks, logos or overlays | Queried live before the run | Live |
|
|
619
656
|
| `video_matting` | One video (**≤ 10 minutes**, uploaded as-is with no proxy) | Transparent-background webm | Queried live before the run | Live |
|
|
620
657
|
| `video_blackborder_remove` | One local video | Video with black borders removed | Queried live before the run | Live |
|
|
621
658
|
| `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 |
|
|
@@ -632,7 +669,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
|
|
|
632
669
|
| `audio_tts_clone` | **No file**: one of `--text`/`--text-file` (≤ 5000 characters) plus a required `--speaker`; optional language/format/speed/segmentation/subtitles/**sentence pause** (`--fragment-interval <sec>`, **in-house voices only**; cloud voices **return an error** rather than silently ignoring it — the valid range is enforced server-side and stated in that error) | Voice-over audio wav/mp3 (plus optional subtitles); billed by character count — the unit and unit price come from what `gtrk tool list` shows live | Queried live before the run | Live |
|
|
633
670
|
| `video_ai_subtitle` | One video or audio file; `--language <code>` required; optional `--translate-language`, `--need-render`, `--need-pure`, `--subtitle-type`, `--subtitle-color`. By default only locally extracted audio is uploaded (the raw file never leaves your machine) | `.ass` subtitles + optional burned-in / subtitle-stripped `.mp4` + `result-output.json` (summary + word-level timeline) | Queried live before the run | Live |
|
|
634
671
|
| `subtitle_translate` | One **subtitle file** `.ass` / `.srt`; **both** `--language <code>` and `--translate-language <code>` are required; optional `--output-format`, `--line-mode`, `--bilingual`, `--subtitle-type`, `--subtitle-color`, `--canvas <WxH>`. No speech recognition | Translated subtitles `.ass` or `.srt` + `result-output.json` (entry counts + degradation flags) | Queried live before the run | Live |
|
|
635
|
-
| `video_translate_dub` | One video or audio file (**≤ 120 minutes**, uploaded whole); **all three of** `--language <source>`, `--translate-language <target>`, `--speaker <clone or voice code>` are required; optional `--ref <reference audio or video>` (only with `clone`; cloning someone else's voice requires that person's consent), `--ref-lang`, `--no-keep-bgm`, `--fit-policy`, `--speed-band <min,max>`, `--subtitle-mode`, `--subtitle-type`, `--project-formats <comma-separated>` (default: `.gtrk` only; add `jianying` to get a Jianying draft placed straight into your Jianying drafts folder), `--jianying-draft-dir`; valid values are decided server-side. Only the audio is replaced — the picture stays as it is (no lip sync); long sources take 15+ minutes | Dubbed video `<input-name>-dub.mp4` (`.mp3` for audio input) + `dub.wav` / `bgm.wav` + `.srt` subtitles + `transcript.json` + project files in per-format subfolders (`gtrk/`, `jianying/` …) + `result-output.json` (dub alignment report; includes `errors` when a side artifact is missing, without failing the run) | Queried live before the run | Live |
|
|
672
|
+
| `video_translate_dub` | One video or audio file (**≤ 120 minutes**, uploaded whole); **all three of** `--language <source>`, `--translate-language <target>`, `--speaker <clone or voice code>` are required; optional `--ref <reference audio or video>` (only with `clone`; cloning someone else's voice requires that person's consent), `--ref-lang`, `--no-keep-bgm`, `--fit-policy`, `--speed-band <min,max>`, `--subtitle-mode`, `--subtitle-type`, `--project-formats <comma-separated>` (default: `.gtrk` only; add `jianying` to get a Jianying draft placed straight into your Jianying drafts folder — re-running the same source overwrites its previous draft, while a same-named source from another folder gets `…-2` instead), `--jianying-draft-dir`; valid values are decided server-side. Only the audio is replaced — the picture stays as it is (no lip sync); long sources take 15+ minutes | Dubbed video `<input-name>-dub.mp4` (`.mp3` for audio input) + `dub.wav` / `bgm.wav` + `.srt` subtitles + `transcript.json` + project files in per-format subfolders (`gtrk/`, `jianying/` …) + `result-output.json` (dub alignment report; includes `errors` when a side artifact is missing, without failing the run) | Queried live before the run | Live |
|
|
636
673
|
| `video_long2short_pro` | One long video (uploaded whole); `--language <code>` required; optional `--output-language`, `--main-topic`, `--output-size`, `--no-jump-cut`, `--duration-pref`, `--max-clip-sec`, `--split-screen`, `--split-orientation`, `--speed-factor`, `--no-camera-move`, `--no-subtitle`, `--subtitle-translate-language` | Finished clips `clip{i}.mp4` + the human-readable report `clips.md` (including polish-degradation details) + `result-output.json` | Queried live before the run | Live |
|
|
637
674
|
| `audio_separation` | One audio file; optional `--mode fast\|turbo` | Vocal and accompaniment audio (one or two items, depending on what is returned) | Queried live before the run | Live |
|
|
638
675
|
| `audio_speaker_split` | One audio file; optional `--only-struct` | Per-speaker `.wav` stems + a `spoken_list` timeline (`result-output.json`) | Queried live before the run | Live |
|
|
@@ -643,7 +680,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
|
|
|
643
680
|
| `piano_audio_enhance` | One audio file | High-quality WAV + accompanying MIDI (two artifacts) | Queried live before the run | Live |
|
|
644
681
|
| `image_to_square` | One image; optional `--max-line <px>` (≤ 20000) | Square image | Queried live before the run | Live |
|
|
645
682
|
| `image_to_live` | One image | A short video of about 4 seconds `.mp4` (silent); or an Android motion photo `.jpg` plus the same clip as a companion `.mp4` | Queried live before the run | Live |
|
|
646
|
-
| `image_classic_template` | **Several images** +
|
|
683
|
+
| `image_classic_template` | **Several images** + `--main-title` (required for covers; may be omitted with `--template-mode image`, collage only); optional subtitle/mode/ratio/quality/count/layout | Finished cover/collage (text/pic/render groups, possibly several images) | Queried live before the run | Live |
|
|
647
684
|
| `image_vertical_stitch` | **Several images** (order = top-to-bottom stitching order) | One vertically stitched long image | Queried live before the run | Live |
|
|
648
685
|
| `video_split_screen` | **2–16 video segments** (multiple positionals); the precise tier uses `--clips-json` (entries `{input:0-based index, begin_time_ms, end_time_ms, crop}`, millisecond time base); nine optional layout/aspect/audio parameters | One split-screen video (its length matches the shortest segment) | Queried live before the run | Live |
|
|
649
686
|
| `mad` | One material folder (3–10 videos) + optional `--bgm` | An AE master-composition project `.jsx` (AE only) | Only `--bgm` triggers a live price query | Live |
|
|
@@ -660,8 +697,9 @@ The seven shared video tools — black-border removal, aspect adaptation, stabil
|
|
|
660
697
|
- `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.
|
|
661
698
|
- `gtrk tool image_purify ./photo.jpg [--json]` — clean watermarks, logos or overlays from an image you have the rights to process.
|
|
662
699
|
- `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.
|
|
700
|
+
- `gtrk tool image_purify ./photo.jpg --redraw [--json]` — Redraw mode: an image-editing model regenerates the whole image, which also clears semi-transparent or grid watermarks that cover it; with `--purify-scope region` only the inside of the boxes is replaced and everything outside stays identical to the original. **Priced separately** (the pre-run quote uses the redraw tier), with no free runs; the image is sent to a third-party model service outside mainland China and details may differ slightly from the original; if the content review refuses it, the task fails (error code 6054) and credits are refunded. `--params-json '{"purify_method":"redraw"}'` also works.
|
|
663
701
|
- `gtrk tool video_blackborder_remove ./clip.mp4 [--json]` — automatically crops black borders from one video while keeping the original audio.
|
|
664
|
-
- `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start
|
|
702
|
+
- `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 1.5 --clip-end 4 --without-audio [--json]` — video aspect conversion; `--clip-start/--clip-end` are start/end times in seconds (decimals allowed; `--clip-start` must be less than the video duration, `--clip-end` must be greater than `--clip-start`, values past the end stop at the end), omitted fields use the server defaults, and the canvas mode accepts only `normal`, `rectangle`, `square`.
|
|
665
703
|
- `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.
|
|
666
704
|
- `gtrk tool video_vaporwave ./clip.mp4 --vaporwave-filter "灼熱苦夏" [--json]` — add a vaporwave filter using an exact preset name; omitting it explicitly uses `愈漸升溫`.
|
|
667
705
|
Before video cleanup, ask the user to choose fast FFmpeg blurring (basic results, visible traces possible) or slower RAFT content repair (usually more natural, not guaranteed lossless restoration). There is no default. Replace `<chosen-mode>` with the user-selected `ffmpeg` or `raft`; never switch modes after a failure without their agreement. The top-level `gtrk purify` uses `--purify-func-type`; detection, local editing and empty lists do not require a mode. Unsubmitted legacy journals need an explicit mode on resume; submitted jobs retain their original mode.
|
|
@@ -686,7 +724,7 @@ Before video cleanup, ask the user to choose fast FFmpeg blurring (basic results
|
|
|
686
724
|
- `gtrk tool piano_audio_enhance ./piano.mp3` — piano recording restoration, producing a high-quality WAV as the main artifact plus a companion MIDI.
|
|
687
725
|
- `gtrk tool image_to_square ./long.jpg [--max-line 8000]` — long image to square; `--max-line` defaults to 4000 and caps at 20000.
|
|
688
726
|
- `gtrk tool image_to_live ./photo.jpg [--output-format motion_photo]` — bring a still photo to life. By default the artifact is a silent `.mp4` video of about 4 seconds; `--output-format motion_photo` instead delivers an **Android motion photo** (a single `.jpg` with the clip embedded after the still image, so a gallery plays it on long-press), plus the same clip as a companion `.mp4`. Both formats cost the same. Compatibility: Android galleries that support the standard recognise and play it; **iOS does not** and shows a plain still image; a few Android models may only ever show the still.
|
|
689
|
-
- `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — title + several images into a cover/collage; `--output-pic-count`/`--output-text-count` are clamped to ≤ 20 by the server.
|
|
727
|
+
- `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — title + several images into a cover/collage; `--output-pic-count`/`--output-text-count` are clamped to ≤ 20 by the server. For a collage with no title, add `--template-mode image` and `--main-title` can be left out. A title containing characters the cover fonts cannot draw (emoji and the like) is rejected by the server before the task is created (error code 6046, no charge).
|
|
690
728
|
- `gtrk tool image_vertical_stitch top.png mid.png bottom.png` — stitch several images vertically in the order given.
|
|
691
729
|
- `gtrk tool video_split_screen a.mp4 b.mp4 --output-ratio 16:9` — simple tier: automatic split-screen layout over the whole clips (reaction / side-by-side comparison).
|
|
692
730
|
- `gtrk tool video_split_screen a.mp4 b.mp4 --clips-json '[{"input":0,"begin_time_ms":0,"end_time_ms":5000},{"input":1,"crop":{"x":0.1,"y":0,"width":0.8,"height":1}}]'` — precise tier: specify each segment's millisecond range and normalized crop box by 0-based index; the same file can appear several times to fill several windows.
|
|
@@ -749,7 +787,8 @@ A QC pass runs automatically afterwards and writes `.qc.json` (`--no-qc` skips i
|
|
|
749
787
|
- **It never downloads silently**: any missing-dependency path only errors out and points at this command (the packages are 30–90 MB and the distributed artifacts carry licence obligations, so a user or agent must trigger it explicitly).
|
|
750
788
|
- Downloads are always https with **strict sha256 verification**; anything that fails verification is discarded and never lands. Extraction uses the **system tar** (bundled with Windows 10+/macOS/Linux), pulling in no third-party decompression dependency.
|
|
751
789
|
- The resolution order is unchanged: `--ffmpeg-path` → `~/.gitruck/ffmpeg` → system `PATH`. The mirror only fills the middle slot and **never overrides an ffmpeg you installed yourself**.
|
|
752
|
-
- Fonts
|
|
790
|
+
- Fonts come from the font catalog of the unified static-resource delivery (`https://api.ai-mcn.tv:9000/cloud/static/assets/fonts/catalog.json`, the same one the desktop client reads): `--font` installs the subtitle font the catalog names (Source Han Sans CN Bold, `sourcehansanscn-bold.otf`), `--font-family <family…>` installs whole families by `font_id` or Chinese / English family name; every file is checked against its sha256 and byte count, and a failed download errors out without leaving a partial file. An installed font is recognised by its normalised file name (the older `SourceHanSansCN-Bold.otf` counts too); `--force` re-downloads it under the catalog's name.
|
|
791
|
+
- Fonts land in `~/.gitruck/fonts` (that folder is the cache; no second copy goes to `~/.gitruck/cache/`) and are supplied to burn-in through the ffmpeg `ass` filter's `fontsdir` — **never installed into the system font table, never written to the registry, never requiring administrator rights**.
|
|
753
792
|
- The distributed ffmpeg is a GPLv3 build, and the corresponding source is provided alongside the binaries (see `SOURCE.md` at the distribution point); **downloads carry no additional usage restrictions**.
|
|
754
793
|
- `gtrk upgrade [--check]` — upgrade the CLI to the latest version + refresh skills (config preserved); `--check` only reports.
|
|
755
794
|
- `gtrk skills install [--agents codex,workbuddy,comate,…] [--all] [--copy] [--dir <skills dir>]` — install/refresh agent skills on their own; by default the generic adapter and the gtrk supplement layer detect hosts automatically.
|
package/docs/reference.md
CHANGED
|
@@ -222,9 +222,9 @@ DO_NOT_TRACK=1 gtrk … # 业界通用的「不追踪」约定,同样生效
|
|
|
222
222
|
|
|
223
223
|
### `gtrk long2short` / `gtrk pip` / `gtrk qc` — 常用补充
|
|
224
224
|
|
|
225
|
-
- `gtrk long2short <input>`:按话题选段并跳剪,逐 clip 输出 gtrk / 剪映 / XML 工程;`--split-screen` 使用 720p 代理做智能分屏;`--output-size` 选择画幅;`--subtitle-out` 另产逐 clip 字幕;`--speed-factor 0.5–2.0` 把整体调速(保音高)写进逐 clip 工程(云端不渲染、不加价);`--camera-move` 让云端把推 / 拉镜头写成主轨片段的缩放关键帧(客户端与剪映可见可改,本地 `gtrk render` 与 PR 工程不呈现;`clips.md` 标「运镜 N 处」),之后 `gtrk patch` 裁剪 / 切分会同步维护关键帧。产物根另落整片转写 `json/transcript.json`,可对任一 clip 上客户端字幕轨:`gtrk subtitle lay --gtrk <clip 目录>/gtrk/<工程>.gtrk --transcript <产物根>/json/transcript.json --language <源语种>`(`--language` 为云端拆行语种,缺省 zh-CN
|
|
225
|
+
- `gtrk long2short <input>`:按话题选段并跳剪,逐 clip 输出 gtrk / 剪映 / XML 工程;`--split-screen` 使用 720p 代理做智能分屏;`--output-size` 选择画幅;`--subtitle-out` 另产逐 clip 字幕;`--speed-factor 0.5–2.0` 把整体调速(保音高)写进逐 clip 工程(云端不渲染、不加价);`--camera-move` 让云端把推 / 拉镜头写成主轨片段的缩放关键帧(客户端与剪映可见可改,本地 `gtrk render` 与 PR 工程不呈现;`clips.md` 标「运镜 N 处」),之后 `gtrk patch` 裁剪 / 切分会同步维护关键帧。产物根另落整片转写 `json/transcript.json`,可对任一 clip 上客户端字幕轨:`gtrk subtitle lay --gtrk <clip 目录>/gtrk/<工程>.gtrk --transcript <产物根>/json/transcript.json --language <源语种>`(`--language` 为云端拆行语种,缺省 zh-CN)。每次只选一种画幅,横竖屏分别运行;成片条数由内容决定。抽音频之前打一行实时价格与本次预估(stderr;`--json` 根结果的 `pricing`),长片想先报价就加 `--dry-run`(零抽取、零上传、零计费、不建目录)。完整参数见 `gtrk long2short --help`。
|
|
226
226
|
- `gtrk pip lay`:把同步录制的屏录或第二机位按口播剪点铺成画中画。两源需有可对齐的公共声音;低置信时先在客户端校准,再按提示恢复。运行 `gtrk pip lay --help` 查看输入、形状、位置和偏移参数。
|
|
227
|
-
- `gtrk qc <成片>`:检查闪帧、黑帧、冻结、音量和同步问题;用 `--gtrk` 提供工程上下文,`--fail-on`
|
|
227
|
+
- `gtrk qc <成片>`:检查闪帧、黑帧、冻结、音量和同步问题;用 `--gtrk` 提供工程上下文,`--fail-on` 控制管线门槛。带 `--gtrk` 时,段内跳切和判为严重的过短镜头会标出所在 beat 与槽位,并列出同一 beat 里还没用上的候选段(取自工程的 `split/broll-plan.json`,按画面稳定程度排序)。检查结论供定位问题,不自动替你修片。
|
|
228
228
|
|
|
229
229
|
### `gtrk matrix --online` — 当前源码的外部平台检索入口
|
|
230
230
|
|
|
@@ -263,13 +263,13 @@ gtrk transcript "D:/素材/采访视频.mp4" --lang zh-CN --out "D:/文字稿/
|
|
|
263
263
|
|
|
264
264
|
| 子命令 | 做什么 |
|
|
265
265
|
|---|---|
|
|
266
|
-
| `probe
|
|
266
|
+
| `probe <视频 \| 目录>` | 时长、显示尺寸(计入像素宽高比与旋转)、帧率与 VFR、有无音轨。传**目录**时只看这一层(不递归、跳过隐藏文件),挑出音视频(`mp4 mov mkv avi webm m4v mts` / `wav mp3 m4a flac aac ogg opus`)逐个探测、按文件名排序:`{mode:"probe-dir", files:[{path, kind, duration, codec, width?, height?, fps?, hasAudio}], skipped:[{path, reason}], truncated?}`;坏文件进 `skipped` 不中断,超过 200 个只探前 200 个 |
|
|
267
267
|
| `lines <转写稿>` | 逐句 `u<id> 起–止 文本`;`--find <台词>` 列出每处出现与字级起止 |
|
|
268
268
|
| `frames <视频>` | 按 `--at` / `--every` / `--frames` / `--every-frame` 取单帧;带 `--transcript` 或 `--label` 时帧下方加标签 |
|
|
269
269
|
| `tile <视频>` | 一张带标签的网格(≤60 格) |
|
|
270
270
|
| `tiles <视频>` | 分页网格(`--cols × --rows`,缺省 3×3);`--ranges <json>` 一次看多段;`--every-frame` 每段连续解码、保留每一原始帧 |
|
|
271
271
|
| `boundaries <视频>` | 视觉变化候选(`--rate` 缺省 12、`--threshold` 缺省 0.1、`--min-gap` 合并近邻);带 `--transcript` 时标注对着哪句话。**是机械证据,不是镜头判定** |
|
|
272
|
-
| `cut <视频>` | 截一段证据片(`.mp4/.mov/.mkv
|
|
272
|
+
| `cut <视频>` | 截一段证据片(`.mp4/.mov/.mkv`,重编码)。带 `--copy` 改为**流拷贝**:不重编码、秒级截长毛片(如超 2 小时的毛片分段),起点落在 `--start` 之前最近的关键帧,回执 `seconds` 是实际时长、`note` 注明关键帧对齐;`-o` 须与源片同扩展名,纯音频也收 |
|
|
273
273
|
|
|
274
274
|
```bash
|
|
275
275
|
gtrk media tiles "参考片.mp4" --frames 48 --cols 6 --rows 4 --cell 320 --transcript "精读/transcript.json" -o "精读/evidence/overview"
|
|
@@ -280,7 +280,28 @@ gtrk media boundaries "参考片.mp4" --rate 4 --threshold 0.12 --transcript "
|
|
|
280
280
|
- **区间**:`--start/--end`(秒或 `[hh:]mm:ss.mmm`),或 `--around <台词> [--occurrence n] [--padding s]` 按台词定位(须配 `--transcript`;台词多处出现时必须指定第几处,`lines --find` 可先列出)。
|
|
281
281
|
- **转写稿**:`gtrk transcript --json` 的产物(v1,含字级时码)原生可用,也认 `hypit.transcript@1`。转写稿须是这条视频的——时长 / 文件名对不上会在 stderr 告警。
|
|
282
282
|
- **标签**(画面下方,不遮原片字幕与图形):源片秒 · 时码(逐帧加帧号)· 句号 / 正在读的字与字级起止 / 所在整句(当前字高亮)。无字时写「此刻无字在读」「句间空隙」,不推断静音。标签用 libass 画,ffmpeg 缺 `ass` 滤镜时报错并指向 `gtrk deps install --ffmpeg`。
|
|
283
|
-
- **落点**:`-o`
|
|
283
|
+
- **落点**:`-o` 必填(`frames` 例外:设了 `$GTRK_FRAMES_DIR` 时缺省落其下的新目录),不落当前目录或源片旁;已存在不覆盖,`--force` 只覆盖本命令族的旧产物。`frames` / `tiles` 的产物目录含 `index.json`,逐格记录文件、时间、字与句号。逐帧单次上限 1800 帧。
|
|
284
|
+
|
|
285
|
+
### `gtrk client <子命令>` — 读编辑器里的工程
|
|
286
|
+
|
|
287
|
+
即剪客户端开着这个工程时,经本机通道读**活状态**(选中哪段、播放头、未存盘的改动、编辑器所见的画面);没开时读工程文件 / 本地渲染出帧。两条路输出同形,`source` 标明走的是哪条。**不依赖客户端**:没装、没开、开的是别的工程,三个子命令照样成功退出。
|
|
288
|
+
|
|
289
|
+
| 子命令 | 做什么 | `--json` 输出 |
|
|
290
|
+
|---|---|---|
|
|
291
|
+
| `state` | 工程摘要:各轨片段与轨上时码、工程时长;主轨(口播所在那条)片段带从 1 开始的 `no`。不输出整份 `.gtrk` | `{source:"client"\|"file", project, duration, tracks:[{track, kind, index, main?, clips:[{no?, clip_id, track_st, track_ed, duration, volume?}]}], selection, playhead, viewport}`;读文件时后三项为 `null` |
|
|
292
|
+
| `segment --no <N>` | 主轨第 N 段的轨上时码与口播文字(按转写句与轨上时码对位,同 `gtrk split` 投影视图口径;被剪掉的句不计入)。越界非 0 退出并说明共几段 | `{source, no, clip_id, track_st, track_ed, text}` |
|
|
293
|
+
| `frame --at <秒>` | 时间线这一刻合成后的一帧(`--width` 缺省 768)。客户端渲染时与编辑器所见一致;本地渲染零计费、不含 MG 颗粒(`note` 注明)。超出工程时长钉到末帧并说明 | `{source:"client"\|"local-render", at, path, width, height, note?}` |
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
gtrk client state --project . --json
|
|
297
|
+
gtrk client segment --no 12 --json
|
|
298
|
+
gtrk client frame --at 31.5 --json # 时间线上的 31.5 秒,不是毛片的 31.5 秒
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
- `--project` 缺省当前目录(`gtrk/project.gtrk` 或 `project.gtrk`)。
|
|
302
|
+
- `frame` 的图缺省写到 `$GTRK_FRAMES_DIR`,未设时为系统临时目录下 `gtrk-frames/<工程路径哈希>/frame-<秒>.jpg`,**不写进工程目录**(工程会被整体打包带走);`-o <file.jpg>` 指定落点,已存在须 `--force`。
|
|
303
|
+
- 没走成本机通道时 `--json` 带 `bridge:{tried, reason}`(`no_file` / `not_running` / `not_open` / `protocol_too_new` / `protocol_too_old` / `timeout` / …)便于排障;人读输出首行注明读的是文件还是本地渲染。
|
|
304
|
+
- 本机通道:客户端启动时写 `~/.gitruck/client-bridge.json`(端口、口令、进程号、协议版本),只监听 `127.0.0.1`;CLI 带口令请求、单次 10 秒超时。
|
|
284
305
|
|
|
285
306
|
### `gtrk oralcut <毛片>`
|
|
286
307
|
|
|
@@ -288,14 +309,17 @@ gtrk media boundaries "参考片.mp4" --rate 4 --threshold 0.12 --transcript "
|
|
|
288
309
|
|---|---|---|
|
|
289
310
|
| `-s, --script <file>` | 文字稿 txt(有稿按稿剪、更准) | 探毛片同名 `.txt`;无则无稿智能重建 |
|
|
290
311
|
| `-p, --preset <p>` | 节奏 `steady`\|`concise`\|`compact`(松→紧) | `concise` |
|
|
291
|
-
| `-o, --out <dir>` | 自定义产物目录 | `<毛片名>-video-project
|
|
312
|
+
| `-o, --out <dir>` | 自定义产物目录 | `<毛片名>-video-project-<时间戳>`(同目录同名同秒撞名时追加 `-2`…;剪映草稿文件夹同理) |
|
|
292
313
|
| `-f, --formats <list>` | 三方格式逗号分隔 | `gtrk,jianying,xml` |
|
|
293
314
|
| `--jianying-draft-dir <dir>` | 剪映草稿根目录(或 `auto`) | 读 init 配置 / 自动探测 |
|
|
294
315
|
| `--reupload` | 强制重传,忽略上传缓存 | 关 |
|
|
295
316
|
| `--no-open` | 完成后不自动打开产物目录 | **默认自动打开** |
|
|
296
317
|
| `--json` | 机读:stdout 只输出结果 JSON(给 agent / 脚本) | 关 |
|
|
318
|
+
| `--dry-run` | 只探测并报价(实时价格 + 本次预估),零抽取、零上传、零计费、不建任何目录;`--json` 时 stdout 单行 `{ ok, dry_run:true, source, duration, pricing }` | 关 |
|
|
319
|
+
|
|
320
|
+
`--json` 输出(成功时 stdout 单行):`{ ok, outDir, files:{gtrk,jianying,xml}, jianyingDraftPath, rendered, report, errors, taskId, fileId, pricing }`;命令失败则进程非 0 退出、报错走 stderr、stdout 无 JSON。
|
|
297
321
|
|
|
298
|
-
|
|
322
|
+
> **计费提示**:抽音频之前,CLI 匿名查一次官网实时价格,往 stderr 打一行「计费提示」(单价 + 按原片时长算的本次预估积分,以服务端结算为准);`--json` 结果的 `pricing` 是同一份数据。查不到时打「实时价格暂不可用,以服务端结算为准」,不阻断。`long2short` 同口径。
|
|
299
323
|
|
|
300
324
|
> 每次跑批都会把这份结果**恒写一份 `result.json` 到产物目录**(不受 `--json` 约束);提交成功后还会落一份 `task.json` 面包屑。即便 stdout 丢了、或中途崩了,报告与 `taskId` 都在盘上,可用下面的 `oralcut-result` 秒级取回、无需重跑云端。
|
|
301
325
|
|
|
@@ -350,8 +374,9 @@ gtrk patch set --project <dir> --track audio:1 --at 3.0 --volume 0.5
|
|
|
350
374
|
| `--to <sec\|Nf>` | `move` 的落点 | — |
|
|
351
375
|
| `--in` / `--out` / `--set-in` / `--set-out` / `--slip` | `trim` 的五种语义(前两个相对、中两个绝对、`--slip` 只换源窗) | — |
|
|
352
376
|
| `--cut <sec\|Nf>` | `split` 的切点。⚠️ 与寻址用的 `--at` 是两个参数 | — |
|
|
353
|
-
| `--muted` / `--volume <gain>` / `--opaque` | `set` 的元素级参数(`--volume` 是线性增益不是 dB
|
|
354
|
-
| `--audio-
|
|
377
|
+
| `--muted` / `--no-muted` / `--volume <gain>` / `--opaque` | `set` 的元素级参数(`--volume` 是线性增益不是 dB,须 > 0;`--volume 0` 报 `volume_zero_use_muted`,静音用 `--muted`)。轨静音是总开关:片段所在轨已静音时 `--no-muted` 报 `track_muted_master`,请在客户端点开轨喇叭 | — |
|
|
378
|
+
| `--audio-fade-in <sec\|Nf>` / `--audio-fade-out <sec\|Nf>` | `set`:音频淡入 / 淡出时长(视频轨原声或音频轨片段,颗粒与空档拒收);秒或帧、整毫秒;设 0 即删键;与另一侧之和超过片段时长即硬拒(不按比例缩);`trim` / `split` 自动维护淡变 | — |
|
|
379
|
+
| `--audio-track <index>` | `set`:将音频片段转入已有音轨;时码、素材和有效音量/静音不变,拒绝重叠或无法保真的轨级设置,移除变空的原轨;原本出声的片段移进静音轨报 `audio_track_target_muted` | — |
|
|
355
380
|
| `--total <sec\|Nf\|max>` | `set` 的顶层总长(工程级 op,与元素寻址互斥) | — |
|
|
356
381
|
| `--ops <file\|->` | 批量事务:一次读、全算、全校验、一次写;任一条失败**零写** | 关 |
|
|
357
382
|
| `--dry-run` | 只算与校验、不写文件 | 关 |
|
|
@@ -364,6 +389,14 @@ gtrk patch set --project <dir> --track audio:1 --at 3.0 --volume 0.5
|
|
|
364
389
|
>
|
|
365
390
|
> ⚠️ 空档(gap)不能用 `--clip ""` 寻址:契约允许多个 gap 共享该取值,它不构成地址;用 `--track/--at`。
|
|
366
391
|
|
|
392
|
+
**转场字段的保真与维护**(`transition_in` / `transition_out` / `transition_next`;由客户端产生,CLI 本期不产出、无新参数):
|
|
393
|
+
|
|
394
|
+
- `split`:入场转场留前段,出场转场与接下一段的转场归后段(`to_clip_id` 不变),新切口不带转场。
|
|
395
|
+
- 每次运行(单发或整个 `--ops` 批)写回前对有变化的轨统一维护:悬空的 `transition_next` 删除(不改挂新邻居),放不下的按帧缩短(先头后尾),不足 1 帧删除;回执 `warnings[]` 逐条给 `transition_dropped` / `transition_shortened`。
|
|
396
|
+
- 颗粒目录运行时从 `https://api.ai-mcn.tv:9000/cloud/static/assets/transitions/catalog.json` 拉取,缓存 `~/.gitruck/cache/transitions/catalog.json`(统一静态资源缓存,与客户端共用,24 小时重拉;`composite lay` 只读缓存不联网),不随 npm 包分发;离线、目录不可用或颗粒不在目录里时转场原样保留。
|
|
397
|
+
- 与本次编辑无关的存量转场违例只进 `preexisting`(`transition_invalid`),不阻断。
|
|
398
|
+
- 铺轨命令重铺自产轨时,被替换片段带转场的条数在日志与 `--json` 回执里出 `replacedTransitionClips`,维护的删缩逐条列在 `transitions[]`;`gtrk project export` 上行前对上行体规整(盘上不动,删缩写进 `result.json` 的 `transitions`),云端 `transition_not_carried` 告警逐条打出;`gtrk render` 本期按硬切出片并计 `transition_not_carried`(`format: "cli_render"`)。
|
|
399
|
+
|
|
367
400
|
### `gtrk matrix source-import` — 指定视频链接进入某个 B-roll beat
|
|
368
401
|
|
|
369
402
|
当你已经选定视频链接,不需要关键词检索时,可以把它们直接送进指定 beat:
|
|
@@ -389,6 +422,7 @@ gtrk matrix source-import --project <工程目录> --beat B07 --urls links.txt -
|
|
|
389
422
|
| `--lay <n>` | 候选铺轨数:平铺 N 条 B-roll 候选轨(`0` = 只出 plan 不铺轨) | `1` |
|
|
390
423
|
| `--top-k <n>` | 每 query 候选数上限(覆盖派单 shots;服务端上限 50) | 派单值 |
|
|
391
424
|
| `--material-class <c>` | 素材类型 `real_shot` \| `concept`(仅矩阵成员口;覆盖栏目策略) | 栏目策略 |
|
|
425
|
+
| `--neighbors <n>` | 命中的概念素材带回原片前后各 n 条相邻片段(0–5,仅矩阵成员口)。结果多出 `source_ref`(出处名、序号、原片起止;服务端文档里叫 `source`)与 `neighbors[]`(`offset` / `contiguous` / `hit` 等)。`matrix search` 人读输出按原片顺序列出整段,并给出现成的 `gtrk matrix fetch` 命令;派单检索把邻居写进 plan 与工程,客户端面板里折叠,**不参与自动铺轨**。公开口、`--local`、`--online` 带了会提示已忽略;非法值发请求前报错 | `matrix search` 为 `0`;派单检索为 `2` |
|
|
392
426
|
| `--score-floor <f>` | 填充置信度地板:segment score 低于此值不采纳、槽位留空——口播工程里留空处由候选轨**补纯黑片**。调高会收缩取材池,整段铺不满即纯黑压口播,调完先看空洞告警 | `0.2` |
|
|
393
427
|
| `--black-bed` | 旧形态:铺一条纯黑底垫轨、候选片段不带底板(给不认片段底板的老版客户端过渡用);`--no-black-bed` 已是缺省(无操作) | 关 |
|
|
394
428
|
| `--force-relay` | 候选轨已被你在客户端编辑过时仍强剥重铺(缺省会拒铺并保留那条轨)——**会删掉已确认原片的 `broll-raw-*` 素材登记、盘上原片成孤儿** | 关 |
|
|
@@ -518,12 +552,12 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
|
|
|
518
552
|
- **回调与 seek 语义**(`x-callback-driven` / `x-engine-api-override` / `x-raf-interval`,**恒非致命、不拦铺轨**):对齐契约同名一节。引擎定帧 MUST 使用 `seek(t,false)` / `time(t)` / `progress(p)`;颗粒可用时间线回调驱动画面,但不得覆写 `tl.seek` 或替换 `window.__timelines[…]`。三项 lint 只作提醒,不要求作者添加垫片。
|
|
519
553
|
- **status**(`gtrk mg status --project <dir>`):汇总 MG 流水线——`dispatch.mg` beat 总数 / 已产源 HTML 数 / 已铺进 `.gtrk` 数,并逐 beat 标注(缺 HTML / 已产未铺 / 已铺)。
|
|
520
554
|
- **render**(`gtrk mg render <颗粒.html> --duration <sec> [--out <dir>] [--yes]`):**脱离工程**把单颗颗粒云渲成剪映可读的 qtrle 透明 alpha MOV(精剪补给口——粗剪导剪映后缺一颗动态图,不回客户端就能补)。链路 = lint 前置(包络 = `--duration`,任一致命项本地拦截、零提交零计费)→ **计费预估确认**(实时查价;CLI 无本地 HTML 渲染引擎,独立颗粒唯一路 = 云渲计费任务,`--yes` 跳过确认)→ 内联提交云端 → `<composition_id>.mov` 落盘 + `task.json`/`result.json` 面包屑(崩溃可凭 task_id 恢复)。**射程**:首发只出 qtrle(`--format webm` 明确拒绝,剪映不吃 VP8-alpha)、颗粒几何须为正整数、`--duration` 必填;MOV 按颗粒声明的 `data-width` / `data-height` 原尺寸出(竖屏 1080×1920 颗粒出 1080×1920 MOV)。产物不进 `.gtrk`、不写剪映草稿目录;qtrle 无损体积偏大,适合秒级颗粒。注意与 `gtrk render`(整片成片渲染)同词不同物。
|
|
521
|
-
- **fetch**(`gtrk mg fetch <检索词|块名> [--top 3] [--all]` / `gtrk mg fetch --pick <块名> --slot <beat> --project <dir>` / `--pick <块名> --as <composition_id> --duration <sec> [--out <dir>]`):**registry 中性颗粒源**——没建栏目也能出 MG
|
|
522
|
-
- **fetch --source text**(`gtrk mg fetch --source text <检索词> [--top 3] [--offline]` / `--pick <模板 id> --slot <beat> --project <dir>` / `--pick <模板 id> --as <composition_id> [--out <dir>]`):**同合云自家的文字特效模板库**——与中性块是两条路。模板是我方 clean-room 重写的**成品**(配色与排版已做过),**不做机械改写、MUST NOT 直接改 HTML**。每颗内嵌产生它的 IR 与双哈希,颗粒因此自带出身证明(三态 `ir` / `detached` / `html`);手改一个字节就掉成 `detached`,云端改写会拒绝它(`gtrk mg lint` 报非致命的 `x-ir-detached
|
|
555
|
+
- **fetch**(`gtrk mg fetch <检索词|块名> [--top 3] [--all]` / `gtrk mg fetch --pick <块名> --slot <beat> --project <dir>` / `--pick <块名> --as <composition_id> --duration <sec> [--out <dir>]`):**registry 中性颗粒源**——没建栏目也能出 MG。候选态**离线**(零网络:读本机缓存的目录 `~/.gitruck/cache/mg-registry/catalog.json`,没有就用随包快照;钉死来源 commit)按检索词列 2–3 件(含 compat 标记与海报链接);取块态先在本地判完参数与落点,再刷新一次目录(统一静态资源下发,24 小时一刷,拉不到用缓存、再用随包),然后按目录里的镜像取块(同合云优先、大陆可达,之后 GitHub raw → jsDelivr fastly → jsDelivr gcore → gh-proxy 回源;每个镜像 8 s,**每份字节都校 sha256 与字节数**,全部失败零落盘;取到的块缓存在 `~/.gitruck/cache/mg-registry/files/`)→ 机械改写八条(`<template>` 包裹 / 改 id / 去 data-start 贴坑位 / 实心底下沉子层 / GSAP 源换契约 CDN / 字体换运行时镜像可证的 CJK 字体 / 时长贴坑位 / 信箱缩放不拉伸)→ `gtrk mg lint` 致命项不过不落盘 → 落 `<project>/mg/<composition_id>.html`。**骨架不是成品**:返回的 `editable`(文案 / 数值数组 / 色值)MUST 按 beat 与栏目改写后再铺。registry 中性块只有 1920×1080 一种几何(尺寸写死在块里),`--canvas` 给其它画幅拒绝;派单模式下工程 `.gtrk` 的 `video_size` 比例不是 16:9(容差 7%:4K 横屏与 DCI 17:9 照取)在下载前拒、不落盘,竖屏 / 方形工程走 `--source text`(找不到 `.gtrk` 或 `video_size` 不合法时不比对、照取并提示);`excluded` 件拒取,`review` 件(canvas / 铁律 8 高危形态)可取但须真渲验收。`GITRUCK_MG_REGISTRY_BASE` 设了就只用它当目录与取块的镜像根(`<根>/catalog.json`、`<根>/files/…`,即统一发布的暂存包 / 静态盘布局),不写本机缓存。
|
|
556
|
+
- **fetch --source text**(`gtrk mg fetch --source text <检索词> [--top 3] [--offline]` / `--pick <模板 id> --slot <beat> --project <dir>` / `--pick <模板 id> --as <composition_id> [--out <dir>]`):**同合云自家的文字特效模板库**——与中性块是两条路。模板是我方 clean-room 重写的**成品**(配色与排版已做过),**不做机械改写、MUST NOT 直接改 HTML**。每颗内嵌产生它的 IR 与双哈希,颗粒因此自带出身证明(三态 `ir` / `detached` / `html`);手改一个字节就掉成 `detached`,云端改写会拒绝它(`gtrk mg lint` 报非致命的 `x-ir-detached`)。目录从同合云取(统一静态资源下发,缓存在与客户端共用的 `~/.gitruck/cache/text-templates/`,24 小时一刷):拉到即以远端为准(不比版本号),拉不到用本机缓存、再用随包那份并**明示**(候选态因此永远离线可用;`--offline` 只读本机缓存与随包);旧缓存 `~/.gitruck/text-templates/` 已废弃、不再读。取块每份字节都校 sha256 与字节数,全部失败零落盘。`GITRUCK_TEXT_TEMPLATE_BASE` 设了就只用它当目录与正文的镜像根(`<根>/catalog.json`、`<根>/files/…`),不写本机缓存。
|
|
523
557
|
**落点与时长由命令钉定**:派单模式的 `composition_id` 取自 `dispatch.mg` 那条(`<工程slug>-<beatId>`,不是 `--slot` 收的 beat id),颗粒内嵌 IR 的 `id` 与 `canvas.duration` 被钉到「期望 id」与「坑位包络 + 0.3s 余量」(铁律⑦,贴模板末尾的层跟着钉),再走 `mg compile` 同一条本地编译链重编——产物仍是 `ir` 态,`1-cid-expect` 天然对得上。独立模式 `--as` 同样改写颗粒内部 id,`--duration` 钉时长;`--slot` 与 `--duration` 互斥。两者都没改、且目标画幅就是模板的 1920×1080 时原字节落盘。
|
|
524
558
|
**画幅**:按目标画幅编(IR 住在 1920 参考系,画幅是编译入参)。派单模式缺省取工程 `.gtrk` 的 `video_size`(显式 `--canvas` 与它不符当场拒;找不到 `.gtrk` 时按 1920×1080 编并提示补 `--canvas`),独立模式取 `--canvas`、不给即 1920×1080;`--json` 带 `canvas` 与 `canvas_from`(`flag` / `project` / `reference`)。
|
|
525
559
|
- **compile**(`gtrk mg compile <ir.json | 颗粒.html> [--canvas <WxH>] [--out <dir>] [--remote]`):把 IR **确定性编译**成颗粒(**0 积分**)。改字、换色、改字号描边阴影、改时长都走它——改 IR 再编,比手改 HTML 干净,且颗粒保持 `ir` 态(云端还能继续调)。缺省在本地编(零请求、断网可用,与服务端编译器逐字节等价);`--remote` 改走服务端,留给排查与对拍。给颗粒 HTML = 按它内嵌的 IR 重置回模板。`--canvas` 是目标画幅:不给时重置沿用那颗自己的画幅、`.ir.json` 按 1920×1080;`--remote` 把同一画幅交给服务端,产物画幅与请求不符(旧服务端不认画幅)时不落盘。
|
|
526
|
-
- **edit**(`gtrk mg edit <颗粒.html> --say "<一句话>" [--n 1|3] [--pick <k>] [--yes]`):自然语言改写文字模板颗粒,经云端模型链出候选。`--n` 只收 1 或 3,**它就是计费单位数**(
|
|
560
|
+
- **edit**(`gtrk mg edit <颗粒.html> --say "<一句话>" [--n 1|3] [--pick <k>] [--yes]`):自然语言改写文字模板颗粒,经云端模型链出候选。`--n` 只收 1 或 3,**它就是计费单位数**(6 积分/候选,前 200 个之后 8 积分/候选;首次与改写同价、无免费次数)。`detached` / 无内嵌 IR 的颗粒**本地就拒**,不提交云任务、不花钱。候选带 `scope`:`L1` = 在模板可调范围内、`L2` = 越界即新生成(**不是失败**);服务端说做不到时给一句 `refusal`,命令如实转述并以非 0 退出码区分于网络错误。不给 `--pick` 就只落候选不动原文件;给了才替换并留 `<cid>.bak.html`。
|
|
527
561
|
|
|
528
562
|
`--json` 输出:`{ ok, mode:"lay"|"lint"|"status", … }`(各模式带对应字段,如铺轨的 `laid` / `skipped`、status 的逐 beat 状态)。铺轨模式另带 **`track_total`**(轨上现存已铺数)、**`kept`** / **`kept_ids`**(其中**上轮遗留**、本次没重铺的颗数与 `composition_id` 清单)与 **`removed`**(本次被剥的旧自产颗粒数)——`laid`(本次)、`track_total`(轨上共)与 `kept`(上轮遗留)**要一起读**,恒有 `track_total = laid + kept`;只看 `laid` 会让「铺 1 颗、剥 20 颗」跟「补铺 1 颗」长得一模一样,只看前两个又会漏掉「轨上那几颗不是这一轮的版本」这条代价(`kept_ids` 与 `skipped` 会重叠:这轮没铺成、上一轮那条还在轨上)。非全绿时另带机读 **`reason`**:`skipped`(部分没铺上)/ `empty_queue`(**拒写回**,工程未被改动,另带 `refused:true` 与 `blocked[]`)/ `no_project`(工程缺失未铺轨)。真写回过的运行另带 **`integrity`**(素材落盘自检,与 `gtrk matrix` 同名同形,口径见上节)。
|
|
529
563
|
|
|
@@ -532,13 +566,14 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
|
|
|
532
566
|
> **aux 叠层颗粒**:`gtrk split` 若在某 beat 的 `aux_layers` 派了 `overlay` 颗粒,会派生 `<beat>-aux<n>` 合成条目进 `dispatch.mg`——`gtrk mg` 一并铺,实现「同段既有底轨主视觉、又叠透明概念图解」。
|
|
533
567
|
> **双读兼容**:`dispatch.mg`(读旧 `rrv_mg`)、源目录 `mg/`(读旧 `rrv/`)、素材前缀 `mg-`(读旧 `rrv-`)——去品牌化前的既有工程零迁移。
|
|
534
568
|
|
|
535
|
-
### `gtrk composite` — 合成层(plan / review / scaffold / build / lint / lay / shots / bake)
|
|
569
|
+
### `gtrk composite` — 合成层(plan / review / status / scaffold / build / lint / lay / shots / bake)
|
|
536
570
|
|
|
537
571
|
粗剪、B-roll、字幕都定了之后,把选定时间窗做成**合成颗粒**:一段时间内的整个画面由一颗代码颗粒接管,讲者与 B-roll 作为槽位由客户端画进去。由 `/gtrk-composite` 驱动(含编排规则与两个检查点);纯本地、零计费。
|
|
538
572
|
|
|
539
573
|
```bash
|
|
540
574
|
gtrk composite plan --project <工程> [--mode full|auto|ranges] [--range 11,32 | --range u0004-u0009]... [--density 0.25]
|
|
541
575
|
gtrk composite review --project <工程> [--approve W01,W03] [--reject W02] [--adjust W04=80,90.9] [--add 140,150] [--approve-all]
|
|
576
|
+
gtrk composite status --project <工程> [--json]
|
|
542
577
|
gtrk composite scaffold --project <工程> [--only W03] [--force]
|
|
543
578
|
gtrk composite shots --project <工程> --material <素材 id 或文件> [--around <秒> --span <秒> | --from <秒> --to <秒>] [--every <秒>]
|
|
544
579
|
gtrk composite build --project <工程> [--only cp-w03] [--theme <css>] [--materials <json>]
|
|
@@ -551,6 +586,7 @@ gtrk composite bake --abi
|
|
|
551
586
|
|
|
552
587
|
- `plan`:候选窗口写进 `.gtrk` 的 `struct_meta.composite`(只动这一个键、原子写回;与 `gtrk split` 写 `struct_meta.split` 同一套做法),客户端大纲 CP 行据此画提案块;另出审稿稿 `composite/plan.md`。重跑保留已做的、不再提用户不要的。「建议画面」用到的文字信号(列举 / 对照 / 数字 / 分点)识别中文与英文;其他语种只看 B-roll 密度,审稿稿里写明未识别。
|
|
553
588
|
- `review`:采纳 / 不要 / 调起止 / 补窗口,写回同一个键;后续步骤只处理已采纳的窗口。
|
|
589
|
+
- `status`:只读汇总合成进度——各状态窗口数、`pending`(已采纳、还没铺轨的段数)、已铺数,逐窗口一行,起止按 `source_ranges` 投影到当刻时间线(口播被剪掉的窗口起止为空并注明)。没有合成键时全零。
|
|
554
590
|
- `scaffold`:为已采纳窗口落场景骨架 `composite/scenes/cp-wNN.html` 与上下文 `cp-wNN.context.md`;已有场景不覆盖。
|
|
555
591
|
- `shots`:给选片用——带源时间码的联系表、镜头切点、黑边实测(`data-crop` 取值);不替你选、不改工程。
|
|
556
592
|
- `build`:场景 → 自包含颗粒 `gtrk/assets/composite/<id>.html`。解析规则与 infra `composite-particle-profile` 逐字节一致(帧格窗口、轨身份、锚点、字幕输入、`inputs_hash`);风格取 `composite/theme.css`。锚点关键词照句子原文写:匹配时关键词与句子都忽略空格、标点与大小写,英文按整词(`"cold brew"` 直接写,`tea` 不命中 `teas`)。
|
|
@@ -573,7 +609,7 @@ gtrk composite bake --abi
|
|
|
573
609
|
|---|---|
|
|
574
610
|
| `gtrk project init --tts-task <task_id>` | **主路**:引用一个已完成的 `audio_tts_clone` 配音任务——服务端直取产物音频与句级时码(零 ASR、零额外计费),音频下载落工程 `audio/` |
|
|
575
611
|
| `gtrk project init --audio <配音> --transcript <transcript.json>` | **兜底路**:自备配音音频 + 句级时码稿成对给(时码稿由 `gtrk transcript <配音音频> --json` 产出;TTS 合成的配音请走主路,别重跑 ASR) |
|
|
576
|
-
| `gtrk audio lay --project <目录> --file <bgm.mp3>` | 往工程追加一条音频轨;**同源幂等替换**(同一来源重跑替换不堆轨、零引用保护剥旧);`--volume <0..1>`(默认 0.1 垫底音量——契约 volume 只写线性增益、不写 dB;客户端音量面板显示 -20.0
|
|
612
|
+
| `gtrk audio lay --project <目录> --file <bgm.mp3>` | 往工程追加一条音频轨;**同源幂等替换**(同一来源重跑替换不堆轨、零引用保护剥旧);`--volume <0..1>`(默认 0.1 垫底音量——契约 volume 只写线性增益、不写 dB;客户端音量面板显示 -20.0,两侧同一标尺;须 > 0——`0` 不会静音、会被拒,静音用 `gtrk patch set --muted`)、`--offset <ms>` 定入点 |
|
|
577
613
|
| `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 / 分析失败 / 曲子缺高潮点一律降级为不锚定,命令不失败 |
|
|
578
614
|
| `gtrk audio lay … --beat-align --climax <轨秒>` | 高潮点**逃生门**:一律覆盖上面那条判据链。越界(≤ `--offset` 或 ≥ 工程末尾)或非数**直接报错**,不静默回落 —— 显式给错了值要当场知道。须与 `--beat-align` 同用 |
|
|
579
615
|
| `gtrk audio lay … --no-loop` | 不平铺补齐:开了 `--beat-align` 时只放锚点那一段、头尾留白(**留白秒数如实报出**);未开 `--beat-align` 时保留单次、不循环叠满至工程末尾 |
|
|
@@ -594,7 +630,7 @@ gtrk project export --gtrk <工程文件> --formats jianying,xml --out <产物
|
|
|
594
630
|
|---|---|
|
|
595
631
|
| `--project <dir>` / `--gtrk <path>` | 自动定位标准布局的 `gtrk/project.gtrk`,或显式指定工程文件,二选一 |
|
|
596
632
|
| `-f, --formats <list>` | `xml`、`fcpxml`、`otio`、`jianying`、`capcut`、`gtrk`;缺省 `jianying,xml`,也兼容旧细粒度格式名 |
|
|
597
|
-
| `--jianying-draft-dir <dir>` | 剪映/CapCut
|
|
633
|
+
| `--jianying-draft-dir <dir>` | 剪映/CapCut 草稿根;省略时按用户配置与标准位置探测。草稿落 `<草稿根>/<产物目录名>`,撞名时追加 `-2`… 并提示,原草稿不动 |
|
|
598
634
|
| `--no-particles` | 不预渲 MG 颗粒;结构导出仍继续,结果会记录被跳过的颗粒 |
|
|
599
635
|
| `--particle-concurrency <n>` | 颗粒 qtrle 预渲并发数,1–8,默认 6 |
|
|
600
636
|
|
|
@@ -648,7 +684,7 @@ gtrk project background --gtrk <工程文件> --clear
|
|
|
648
684
|
| `image_matting` | 单张图片(带 EXIF 方向的手机照片先按显示方向摆正再上传,原图不动) | 透明背景 png(可 `--param` 请求背景底板) | 运行前实时查询 | 已上线 |
|
|
649
685
|
| `image_blackborder_remove` | 单张本地图片 | 去黑边图片 | 运行前实时查询 | 已上线 |
|
|
650
686
|
| `image_canvas_adapt` | 单张本地图片;可选目标宽高与 `normal` / `rectangle` / `square` | 比例适配图片 | 运行前实时查询 | 已上线 |
|
|
651
|
-
| `image_purify` | 单张本地图片;可选 `full_screen` / `region`
|
|
687
|
+
| `image_purify` | 单张本地图片;可选 `full_screen` / `region` 与区域框,可选 `--redraw` 重绘模式(仅处理你有权处理的素材) | 清理水印、Logo 或叠加元素后的净化图片 | 运行前实时查询 | 已上线 |
|
|
652
688
|
| `video_matting` | 单条视频(**≤10 分钟**,原片直传不压代理) | 透明背景 webm | 运行前实时查询 | 已上线 |
|
|
653
689
|
| `video_blackborder_remove` | 单条本地视频 | 去黑边视频 | 运行前实时查询 | 已上线 |
|
|
654
690
|
| `video_canvas_adapt` | 单条本地视频;可选目标宽高、片段、画布模式和无音轨输出 | 比例适配视频 | 运行前实时查询 | 已上线 |
|
|
@@ -666,7 +702,7 @@ gtrk project background --gtrk <工程文件> --clear
|
|
|
666
702
|
| `audio_tts_clone` | **无文件**:`--text`/`--text-file` 二选一(≤5000 字)+ `--speaker` 必填;可选语言/格式/语速/切分法/字幕/**句间停顿**(`--fragment-interval <秒>`,**仅自训音色**;云引擎音色传了会**报错**而非静默忽略,合法区间由服务端校验并在报错里给出) | 配音音频 wav/mp3(+ 可选字幕);按文本字符数计费,计量单位与单价以 `gtrk tool list` 实时显示为准 | 运行前实时查询 | 已上线 |
|
|
667
703
|
| `video_ai_subtitle` | 单条视频或音频;`--language <码>` 必填;可选 `--translate-language`、`--need-render`、`--need-pure`、`--subtitle-type`、`--subtitle-color`。默认只传本地抽出的音频(毛片不上传) | `.ass` 字幕 + 可选烧录/去字幕 `.mp4` + `result-output.json`(摘要 + 字级时间轴) | 运行前实时查询 | 已上线 |
|
|
668
704
|
| `subtitle_translate` | 单个**字幕文件** `.ass` / `.srt`;`--language <码>` 与 `--translate-language <码>` **双必填**;可选 `--output-format`、`--line-mode`、`--bilingual`、`--subtitle-type`、`--subtitle-color`、`--canvas <WxH>`。不含语音识别 | 译文字幕 `.ass` 或 `.srt` + `result-output.json`(条数统计 + 降级标记) | 运行前实时查询 | 已上线 |
|
|
669
|
-
| `video_translate_dub` | 单条视频或音频(**≤120 分钟**,整片上传);`--language <源语种>`、`--translate-language <目标语种>`、`--speaker <clone 或音色代号>` **三项必填**;可选 `--ref <参考音频或视频>`(仅 `clone`;克隆别人的声音须先取得本人同意)、`--ref-lang`、`--no-keep-bgm`、`--fit-policy`、`--speed-band <最小,最大>`、`--subtitle-mode`、`--subtitle-type`、`--project-formats <逗号分隔>`(缺省只出 `.gtrk`;要剪映草稿写 `gtrk,jianying
|
|
705
|
+
| `video_translate_dub` | 单条视频或音频(**≤120 分钟**,整片上传);`--language <源语种>`、`--translate-language <目标语种>`、`--speaker <clone 或音色代号>` **三项必填**;可选 `--ref <参考音频或视频>`(仅 `clone`;克隆别人的声音须先取得本人同意)、`--ref-lang`、`--no-keep-bgm`、`--fit-policy`、`--speed-band <最小,最大>`、`--subtitle-mode`、`--subtitle-type`、`--project-formats <逗号分隔>`(缺省只出 `.gtrk`;要剪映草稿写 `gtrk,jianying`,草稿自动放进剪映草稿目录:同一毛片重跑覆盖上一次的,别的目录下的同名毛片撞上时改落 `…-2`)、`--jianying-draft-dir`;取值以服务端为准。只换音轨、画面保持原样(不做口型同步),长片耗时十几分钟起 | 配音成片 `<输入名>-dub.mp4`(音频输入为 `.mp3`)+ `dub.wav` / `bgm.wav` + 字幕 `.srt` + `transcript.json` + 工程文件按格式分目录(`gtrk/`、`jianying/` …)+ `result-output.json`(配音对齐报告;附带产物缺项时含 `errors`,不判失败) | 运行前实时查询 | 已上线 |
|
|
670
706
|
| `video_long2short_pro` | 单条长视频(整片上传);`--language <码>` 必填;可选 `--output-language`、`--main-topic`、`--output-size`、`--no-jump-cut`、`--duration-pref`、`--max-clip-sec`、`--split-screen`、`--split-orientation`、`--speed-factor`、`--no-camera-move`、`--no-subtitle`、`--subtitle-translate-language` | 逐条成片 `clip{i}.mp4` + 人读报告 `clips.md`(含润色降级明细) + `result-output.json` | 运行前实时查询 | 已上线 |
|
|
671
707
|
| `audio_separation` | 单条音频;可选 `--mode fast\|turbo` | 人声与伴奏音频(按实际返回可为一项或两项) | 运行前实时查询 | 已上线 |
|
|
672
708
|
| `audio_speaker_split` | 单条音频;可选 `--only-struct` | 各说话人 `.wav` 分轨 + `spoken_list` 时间线(`result-output.json`) | 运行前实时查询 | 已上线 |
|
|
@@ -677,7 +713,7 @@ gtrk project background --gtrk <工程文件> --clear
|
|
|
677
713
|
| `piano_audio_enhance` | 单条音频 | 高质量 WAV + 配套 MIDI(双产物) | 运行前实时查询 | 已上线 |
|
|
678
714
|
| `image_to_square` | 单张图片;可选 `--max-line <px>`(≤20000) | 方形图片 | 运行前实时查询 | 已上线 |
|
|
679
715
|
| `image_to_live` | 单张图片 | 约 4 秒短视频 `.mp4`(无声);或安卓动态照片 `.jpg` + 附带同一条 `.mp4` | 运行前实时查询 | 已上线 |
|
|
680
|
-
| `image_classic_template` | **多张图片** + `--main-title`
|
|
716
|
+
| `image_classic_template` | **多张图片** + `--main-title`(封面模式必填;`--template-mode image` 只要拼图时可省);可选副标题/模式/比例/质量/数量/版式 | 封面/拼图成品(text/pic/render 三组、可多张) | 运行前实时查询 | 已上线 |
|
|
681
717
|
| `image_vertical_stitch` | **多张图片**(顺序=自上而下拼接顺序) | 一张垂直拼接长图 | 运行前实时查询 | 已上线 |
|
|
682
718
|
| `video_split_screen` | **2~16 段视频**(多 positional);精确档 `--clips-json`(条目 `{input:0 起序号, begin_time_ms, end_time_ms, crop}`,毫秒时基);九个可选布局/画幅/音频参数 | 一条分屏成片(成片时长对齐最短段) | 运行前实时查询 | 已上线 |
|
|
683
719
|
| `mad` | 一个素材文件夹(3~10 条视频)+ 可选 `--bgm` | AE 母合成成片工程 `.jsx`(仅支持 AE) | 仅 `--bgm` 触发实时查价 | 已上线 |
|
|
@@ -694,8 +730,9 @@ gtrk project background --gtrk <工程文件> --clear
|
|
|
694
730
|
仅接受 `normal`、`rectangle`、`square`
|
|
695
731
|
- `gtrk tool image_purify ./photo.jpg [--json]` — 清理你有权处理的图片中的水印、Logo 或叠加元素。
|
|
696
732
|
- `gtrk tool image_purify ./photo.jpg --purify-scope region --purify-region 0.02,0.02,0.15,0.08 [--json]` — 按框直接去除:不做识别,**框内全部内容都会被处理**;框越小、越贴近要去除的元素效果越好。
|
|
733
|
+
- `gtrk tool image_purify ./photo.jpg --redraw [--json]` — 重绘模式:整张图交给图片编辑模型重新生成,铺满全图的半透明、网格水印也能去掉;与 `--purify-scope region` 同用时只替换框内、框外与原图一致。**单独计价**(运行前报价按重绘档),不设免费次数;图片会发送给中国大陆以外的第三方模型服务处理,细节可能与原图略有不同;内容审核拒绝时任务失败(错误码 6054)、积分退回。也可 `--params-json '{"purify_method":"redraw"}'`。
|
|
697
734
|
- `gtrk tool video_blackborder_remove ./clip.mp4 [--json]` — 自动裁去单条视频四周黑边并保留原音轨。
|
|
698
|
-
- `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start
|
|
735
|
+
- `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 1.5 --clip-end 4 --without-audio [--json]` — 视频比例转换;`--clip-start/--clip-end` 是起止时间(秒,可带小数;`--clip-start` 须小于视频时长,`--clip-end` 须大于 `--clip-start`,超过时长截到结尾),省略字段时沿用服务端默认,画布模式只接受 `normal`、`rectangle`、`square`。
|
|
699
736
|
- `gtrk tool video_stabilizer ./clip.mp4 --stabilizer-method turbo [--json]` — 视频防抖;支持 `fast`、`exp`、`turbo`,其中 `exp` 为实验方式,产物观感需自行检查。
|
|
700
737
|
- `gtrk tool video_vaporwave ./clip.mp4 --vaporwave-filter "灼熱苦夏" [--json]` — 使用精确预设名称添加蒸汽波滤镜;省略时显式使用 `愈漸升溫`。
|
|
701
738
|
视频去水印必须先问用户选快速(ffmpeg:基础模糊,可能留痕)还是精细(raft:较慢的内容修复,通常更自然、可接近无痕,不保证无损还原)。没有默认模式;`<用户选定模式>` 必须替换为用户已选择的 ffmpeg 或 raft,失败后不得自行降档。只检测、编辑和空清单不要求选择。旧运行记录尚未建处理任务时,resume 也须补显式模式;已建单继续原任务。
|
|
@@ -728,7 +765,7 @@ gtrk project background --gtrk <工程文件> --clear
|
|
|
728
765
|
- `gtrk tool piano_audio_enhance ./piano.mp3` — 钢琴录音修复增强,产高质量 WAV 主产物 + 配套 MIDI 副产物。
|
|
729
766
|
- `gtrk tool image_to_square ./long.jpg [--max-line 8000]` — 长图转方图;`--max-line` 默认 4000、上限 20000。
|
|
730
767
|
- `gtrk tool image_to_live ./photo.jpg [--output-format motion_photo]` — 让静态照片动起来。缺省产出约 4 秒的 `.mp4` 短视频(无声);`--output-format motion_photo` 改为直出**安卓动态照片**(单个 `.jpg`,静图末尾内嵌该视频,相册里长按即播),并附带同一条 `.mp4`,两种格式同价。兼容边界:支持该标准的安卓相册可识别并播放;**iOS 不识别**,表现为普通静态图片;少数安卓机型可能只显示静图。
|
|
731
|
-
- `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — 标题+多图出封面/拼图;`--output-pic-count`/`--output-text-count` 由服务端钳制 ≤20
|
|
768
|
+
- `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — 标题+多图出封面/拼图;`--output-pic-count`/`--output-text-count` 由服务端钳制 ≤20。只要拼图不要标题时加 `--template-mode image`,可不传 `--main-title`。标题含 emoji 等封面字体画不出的字符时,服务端建单前即拒(错误码 6046,不扣费)。
|
|
732
769
|
- `gtrk tool image_vertical_stitch top.png mid.png bottom.png` — 多图按传入顺序竖拼成一张长图。
|
|
733
770
|
- `gtrk tool video_split_screen a.mp4 b.mp4 --output-ratio 16:9` — 简单档:整段视频自动布局分屏(reaction/对比同框)。
|
|
734
771
|
- `gtrk tool video_split_screen a.mp4 b.mp4 --clips-json '[{"input":0,"begin_time_ms":0,"end_time_ms":5000},{"input":1,"crop":{"x":0.1,"y":0,"width":0.8,"height":1}}]'` — 精确档:按 0 起索引指定每段毫秒区间与归一化裁剪框;同一文件可多条目出多窗口。
|
|
@@ -793,7 +830,8 @@ gtrk render <gtrk> [-o <out.mp4>] [--crf <n>] [--codec <c>] [--ffmpeg-path <dir>
|
|
|
793
830
|
- **不会静默自动下载**:任何缺失路径只报错并指向本命令(包体 30–90 MB,且分发物涉及授权,须由用户/agent 显式触发)。
|
|
794
831
|
- 下载一律 https + **sha256 强校验**,校验不过即丢弃、不落地;解包调**系统 tar**(Win10+/macOS/Linux 自带),不引第三方解压依赖。
|
|
795
832
|
- 定位优先级不变:`--ffmpeg-path` → `~/.gitruck/ffmpeg` → 系统 PATH。镜像只填中间那一格,**不越过你自己装的 ffmpeg**。
|
|
796
|
-
-
|
|
833
|
+
- 字体走统一静态资源下发的字体目录(`https://api.ai-mcn.tv:9000/cloud/static/assets/fonts/catalog.json`,与客户端同一份):`--font` 装目录里登记的字幕字体(思源黑体 CN Bold,`sourcehansanscn-bold.otf`),`--font-family <族名…>` 按 `font_id` 或中英族名装整族;每款都校 sha256 与字节数,取不到报错、不落半成品。已装按文件名归一比对(历史命名 `SourceHanSansCN-Bold.otf` 也算),`--force` 才重下并换成目录里的命名。
|
|
834
|
+
- 字体落 `~/.gitruck/fonts`(落点即缓存,不另存一份到 `~/.gitruck/cache/`),烧录时经 ffmpeg `ass` 滤镜的 `fontsdir` 供给——**不装进系统字体表、不写注册表、不要管理员权限**。
|
|
797
835
|
- 分发的 ffmpeg 为 GPLv3 构建,对应源码与二进制同处提供(见分发点 `SOURCE.md`);**下载不附加任何使用限制**。
|
|
798
836
|
- `gtrk upgrade [--check]` — 升级 CLI 到最新版 + 刷新 skill(配置保留);`--check` 只查不装。
|
|
799
837
|
- `gtrk skills install [--agents codex,workbuddy,comate,…] [--all] [--copy] [--dir <skills 目录>]` — 单独安装/刷新 Agent Skills;缺省由通用适配器与 gtrk 补充层自动检测。
|