@infimind/video-mcp-cli 1.0.3 → 1.0.5
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/dist/index.js +0 -0
- package/dist/server.js +13 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/server.js
CHANGED
|
@@ -48,36 +48,31 @@ export function createServer(token, apiBaseUrl) {
|
|
|
48
48
|
type: "string",
|
|
49
49
|
description: "可选的参考图片 - 可以是本地文件路径(如 /path/to/image.jpg)或公网 URL。本地文件会被自动转换为 base64",
|
|
50
50
|
},
|
|
51
|
-
model: {
|
|
52
|
-
type: "string",
|
|
53
|
-
description: "使用的视频模型:sora_video2-15s(默认)或 sora-pro",
|
|
54
|
-
enum: ["sora_video2-15s", "sora-pro"],
|
|
55
|
-
},
|
|
56
51
|
size: {
|
|
57
52
|
type: "string",
|
|
58
|
-
description: "视频分辨率(默认:
|
|
59
|
-
enum: ["
|
|
53
|
+
description: "视频分辨率(默认:1280x720)",
|
|
54
|
+
enum: ["1280x720", "720x1280"],
|
|
60
55
|
},
|
|
61
56
|
seconds: {
|
|
62
57
|
type: "number",
|
|
63
|
-
description: "
|
|
64
|
-
enum: [10, 15],
|
|
58
|
+
description: "视频时长(秒)。S2路线: 10或15秒;S5路线: 5、10或15秒",
|
|
59
|
+
enum: [5, 10, 15],
|
|
65
60
|
},
|
|
66
61
|
language: {
|
|
67
62
|
type: "string",
|
|
68
63
|
description: "视频的目标语言(默认:zh-CN)",
|
|
69
|
-
enum: ["zh-CN", "en-US", "ja-JP", "ko-KR", "es-ES", "fr-FR"],
|
|
64
|
+
enum: ["zh-CN", "en-US", "ja-JP", "ko-KR", "es-ES", "fr-FR", "th-TH", "id-ID", "de-DE", "pt-PT", "bn-BD", "ru-RU", "ar-SA", "zh-HK", "hi-IN"],
|
|
70
65
|
},
|
|
71
66
|
count: {
|
|
72
67
|
type: "number",
|
|
73
|
-
description: "生成的视频数量(1-
|
|
68
|
+
description: "生成的视频数量(1-12,默认:1)",
|
|
74
69
|
minimum: 1,
|
|
75
|
-
maximum:
|
|
70
|
+
maximum: 12,
|
|
76
71
|
},
|
|
77
72
|
route: {
|
|
78
73
|
type: "string",
|
|
79
|
-
description: "使用的 API 线路:
|
|
80
|
-
enum: ["
|
|
74
|
+
description: "使用的 API 线路:S2=sora(默认)或 S5=seedance。注意:S5 (Seedance) 仅限 VIP 用户使用",
|
|
75
|
+
enum: ["S2", "S5"],
|
|
81
76
|
},
|
|
82
77
|
},
|
|
83
78
|
required: ["prompt"],
|
|
@@ -244,13 +239,12 @@ async function handleCreateVideoTask(apiBaseUrl, token, args) {
|
|
|
244
239
|
const response = await callRestApi(apiBaseUrl, "/mcp/video/create", {
|
|
245
240
|
token,
|
|
246
241
|
prompt: args.prompt,
|
|
247
|
-
sourceImage: args.sourceImage ? await processFileInput(args.sourceImage) : undefined,
|
|
248
|
-
|
|
249
|
-
size: args.size || "1280x704",
|
|
242
|
+
sourceImage: args.sourceImage ? (await processFileInput(args.sourceImage)).data : undefined,
|
|
243
|
+
size: args.size || "1280x720",
|
|
250
244
|
seconds: args.seconds || 10,
|
|
251
245
|
language: args.language || "zh-CN",
|
|
252
246
|
count: args.count || 1,
|
|
253
|
-
route: args.route || "
|
|
247
|
+
route: args.route || "S2",
|
|
254
248
|
}, "POST");
|
|
255
249
|
const result = [
|
|
256
250
|
`# 视频生成任务已创建`,
|
|
@@ -322,7 +316,7 @@ async function handleGetVideoStatus(apiBaseUrl, token, args) {
|
|
|
322
316
|
async function handleCreateVideoAnalysisTask(apiBaseUrl, token, args) {
|
|
323
317
|
const response = await callRestApi(apiBaseUrl, "/mcp/video-analysis/create", {
|
|
324
318
|
token,
|
|
325
|
-
videoFile: await processFileInput(args.videoFile),
|
|
319
|
+
videoFile: (await processFileInput(args.videoFile)).data,
|
|
326
320
|
}, "POST");
|
|
327
321
|
const result = [
|
|
328
322
|
`# 视频拆解任务已创建`,
|
package/package.json
CHANGED