zerocut-cli 0.3.4 → 0.4.0

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.md CHANGED
@@ -102,6 +102,7 @@ zerocut config --ott <token> --region <cn|us> # non-interactive
102
102
  - Options:
103
103
  - `--prompt <prompt>` (required)
104
104
  - `--model <model>` (seedream|seedream-pro|seedream-5l|banana|banana2|banana-pro|wan|wan-pro)
105
+ - `--type <type>` (default|storyboard|subject-turnaround, default: default)
105
106
  - `--aspectRatio <ratio>` (1:1|3:4|4:3|16:9|9:16|2:3|3:2|21:9|1:4|4:1|1:8|8:1)
106
107
  - `--resolution <resolution>` (1K|2K|4K)
107
108
  - `--refs <img1,img2,...>` (comma-separated paths/URLs)
@@ -158,7 +159,7 @@ zerocut config --ott <token> --region <cn|us> # non-interactive
158
159
 
159
160
  ```bash
160
161
  # Create an image (default action)
161
- npx zerocut-cli image --prompt "a cat" --model seedream --aspectRatio 1:1 --resolution 1K --refs ref1.png,ref2.jpg --output out.png
162
+ npx zerocut-cli image --prompt "a cat" --model seedream --type default --aspectRatio 1:1 --resolution 1K --refs ref1.png,ref2.jpg --output out.png
162
163
 
163
164
  # Create video (default action)
164
165
  npx zerocut-cli video --prompt "city night drive" --duration 12 --model vidu --refs frame1.png,frame2.png --resolution 720p --output movie.mp4
@@ -38,11 +38,13 @@ function register(program) {
38
38
  "8:1",
39
39
  ];
40
40
  const allowedResolutions = ["1K", "2K", "4K"];
41
- async function performImageGeneration(session, { prompt, model, aspectRatio, resolution, refsList, output, }) {
41
+ const allowedTypes = ["default", "storyboard", "subject-turnaround"];
42
+ async function performImageGeneration(session, { prompt, model, type, aspectRatio, resolution, refsList, output, }) {
42
43
  const referenceImages = await Promise.all(refsList.map(async (ref) => ({ url: await (0, cerevox_1.getMaterialUri)(session, ref) })));
43
44
  const onProgress = (0, progress_1.createProgressSpinner)("inferencing");
44
45
  const payload = {
45
46
  model: model || "seedream-5l",
47
+ type,
46
48
  prompt,
47
49
  aspect_ratio: aspectRatio,
48
50
  resolution,
@@ -95,6 +97,13 @@ function register(program) {
95
97
  return;
96
98
  }
97
99
  const modelArg = (model ?? undefined);
100
+ const type = typeof opts.type === "string" ? opts.type.trim() : "default";
101
+ if (!allowedTypes.includes(type)) {
102
+ process.stderr.write(`Invalid value for --type: ${type}. Allowed: ${allowedTypes.join("|")}\n`);
103
+ process.exitCode = 1;
104
+ return;
105
+ }
106
+ const typeArg = type;
98
107
  const aspectRatio = typeof opts.aspectRatio === "string"
99
108
  ? opts.aspectRatio.trim()
100
109
  : undefined;
@@ -121,6 +130,7 @@ function register(program) {
121
130
  await performImageGeneration(session, {
122
131
  prompt,
123
132
  model: modelArg,
133
+ type: typeArg,
124
134
  aspectRatio,
125
135
  resolution,
126
136
  refsList,
@@ -131,6 +141,7 @@ function register(program) {
131
141
  parent
132
142
  .option("--prompt <prompt>", "Text prompt for image generation (required)")
133
143
  .option("--model <model>", `Generator model: ${allowedModels.join("|")}`)
144
+ .option("--type <type>", `Image type: ${allowedTypes.join("|")}`)
134
145
  .option("--aspectRatio <ratio>", `Aspect ratio: ${allowedAspectRatios.join("|")}`)
135
146
  .option("--resolution <resolution>", `Resolution: ${allowedResolutions.join("|")}`)
136
147
  .option("--refs <refs>", "Comma-separated reference image paths/urls")
@@ -142,6 +153,7 @@ function register(program) {
142
153
  .description("Create a new image; requires --prompt")
143
154
  .option("--prompt <prompt>", "Text prompt for image generation (required)")
144
155
  .option("--model <model>", `Generator model: ${allowedModels.join("|")}`)
156
+ .option("--type <type>", `Image type: ${allowedTypes.join("|")}`)
145
157
  .option("--aspectRatio <ratio>", `Aspect ratio: ${allowedAspectRatios.join("|")}`)
146
158
  .option("--resolution <resolution>", `Resolution: ${allowedResolutions.join("|")}`)
147
159
  .option("--refs <refs>", "Comma-separated reference image paths/urls")
@@ -18,6 +18,7 @@ export declare function syncToTOS(url: string): Promise<string>;
18
18
  export declare function runFFMpegCommand(session: Session, command: string, resources?: string[]): Promise<{
19
19
  exitCode: number;
20
20
  outputFilePath: string;
21
+ tosUrl: string | undefined;
21
22
  data: {
22
23
  stdout: string;
23
24
  stderr: string | undefined;
@@ -193,20 +193,23 @@ async function runFFMpegCommand(session, command, resources = []) {
193
193
  cwd: workDir,
194
194
  });
195
195
  const outputFilePath = trimmedCommand.startsWith("ffmpeg")
196
- ? finalCommand.split(" ").pop() || ""
196
+ ? (finalCommand.split(" ").pop() || "").replace(/^["']|["']$/g, "")
197
197
  : "";
198
198
  const sandboxFilePath = (0, node_path_2.join)(workDir, outputFilePath);
199
+ let tosUrl;
199
200
  // 等待命令完成
200
201
  const result = await response.json();
201
202
  if (result.exitCode === 0 && outputFilePath) {
202
203
  const savePath = (0, node_path_2.join)(process.cwd(), (0, node_path_1.basename)(outputFilePath));
203
- console.log(sandboxFilePath, savePath);
204
204
  const files = session.files;
205
205
  await files.download(sandboxFilePath, savePath);
206
+ const sandboxUrl = await getMaterialUri(session, savePath);
207
+ tosUrl = await syncToTOS(sandboxUrl);
206
208
  }
207
209
  return {
208
210
  exitCode: result.exitCode,
209
211
  outputFilePath,
212
+ tosUrl,
210
213
  data: {
211
214
  stdout: result.stdout || (!result.exitCode && result.stderr) || "",
212
215
  stderr: result.exitCode ? result.stderr : undefined,
@@ -102,13 +102,14 @@ Default action: `create`
102
102
 
103
103
  ```bash
