Skip to content

Commit c3df659

Browse files
committed
Merge remote-tracking branch 'origin/main' into release/1.4.0
2 parents dc3c02f + 847b291 commit c3df659

3 files changed

Lines changed: 11 additions & 23 deletions

File tree

packages/cli/src/commands/video/generate.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ import {
2828
BOOL_FLAG_WATERMARK,
2929
} from "../../utils/flag-descriptions.ts";
3030

31-
// Normalize shorthand resolution (720P, 1080P) to pixel format for video generation models
32-
const RESOLUTION_SHORTCUTS: Record<string, string> = {
33-
"720p": "1280*720",
34-
"1080p": "1920*1080",
35-
"480p": "832*480",
36-
};
37-
38-
function normalizeResolution(res: string | undefined): string | undefined {
39-
if (!res) return undefined;
40-
return RESOLUTION_SHORTCUTS[res.toLowerCase()] || res;
41-
}
42-
4331
export default defineCommand({
4432
name: "video generate",
4533
description:
@@ -56,8 +44,8 @@ export default defineCommand({
5644
flag: "--negative-prompt <text>",
5745
description: "Negative prompt to exclude unwanted content",
5846
},
59-
{ flag: "--resolution <res>", description: "Resolution (e.g. 1280*720, 960*960)" },
60-
{ flag: "--ratio <ratio>", description: "Aspect ratio (e.g. 16:9, 1:1)" },
47+
{ flag: "--resolution <res>", description: "Resolution: 720P or 1080P (default: 1080P)" },
48+
{ flag: "--ratio <ratio>", description: "Aspect ratio (e.g. 16:9, 9:16, 1:1)" },
6149
{
6250
flag: "--duration <seconds>",
6351
description: "Video duration in seconds (default: 5)",
@@ -88,7 +76,7 @@ export default defineCommand({
8876
'bl video generate --prompt "A person reading a book, static shot"',
8977
'bl video generate --prompt "Ocean waves at sunset." --download sunset.mp4',
9078
'bl video generate --image https://example.com/cat.png --prompt "Make the cat in the scene move"',
91-
'bl video generate --prompt "Mountain landscape" --resolution 1280*720 --duration 5',
79+
'bl video generate --prompt "Mountain landscape" --resolution 720P --duration 5',
9280
'bl video generate --prompt "A cat playing with a ball" --watermark false',
9381
],
9482
async run(config: Config, flags: GlobalFlags) {
@@ -136,7 +124,7 @@ export default defineCommand({
136124
: {}),
137125
},
138126
parameters: {
139-
resolution: normalizeResolution(flags.resolution as string) || undefined,
127+
resolution: (flags.resolution as string) || undefined,
140128
ratio: (flags.ratio as string) || undefined,
141129
duration: (flags.duration as number) || undefined,
142130
prompt_extend: promptExtend,

packages/cli/src/commands/video/ref.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ export default defineCommand({
5959
description: "Voice URL for corresponding ref-video (pairs by position)",
6060
type: "array",
6161
},
62-
{ flag: "--resolution <res>", description: "Resolution: 720P or 1080P (default: 720P)" },
62+
{ flag: "--resolution <res>", description: "Resolution: 720P or 1080P (default: 1080P)" },
6363
{ flag: "--ratio <ratio>", description: "Aspect ratio (16:9, 9:16, 1:1)" },
6464
{
6565
flag: "--duration <seconds>",
66-
description: "Video duration in seconds (2-10, default: 5)",
66+
description: "Video duration in seconds (default: 5)",
6767
type: "number",
6868
},
6969
{

skills/bailian-cli/reference/video.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ bl video edit --video https://example.com/input.mp4 --prompt "Put clothes on the
105105
| `--prompt <text>` | string | yes | Video description |
106106
| `--image <url>` | string | no | Input image URL for image-to-video generation |
107107
| `--negative-prompt <text>` | string | no | Negative prompt to exclude unwanted content |
108-
| `--resolution <res>` | string | no | Resolution (e.g. 1280*720, 960*960) |
109-
| `--ratio <ratio>` | string | no | Aspect ratio (e.g. 16:9, 1:1) |
108+
| `--resolution <res>` | string | no | Resolution: 720P or 1080P (default: 1080P) |
109+
| `--ratio <ratio>` | string | no | Aspect ratio (e.g. 16:9, 9:16, 1:1) |
110110
| `--duration <seconds>` | number | no | Video duration in seconds (default: 5) |
111111
| `--prompt-extend <bool>` | string | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). |
112112
| `--watermark <bool>` | 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
131131
```
132132

133133
```bash
134-
bl video generate --prompt "Mountain landscape" --resolution 1280*720 --duration 5
134+
bl video generate --prompt "Mountain landscape" --resolution 720P --duration 5
135135
```
136136

137137
```bash
@@ -156,9 +156,9 @@ bl video generate --prompt "A cat playing with a ball" --watermark false
156156
| `--ref-video <url>` | array | no | Reference video URL or local file (repeatable) |
157157
| `--image-voice <url>` | array | no | Voice URL for corresponding image (pairs by position) |
158158
| `--video-voice <url>` | array | no | Voice URL for corresponding ref-video (pairs by position) |
159-
| `--resolution <res>` | string | no | Resolution: 720P or 1080P (default: 720P) |
159+
| `--resolution <res>` | string | no | Resolution: 720P or 1080P (default: 1080P) |
160160
| `--ratio <ratio>` | string | no | Aspect ratio (16:9, 9:16, 1:1) |
161-
| `--duration <seconds>` | number | no | Video duration in seconds (2-10, default: 5) |
161+
| `--duration <seconds>` | number | no | Video duration in seconds (default: 5) |
162162
| `--prompt-extend <bool>` | string | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). |
163163
| `--watermark <bool>` | string | no | Enable watermark (true/false). Omit flag to use CLI default (true). |
164164
| `--seed <n>` | number | no | Random seed for reproducible generation |

0 commit comments

Comments
 (0)