cerevox 2.30.5 → 2.31.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.
@@ -115,7 +115,7 @@
115
115
  - 光线:保持光源方向和强度一致
116
116
 
117
117
  ### BGM 音量控制
118
- * 音量:默认BGM音量控制为-15db,通过设置BGM音轨的gain effect控制
118
+ * 音量:默认BGM音量控制为-25db,通过设置BGM音轨的gain effect控制
119
119
 
120
120
  ```json
121
121
  {
@@ -123,7 +123,7 @@
123
123
  "effects": [{
124
124
  "name": "gain",
125
125
  "params": {
126
- "db": -15
126
+ "db": -25
127
127
  }
128
128
  }]
129
129
  }
@@ -115,7 +115,7 @@
115
115
  - 光线:保持光源方向和强度一致
116
116
 
117
117
  ### BGM 音量控制
118
- * 音量:默认BGM音量控制为-15db,通过设置BGM音轨的gain effect控制
118
+ * 音量:默认BGM音量控制为-25db,通过设置BGM音轨的gain effect控制
119
119
 
120
120
  ```json
121
121
  {
@@ -123,7 +123,7 @@
123
123
  "effects": [{
124
124
  "name": "gain",
125
125
  "params": {
126
- "db": -15
126
+ "db": -25
127
127
  }
128
128
  }]
129
129
  }
@@ -120,7 +120,7 @@ description: 制作通用视频时,可以根据用户需求,按照这个流
120
120
  - 光线:保持光源方向和强度一致
121
121
 
122
122
  ### BGM 音量控制
123
- * 音量:默认BGM音量控制为-15db,通过设置BGM音轨的gain effect控制
123
+ * 音量:默认BGM音量控制为-25db,通过设置BGM音轨的gain effect控制
124
124
 
125
125
  ```json
126
126
  {
@@ -128,7 +128,7 @@ description: 制作通用视频时,可以根据用户需求,按照这个流
128
128
  "effects": [{
129
129
  "name": "gain",
130
130
  "params": {
131
- "db": -15
131
+ "db": -25
132
132
  }
133
133
  }]
134
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"zerocut.d.ts","sourceRoot":"","sources":["../../../src/mcp/servers/zerocut.ts"],"names":[],"mappings":";AAmtKA,wBAAsB,GAAG,kBAKxB"}
1
+ {"version":3,"file":"zerocut.d.ts","sourceRoot":"","sources":["../../../src/mcp/servers/zerocut.ts"],"names":[],"mappings":";AAmvKA,wBAAsB,GAAG,kBAKxB"}
@@ -1427,7 +1427,7 @@ server.registerTool('generate-image', {
1427
1427
  }
1428
1428
  }
1429
1429
  const turnaroundMessage = hasTurnaround
1430
- ? '⚠️ 注意**三视图**是指**同一个**人或物体的不同视角合成图,三部分都表示同一个人或物体,只能参考其信息画出**一个人或一个物体**,不要画成多个人或多个物体!\n'
1430
+ ? '⚠️ 注意**三视图**是指**同一个**人或物体的不同视角合成图,三部分都表示同一个人或物体,只能参考其信息画出**一个人或一个物体**,不要画成多个人或多个物体!\n\n'
1431
1431
  : '';
1432
1432
  if (objectPrefix.length > 0) {
1433
1433
  processedPrompt = `${objectPrefix.join('\n')}
@@ -1769,7 +1769,7 @@ server.registerTool('generate-video', {
1769
1769
  scene.dialog)) {
1770
1770
  if (!checkAudioVideoDurationFlag) {
1771
1771
  checkAudioVideoDurationFlag = true;
1772
- return createErrorResponse('请先自我检查 media_logs 中的查音频时长,确保匹配音频时长来生成视频', 'generate-video');
1772
+ return createErrorResponse('请先自我检查 media_logs 中的查音频时长,确保音频时长不大于duration指定的视频时长', 'generate-video');
1773
1773
  }
1774
1774
  }
1775
1775
  }
