From 0ceb15b0be7583f3d71e4fec900703f8c0bf4c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E9=BA=92?= Date: Wed, 17 Jun 2026 20:19:37 +0800 Subject: [PATCH] fix(video): correct resolution/ratio flag descriptions --- packages/cli/src/commands/video/generate.ts | 20 ++++---------------- packages/cli/src/commands/video/ref.ts | 4 ++-- skills/bailian-cli/reference/video.md | 10 +++++----- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/packages/cli/src/commands/video/generate.ts b/packages/cli/src/commands/video/generate.ts index af02faf..4888dee 100644 --- a/packages/cli/src/commands/video/generate.ts +++ b/packages/cli/src/commands/video/generate.ts @@ -28,18 +28,6 @@ import { BOOL_FLAG_WATERMARK, } from "../../utils/flag-descriptions.ts"; -// Normalize shorthand resolution (720P, 1080P) to pixel format for video generation models -const RESOLUTION_SHORTCUTS: Record = { - "720p": "1280*720", - "1080p": "1920*1080", - "480p": "832*480", -}; - -function normalizeResolution(res: string | undefined): string | undefined { - if (!res) return undefined; - return RESOLUTION_SHORTCUTS[res.toLowerCase()] || res; -} - export default defineCommand({ name: "video generate", description: @@ -56,8 +44,8 @@ export default defineCommand({ flag: "--negative-prompt ", description: "Negative prompt to exclude unwanted content", }, - { flag: "--resolution ", description: "Resolution (e.g. 1280*720, 960*960)" }, - { flag: "--ratio ", description: "Aspect ratio (e.g. 16:9, 1:1)" }, + { flag: "--resolution ", description: "Resolution: 720P or 1080P (default: 1080P)" }, + { flag: "--ratio ", description: "Aspect ratio (e.g. 16:9, 9:16, 1:1)" }, { flag: "--duration ", description: "Video duration in seconds (default: 5)", @@ -88,7 +76,7 @@ export default defineCommand({ 'bl video generate --prompt "A person reading a book, static shot"', 'bl video generate --prompt "Ocean waves at sunset." --download sunset.mp4', 'bl video generate --image https://example.com/cat.png --prompt "Make the cat in the scene move"', - 'bl video generate --prompt "Mountain landscape" --resolution 1280*720 --duration 5', + 'bl video generate --prompt "Mountain landscape" --resolution 720P --duration 5', 'bl video generate --prompt "A cat playing with a ball" --watermark false', ], async run(config: Config, flags: GlobalFlags) { @@ -136,7 +124,7 @@ export default defineCommand({ : {}), }, parameters: { - resolution: normalizeResolution(flags.resolution as string) || undefined, + resolution: (flags.resolution as string) || undefined, ratio: (flags.ratio as string) || undefined, duration: (flags.duration as number) || undefined, prompt_extend: promptExtend, diff --git a/packages/cli/src/commands/video/ref.ts b/packages/cli/src/commands/video/ref.ts index f5c7ec7..616691c 100644 --- a/packages/cli/src/commands/video/ref.ts +++ b/packages/cli/src/commands/video/ref.ts @@ -59,11 +59,11 @@ export default defineCommand({ description: "Voice URL for corresponding ref-video (pairs by position)", type: "array", }, - { flag: "--resolution ", description: "Resolution: 720P or 1080P (default: 720P)" }, + { flag: "--resolution ", description: "Resolution: 720P or 1080P (default: 1080P)" }, { flag: "--ratio ", description: "Aspect ratio (16:9, 9:16, 1:1)" }, { flag: "--duration ", - description: "Video duration in seconds (2-10, default: 5)", + description: "Video duration in seconds (default: 5)", type: "number", }, { diff --git a/skills/bailian-cli/reference/video.md b/skills/bailian-cli/reference/video.md index 9f3ea6b..9979c88 100644 --- a/skills/bailian-cli/reference/video.md +++ b/skills/bailian-cli/reference/video.md @@ -105,8 +105,8 @@ bl video edit --video https://example.com/input.mp4 --prompt "Put clothes on the | `--prompt ` | string | yes | Video description | | `--image ` | string | no | Input image URL for image-to-video generation | | `--negative-prompt ` | string | no | Negative prompt to exclude unwanted content | -| `--resolution ` | string | no | Resolution (e.g. 1280*720, 960*960) | -| `--ratio ` | string | no | Aspect ratio (e.g. 16:9, 1:1) | +| `--resolution ` | string | no | Resolution: 720P or 1080P (default: 1080P) | +| `--ratio ` | string | no | Aspect ratio (e.g. 16:9, 9:16, 1:1) | | `--duration ` | number | no | Video duration in seconds (default: 5) | | `--prompt-extend ` | string | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). | | `--watermark ` | string | no | Enable watermark (true/false). Omit flag to use CLI default (true). | @@ -131,7 +131,7 @@ bl video generate --image https://example.com/cat.png --prompt "Make the cat in ``` ```bash -bl video generate --prompt "Mountain landscape" --resolution 1280*720 --duration 5 +bl video generate --prompt "Mountain landscape" --resolution 720P --duration 5 ``` ```bash @@ -156,9 +156,9 @@ bl video generate --prompt "A cat playing with a ball" --watermark false | `--ref-video ` | array | no | Reference video URL or local file (repeatable) | | `--image-voice ` | array | no | Voice URL for corresponding image (pairs by position) | | `--video-voice ` | array | no | Voice URL for corresponding ref-video (pairs by position) | -| `--resolution ` | string | no | Resolution: 720P or 1080P (default: 720P) | +| `--resolution ` | string | no | Resolution: 720P or 1080P (default: 1080P) | | `--ratio ` | string | no | Aspect ratio (16:9, 9:16, 1:1) | -| `--duration ` | number | no | Video duration in seconds (2-10, default: 5) | +| `--duration ` | number | no | Video duration in seconds (default: 5) | | `--prompt-extend ` | string | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). | | `--watermark ` | string | no | Enable watermark (true/false). Omit flag to use CLI default (true). | | `--seed ` | number | no | Random seed for reproducible generation |