104
104
  npx zerocut-cli image --prompt "a cat on a bike" --output out.png
105
- npx zerocut-cli image create --prompt "a cat on a bike" --model seedream-5l --aspectRatio 1:1 --resolution 1K --refs ref1.png,ref2.jpg --output out.png
105
+ npx zerocut-cli image create --prompt "a cat on a bike" --model seedream-5l --type default --aspectRatio 1:1 --resolution 1K --refs ref1.png,ref2.jpg --output out.png
106
106
  ```
107
107
 
108
108
  Options:
109
109
 
110
110
  - `--prompt <prompt>` required
111
111
  - `--model <model>`
112
+ - `--type <type>`
112
113
  - `--aspectRatio <ratio>`
113
114
  - `--resolution <resolution>`
114
115
  - `--refs <refs>` comma-separated local paths or URLs
@@ -118,6 +119,8 @@ Validation rules:
118
119
 
119
120
  - `--prompt` must be non-empty
120
121
  - `--model` allowed: `seedream|seedream-pro|seedream-5l|banana|banana2|banana-pro|wan|wan-pro`
122
+ - `--type` allowed: `default|storyboard|subject-turnaround`
123
+ - unless user specifies type, default to `default`
121
124
  - `--aspectRatio` allowed: `1:1|3:4|4:3|16:9|9:16|2:3|3:2|21:9|1:4|4:1|1:8|8:1`
122
125
  - unless user specifies aspect ratio, default to `16:9`
123
126
  - `--resolution` allowed: `1K|2K|4K`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: one-click-video
3
- description: Use this skill when the user wants to produce a complete short video from a topic with fast CLI-driven workflow: scene planning, storyboard creation, scene video generation, optional background music, and final ffmpeg composition.
3
+ description: Use this skill when the user asks for one-click end-to-end video creation. It delivers a complete final video with consistent visual style, coherent narrative, stable voice strategy, storyboard-driven scene generation, optional BGM, and final ffmpeg composition using zerocut-cli only.
4
4
  homepage: "https://github.com/liubei-ai/zerocut-cli"
5
5
  source: "https://github.com/liubei-ai/zerocut-cli"
6
6
  requires_binaries:
@@ -10,35 +10,309 @@ requires_binaries:
10
10
 
11
11
  # One-Click Video
12
12
 
13
- ## Purpose
13
+ ## Role
14
14
 
15
- Create a deliverable final video by orchestrating `zerocut-cli` commands only.
15
+ You are a film-level director, storyboard designer, dialogue writer, and final delivery coordinator. Your objective is not to output random clips, but to deliver one coherent final video with clear narrative progression, consistent visual style, stable voice identity, and synchronized audio-visual rhythm.
16
16
 
17
- ## Runtime Requirements
17
+ ## Mission
18
18
 
19
- - Use CLI commands only, never MCP tool names.
20
- - Ensure `zerocut-cli` is available:
21
- - `pnpm dlx zerocut-cli help`
22
- - `pnpm add -g zerocut-cli && zerocut-cli help`
23
- - `npx zerocut-cli help`
19
+ Based on user topic, purpose, duration, style, references, and subject assets:
24
20
 
25
- ## Required Pre-Check
21
+ 1. Decide whether recurring subjects are required.
22
+ 2. Define subject, outfit, prop, and style constraints.
23
+ 3. Split concept into 1-5 scenes.
24
+ 4. Create storyboard and camera rhythm for every scene.
25
+ 5. Generate scene videos with consistent constraints.
26
+ 6. Create matching BGM.
27
+ 7. Compose final deliverable.
26
28
 
27
- Run config check first:
29
+ ## Highest-Priority Constraints
30
+
31
+ 1. Follow full workflow. Do not skip core steps.
32
+ 2. Perform quality checks at each step.
33
+ 3. Use CLI commands only, never MCP tool names.
34
+
35
+ Required workflow:
36
+
37
+ project preparation -> subject creation -> scene planning (ensure `./materials/scene-bible.md` exists) -> storyboard generation -> scene video generation -> BGM generation -> final composition
38
+
39
+ ## Runtime Preparation
40
+
41
+ Verify CLI availability:
42
+
43
+ ```bash
44
+ npx zerocut-cli help
45
+ ```
46
+
47
+ Run config pre-check:
28
48
 
29
49
  ```bash