@@ -2528,10 +2528,13 @@ server.registerTool('compile-and-run', {
2528
2528
  // 检查字幕内容匹配标记
2529
2529
  if (!checkStoryboardSubtitlesFlag) {
2530
2530
  checkStoryboardSubtitlesFlag = true;
2531
- return createErrorResponse(`请先进行以下一致性检查:
2531
+ return createErrorResponse(`请先对 draft_content 进行以下一致性检查:
2532
2532
 
2533
- 1. 检查字幕文字内容是否与 story_board 中各个场景的 script 或 dialog 内容完全一致(允许字幕分段,只要最终文本一致就行),若不匹配,修改 draft_content 使其匹配返回检查结果,然后再进行合成
2534
- 2. 除非用户明确表示不要背景音乐,否则检查是否有生成并配置 BGM,如果没有,则生成BGM并修改 draft_content BGM 配置到项目中,然后再进行合成`, 'compile-and-run');
2533
+ 1. 检查字幕文字内容是否与 story_board 中各个场景的 script 或 dialog 内容完全一致(⚠️ 允许字幕分段展示,只要最终文本保持一致就行)
2534
+ 2. 检查视频 resolution 设定是否与 story_board orientation 设置一致,默认 720p 情况下视频尺寸应为横屏 1280x720,竖屏 720x1280,若视频为 1080p 则尺寸应分别为横屏 1920x1080 和竖屏 1080x1920,切勿设反
2535
+ 3. 除非用户明确表示不要背景音乐,否则应检查是否有生成并配置了 BGM,若无,则生成 BGM 并将其加入素材和轨道配置
2536
+
2537
+ 以上检查任何一项有问题,先修复 draft_content 使其符合要求后再进行合成`, 'compile-and-run');
2535
2538
  }
2536
2539
  console.log('Starting video compilation and rendering...');
2537
2540
  // 验证terminal可用性
@@ -2663,8 +2666,8 @@ server.registerTool('compile-and-run', {
2663
2666
  success: false,
2664
2667
  exitCode: result.exitCode,
2665
2668
  outputPath,
2666
- command: compiled.cmd,
2667
- stderr: result.stderr?.substring(0, 1000), // 限制错误输出长度
2669
+ // command: compiled.cmd,
2670
+ stderr: result.stderr,
2668
2671
  message: `FFmpeg exited with code ${result.exitCode}`,
2669
2672
  timestamp: new Date().toISOString(),
2670
2673
  };
@@ -3521,11 +3524,7 @@ server.registerTool('generate-video-by-ref', {
3521
3524
  .optional()
3522
3525
  .default(5)
3523
3526
  .describe('The duration of the video in seconds.'),
3524
- size: zod_1.z
3525
- .enum(['720x1280', '1280x720'])
3526
- .optional()
3527
- .default('720x1280')
3528
- .describe('The size of the video.'),
3527
+ size: zod_1.z.enum(['720x1280', '1280x720']).describe('The size of the video.'),
3529
3528
  watermark: zod_1.z
3530
3529
  .boolean()
3531
3530
  .optional()
@@ -3656,6 +3655,19 @@ server.registerTool('generate-video-by-ref', {
3656
3655
  }
3657
3656
  }
3658
3657
  }
3658
+ // 检查 storyBoard.orientation 与 size 参数的一致性
3659
+ if (storyBoard.orientation) {
3660
+ const isLandscapeSize = size === '1280x720';
3661
+ const isPortraitSize = size === '720x1280';
3662
+ if (storyBoard.orientation === 'landscape' &&
3663
+ !isLandscapeSize) {
3664
+ return createErrorResponse(`故事板设定为横屏模式(orientation: landscape),但视频尺寸 ${size} 为竖屏格式,请使用横屏尺寸 1280x720`, 'generate-video-by-ref');
3665
+ }
3666
+ if (storyBoard.orientation === 'portrait' &&
3667
+ !isPortraitSize) {
3668
+ return createErrorResponse(`故事板设定为竖屏模式(orientation: portrait),但视频尺寸 ${size} 为横屏格式,请使用竖屏尺寸 720x1280`, 'generate-video-by-ref');
3669
+ }
3670
+ }
3659
3671
  }
3660
3672
  else {
3661
3673
  console.warn(`Scene index ${sceneIndex} not found in story_board.json`);
@@ -3900,11 +3912,16 @@ server.registerTool('run-ffmpeg-command', {
3900
3912
  command: zod_1.z
3901
3913
  .string()
3902
3914
  .describe('The ffmpeg or ffprobe command to execute. Only ffmpeg and ffprobe commands are allowed.'),
3915
+ dir: zod_1.z
3916
+ .string()
3917
+ .optional()
3918
+ .default('materials')
3919
+ .describe('The working directory for the command execution. Default is the materials directory.'),
3903
3920
  saveToFileName: zod_1.z
3904
3921
  .string()
3905
3922
  .describe('The filename that matches the output file specified in the ffmpeg command. This file will be downloaded to the local materials directory after command execution.'),
3906
3923
  },
3907
- }, async ({ command, saveToFileName }) => {
3924
+ }, async ({ command, dir, saveToFileName }) => {
3908
3925
  try {
3909
3926
  // 验证session状态
3910
3927
  const currentSession = await validateSession('run-ffmpeg-command');
@@ -3928,7 +3945,7 @@ server.registerTool('run-ffmpeg-command', {
3928
3945
  }
3929
3946
  console.log(`Running command: ${finalCommand}`);
3930
3947
  // 构建工作目录路径 - materials 目录
3931
- const workDir = `/home/user/cerevox-zerocut/projects/${terminal.id}/materials`;
3948
+ const workDir = `/home/user/cerevox-zerocut/projects/${terminal.id}/${dir}`;
3932
3949
  // 执行命令,用一个独立的命令行以免影响当前会话的cwd
3933
3950
  const response = await terminal.create().run(finalCommand, {
3934
3951
  cwd: workDir,