@@ -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-
4331export 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 ,
0 commit comments