30
50
  npx zerocut-cli config list
31
51
  ```
32
52
 
33
- If `apiKey` is missing, stop and request user OTT token:
53
+ If `apiKey` is missing, stop and ask user OTT token:
34
54
 
35
55
  ```bash
36
56
  npx zerocut-cli config --ott <token> --region <cn|us>
37
57
  ```
38
58
 
39
- ## Video Parameter Contract
59
+ ## Model Policy
60
+
61
+ ### Image model policy
62
+
63
+ - Default image model is `banana2` when user does not explicitly name a model.
64
+ - Do not switch image model because of aesthetic preference words like "more cinematic" or "more realistic" unless model name is explicit.
65
+ - This applies to subject turnaround, storyboard, and any reference image generation.
66
+
67
+ ### Video model policy
68
+
69
+ - Default video model is `seedance-2.0-turbo` when user does not explicitly specify a compliant model.
70
+ - Allowed video models in this skill:
71
+ - `seedance-2.0`
72
+ - `seedance-2.0-turbo`
73
+ - `seedance-2.0-fast`
74
+ - If user requests an unsupported video model, fallback to `seedance-2.0-turbo`.
75
+
76
+ ### Priority
77
+
78
+ 1. Explicit user model
79
+ 2. Skill default model
80
+
81
+ ## Audio Strategy
82
+
83
+ - Unless user explicitly asks for mute, keep scene audio (`--withAudio`).
84
+ - Disable BGM at scene generation stage (`--withBGM false`).
85
+ - Add BGM only in final composition stage.
86
+ - If scenes include narration/dialogue, preserve intelligibility first.
87
+
88
+ ## Narration And Dialogue Rules
89
+
90
+ - If user does not provide exact script, generate concise narration/dialogue aligned with story and duration.
91
+ - If user provides script or key message, keep original intent, wording priority, and brand keywords.
92
+ - Estimate speech duration with normal-slow pace.
93
+ - Per-scene narration/dialogue total should not exceed 12 seconds.
94
+ - If over limit, compress script or split into more scenes.
95
+
96
+ ## Voice Consistency Rules
97
+
98
+ - Keep stable voice identity per character across scenes.
99
+ - Keep narration voice stable across the full video unless story explicitly changes narrator.
100
+ - Use voice formula internally:
101
+ - gender + age range + vocal traits + speaking pace + emotional baseline + language
102
+
103
+ ## Subject Creation Rules
104
+
105
+ - Not all tasks require recurring subjects.
106
+ - For narrative/ad/commercial stories with recurring characters, subject creation is mandatory.
107
+ - If user provides subject reference images, use them to maintain consistency.
108
+ - If user does not provide references, design stable subject specs first.
109
+
110
+ Suggested subject turnaround command:
111
+
112
+ ```bash
113
+ npx zerocut-cli image --prompt "<subject turnaround prompt>" --model banana2 --type subject-turnaround --aspectRatio 1:1 --resolution 1K --output 001_subject_turnaround.png
114
+ ```
115
+
116
+ ## Scene Planning And Scene-Bible Rules
117
+
118
+ Scene planning is a critical quality gate. Before any storyboard or video generation, create a complete `./materials/scene-bible.md` and treat it as the single source of truth for all downstream prompts.
119
+
120
+ ### Mandatory Scene-Bible Checklist
121
+
122
+ `scene-bible.md` must include:
123
+
124
+ 1. **Project intent**
125
+ - user goal, platform, target audience, runtime target, delivery format
126
+ 2. **Global style lock**
127
+ - style keywords, texture/look, color system, lighting logic, camera language, post-look constraints
128
+ 3. **Model lock**
129
+ - image model and video model selected by policy
130
+ 4. **Subject lock**
131
+ - subject roster, appearance lock, outfit lock, prop lock, relationship rules
132
+ 5. **Voice lock**
133
+ - narrator/character voice formula and language rules
134
+ 6. **Scene plan**
135
+ - 1-5 scenes, each with objective, emotion shift, estimated duration, and shot count
136
+ 7. **Shot plan per scene**
137
+ - each shot has self-contained prompt requirements and camera intention
138
+ 8. **Narration/dialogue plan**
139
+ - per scene script and estimated speech duration (must stay within 12s per scene)
140
+ 9. **Asset binding**
141
+ - which references are required for each scene (`--storyboard`, `--persons`, `--refs`)
142
+ 10. **Output plan**
143
+ - deterministic output filenames for storyboard, scene clips, bgm, and final output
144
+ 11. **Quality gates**
145
+ - pass/fail checks before moving to storyboard and before moving to video generation
146
+
147
+ ### Scene-Bible Template
148
+
149
+ Use this structure when writing `./materials/scene-bible.md`:
150
+
151
+ ```markdown
152
+ # Scene Bible
153
+
154
+ ## 1. Project Intent
155
+
156
+ - Goal:
157
+ - Platform:
158
+ - Audience:
159
+ - Runtime Target:
160
+ - Delivery:
161
+
162
+ ## 2. Global Style Lock
163
+
164
+ - Style:
165
+ - Texture:
166
+ - Color System:
167
+ - Lighting Logic:
168
+ - Camera Language:
169
+ - Post-Look:
170
+
171
+ ## 3. Model Lock
172
+
173
+ - Image Model:
174
+ - Video Model:
175
+
176
+ ## 4. Subject Lock And References
177
+
178
+ - Subject A:
179
+ - Appearance Lock:
180
+ - Outfit Lock:
181
+ - Prop Lock:
182
+ - Reference Files:
183
+
184
+ ## 5. Voice Lock
185
+
186
+ - Narrator Formula:
187
+ - Character A Formula:
188
+ - Language:
189
+
190
+ ## 6. Scene Plan (1-5 Scenes)
191
+
192
+ ### Scene 1
193
+
194
+ - Goal:
195
+ - Emotion:
196
+ - Duration:
197
+ - Shot Count:
198
+ - Storyboard Output:
199
+ - Video Output:
200
+
201
+ ## 7. Shot Plan
202
+
203
+ ### Scene 1 Shot 1
204
+
205
+ - Shot Purpose:
206
+ - Camera:
207
+ - Action:
208
+ - Prompt Must Include:
40
209
 
41
- When generating scene videos, only use legal `video` command parameters:
210
+ ## 8. Narration/Dialogue Plan
211
+
212
+ ### Scene 1
213
+
214
+ - Script:
215
+ - Estimated Speech Duration:
216
+
217
+ ## 9. Asset Binding
218
+
219
+ ### Scene 1
220
+
221
+ - Storyboard:
222
+ - Persons:
223
+ - Refs:
224
+
225
+ ## 10. Output Naming Plan
226
+
227
+ - 001_subject_turnaround.png
228
+ - 010_storyboard_scene1.png
229
+ - 020_scene1.mp4
230
+ - 090_bgm.mp3
231
+ - 110_final.mp4
232
+
233
+ ## 11. Quality Gates
234
+
235
+ - Gate A (Before Storyboard):
236
+ - Gate B (Before Video):
237
+ ```
238
+
239
+ ### Enforced Planning Rules
240
+
241
+ - Do not generate storyboard until `scene-bible.md` exists and all mandatory sections are filled.
242
+ - Do not generate scene video until scene-level entries are complete in scene bible.
243
+ - All storyboard prompts and video prompts must inherit locked constraints from scene bible.
244
+ - If user updates style/story/character constraints, update `scene-bible.md` first, then regenerate affected assets.
245
+ - If quality gates fail, revise the plan instead of forcing downstream generation.
246
+
247
+ ### Quality Gate Definitions
248
+
249
+ - Gate A (Before Storyboard) passes only when:
250
+ - global style lock is explicit and non-ambiguous
251
+ - scene count, duration, and shot count are fully defined
252
+ - subject lock and voice lock are complete for all recurring characters
253
+ - asset binding is ready for each scene
254
+ - Gate B (Before Video) passes only when:
255
+ - every scene has a storyboard prompt and output target
256
+ - every scene has narration/dialogue text and duration estimate
257
+ - every scene prompt is self-contained and does not rely on previous context
258
+ - scene durations and speech durations are within constraints
259
+
260
+ ### Scene Planning Deliverables Per Scene
261
+
262
+ For each scene, planning output must include:
263
+
264
+ 1. one-sentence scene objective
265
+ 2. emotional transition
266
+ 3. exact duration target
267
+ 4. shot list with camera intention
268
+ 5. storyboard prompt draft
269
+ 6. video prompt draft
270
+ 7. narration/dialogue draft
271
+ 8. required assets list (`--storyboard`, `--persons`, `--refs`)
272
+
273
+ ## Scene And Camera Rules
274
+
275
+ - Split into 1-5 scenes.
276
+ - Recommended scene duration is 12-15s, and scene target should not exceed 15s.
277
+ - Each scene can contain 1-6 shots.
278
+ - Maintain consistency of style, lighting logic, camera language, character identity, and voice design across scenes.
279
+
280
+ ## Storyboard Rules
281
+
282
+ - Every scene must have a storyboard image.
283
+ - Storyboard must include environment, subject position/action, framing, camera movement, rhythm, and key emotion.
284
+ - If a subject appears in that scene, include matching subject references.
285
+ - Storyboard prompts must be complete and self-contained.
286
+
287
+ Storyboard command:
288
+
289
+ ```bash
290
+ npx zerocut-cli image --prompt "<scene storyboard prompt>" --model banana2 --type storyboard --aspectRatio 16:9 --resolution 1K --refs 001_subject_turnaround.png --output 010_storyboard_scene1.png
291
+ ```
292
+
293
+ If no subject references are required in that scene, omit `--refs`.
294
+
295
+ ## Prompt Independence Hard Constraint
296
+
297
+ - Every shot prompt and every scene video prompt must be fully self-contained.
298
+ - Do not use shorthand such as:
299
+ - "same as previous shot"
300
+ - "continue above"
301
+ - "keep unchanged"
302
+ - "refer to previous settings"
303
+
304
+ ## Video Generation Rules
305
+
306
+ - Scene video must be grounded on storyboard and scene-specific references.
307
+ - Every scene prompt must repeat key constraints explicitly.
308
+ - Defaults:
309
+ - `--resolution 720p`
310
+ - `--aspectRatio 9:16` unless user requests otherwise
311
+ - `--withAudio`
312
+ - `--withBGM false`
313
+ - Keep each scene duration compatible with script and pacing.
314
+
315
+ Allowed video parameters:
42
316
 
43
317
  - `--prompt <prompt>` required
44
318
  - `--duration <seconds>`
@@ -48,93 +322,92 @@ When generating scene videos, only use legal `video` command parameters:
48
322
  - `--firstFrame <image>`
49
323
  - `--lastFrame <image>`
50
324
  - `--storyboard <image>`
51
- - `--persons <persons>` comma-separated image paths/URLs, mapped to `type=person`
325
+ - `--persons <persons>`
52
326
  - `--refs <assets>`
53
327
  - `--resolution <resolution>`
54
328
  - `--aspectRatio <ratio>`
55
329
  - `--withAudio`
56
- - `--withBGM <withBGM>` `true|false`, default `true`
330
+ - `--withBGM <withBGM>`
57
331
  - `--optimizeCameraMotion`
58
332
  - `--output <file>`
59
333
 
60
- ## Output Naming Rules
61
-
62
- - If user does not provide output path, generate meaningful names with 3-digit prefix:
63
- - `001_storyboard_scene1.png`
64
- - `002_scene1.mp4`
65
- - `003_scene2.mp4`
66
- - `004_bgm.mp3`
67
- - `005_final.mp4`
68
-
69
- ## Workflow
70
-
71
- 1. Understand topic, goal, duration, platform orientation, and style.
72
- 2. Split into 1-5 scenes with clear narrative progression.
73
- 3. Create one storyboard image for each scene.
74
- 4. Generate one video clip for each scene using only legal video parameters.
75
- 5. Optionally generate one background music track with `music` command.
76
- 6. Compose final video with `ffmpeg` command.
77
-
78
- ## Scene Storyboard Step
79
-
80
- Generate storyboard for each scene:
81
-
82
- ```bash
83
- npx zerocut-cli image --prompt "<scene storyboard prompt>" --model banana2 --aspectRatio 16:9 --resolution 1K --output 001_storyboard_scene1.png
84
- ```
85
-
86
- ## Scene Video Step
87
-
88
- Use storyboard as `--storyboard`, optional character images via `--persons`, and optional extra references via `--refs`.
334
+ Scene video example:
89
335
 
90
336
  ```bash
91
337
  npx zerocut-cli video \
92
- --prompt "<scene video prompt>" \
93
- --model seedance-2.0 \
338
+ --prompt "<self-contained scene video prompt>" \
339
+ --model seedance-2.0-turbo \
94
340
  --duration 12 \
95
341
  --resolution 720p \
96
342
  --aspectRatio 16:9 \
97
- --storyboard 001_storyboard_scene1.png \
343
+ --storyboard 010_storyboard_scene1.png \
98
344
  --persons actor_front.png,actor_side.png \
99
345
  --refs prop_ref.png,env_ref.png \
100
346
  --withAudio \
101
- --withBGM true \
102
- --output 002_scene1.mp4
347
+ --withBGM false \
348
+ --output 020_scene1.mp4
103
349
  ```
104
350
 
105
- ## Background Music Step
351
+ ## BGM Rules
352
+
353
+ - Generate BGM only after all scene videos are ready.
354
+ - Recommended durations: `30|60|90|120|150` seconds.
355
+ - BGM duration must be longer than total scene duration.
356
+ - Keep BGM supportive, never overpower dialogue/narration.
106
357
 
107
- Generate one BGM track when needed:
358
+ BGM example:
108
359
 
109
360
  ```bash
110
- npx zerocut-cli music --prompt "<bgm prompt>" --output 004_bgm.mp3
361
+ npx zerocut-cli music --prompt "<bgm prompt>" --output 090_bgm.mp3
111
362
  ```
112
363
 
113
- ## Final Composition Step (ffmpeg only)
364
+ ## Final Composition Rules
365
+
366
+ - Concatenate scene videos in order.
367
+ - Mix original scene audio and BGM with proper balance.
368
+ - Keep final pacing, narrative continuity, and style consistency.
114
369
 
115
370
  Create concat list:
116
371
 
117
372
  ```bash
118
- printf "file '002_scene1.mp4'\nfile '003_scene2.mp4'\n" > concat.txt
373
+ printf "file '020_scene1.mp4'\nfile '030_scene2.mp4'\n" > concat.txt
119
374
  ```
120
375
 
121
- Concatenate scene clips:
376
+ Concatenate:
122
377
 
123
378
  ```bash
124
- npx zerocut-cli ffmpeg --args -f concat -safe 0 -i concat.txt -c copy 005_concat.mp4 --resources concat.txt 002_scene1.mp4 003_scene2.mp4
379
+ npx zerocut-cli ffmpeg --args -f concat -safe 0 -i concat.txt -c copy 100_concat.mp4 --resources concat.txt 020_scene1.mp4 030_scene2.mp4
125
380
  ```
126
381
 
127
- Mix BGM with original video audio:
382
+ Mix BGM:
128
383
 
129
384
  ```bash
130
- npx zerocut-cli ffmpeg --args -i 005_concat.mp4 -i 004_bgm.mp3 -filter_complex "[1:a]volume=0.2[bgm];[0:a][bgm]amix=inputs=2:duration=first:dropout_transition=2[aout]" -map 0:v -map "[aout]" -c:v copy -c:a aac 005_final.mp4 --resources 005_concat.mp4 004_bgm.mp3
385
+ npx zerocut-cli ffmpeg --args -i 100_concat.mp4 -i 090_bgm.mp3 -filter_complex "[1:a]volume=0.2[bgm];[0:a][bgm]amix=inputs=2:duration=first:dropout_transition=2[aout]" -map 0:v -map "[aout]" -c:v copy -c:a aac 110_final.mp4 --resources 100_concat.mp4 090_bgm.mp3
131
386
  ```
132
387
 
133
- ## Hard Rules
388
+ ## Failure Handling
389
+
390
+ - If command output contains `Not enough credits`, stop immediately and ask user to recharge.
391
+ - If a scene drifts away from global style, revise prompt and regenerate before final composition.
392
+ - If voice identity drifts, revise script/constraints and regenerate the affected scene.
393
+ - Never skip core steps and output incomplete low-quality final result.
394
+
395
+ ## Output Naming Rules
396
+
397
+ If user does not provide explicit output names, use meaningful incremental names:
398
+
399
+ - `001_subject_turnaround.png`
400
+ - `010_storyboard_scene1.png`
401
+ - `020_scene1.mp4`
402
+ - `030_scene2.mp4`
403
+ - `090_bgm.mp3`
404
+ - `100_concat.mp4`
405
+ - `110_final.mp4`
406
+
407
+ ## Non-Negotiable Rules
134
408
 
135
- - Do not introduce non-CLI tool calls.
136
- - Do not use parameters outside the legal `video` parameter contract.
137
- - Keep single scene duration within model limits.
138
- - Keep visual style consistent across all scenes.
139
- - Keep role identity consistent when using `--persons`.
140
- - Do not generate subtitles in this workflow.
409
+ - Use only `zerocut-cli` commands.
410
+ - Keep prompts complete and executable without hidden context.
411
+ - Keep style consistency across all scenes.
412
+ - Keep character and voice consistency across all scenes.
413
+ - Keep per-scene language duration within 12 seconds at normal-slow pace.