Skip to content

Commit f3274ff

Browse files
mose-zmmose-x.zm
andauthored
Add new parameters for generating video results in wan2.6 (#163)
Co-authored-by: mose-x.zm <[email protected]>
1 parent 9f277f7 commit f3274ff

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

samples/VideoSynthesisUsage.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,22 @@ public class VideoSynthesisUsage {
1919
public static void basicCall() throws ApiException, NoApiKeyException, InputRequiredException {
2020
VideoSynthesis vs = new VideoSynthesis();
2121
List<String> referenceVideoUrls = new ArrayList<>();
22-
referenceVideoUrls.add("https://test-data-center.oss-accelerate.aliyuncs.com/wanx/video/resources/with_human_voice_11s.mov");
22+
referenceVideoUrls.add("https://cdn.wanx.aliyuncs.com/wanx/1014827220770308/upload-video-cut/cda0f4dc063ec258184263691558af36.mp4");
23+
24+
List<String> referenceVideoDescription = new ArrayList<>();
25+
referenceVideoDescription.add("这段视频展示一位年轻女性(<cast>)身着灰色长袖上衣与裤子,乌黑长发垂落,面容清秀。她先低头后抬头,目光侧移,继而转身背对再面向镜头,动作流畅自然。背景为素净灰色墙面,环境简约无装饰。镜头由面部特写缓缓拉远至全身,光影柔和,突出人物形态与情绪。");
2326
VideoSynthesisParam param =
2427
VideoSynthesisParam.builder()
2528
.model("wan2.6-r2v")
26-
.prompt("一只小猫在月光下奔跑")
29+
.prompt(" character1 站在海边,吹着海风,夕阳西下,阳光洒在她的脸上")
2730
.referenceVideoUrls(referenceVideoUrls)
31+
.referenceVideoDescription(referenceVideoDescription)
2832
.shotType(VideoSynthesis.ShotType.MULTI)
2933
.watermark(Boolean.TRUE)
3034
.audio(Boolean.TRUE)
35+
.duration(10)
36+
.promptExtend(Boolean.TRUE)
37+
.size("1280*720")
3138
.build();
3239
VideoSynthesisResult result = vs.call(param);
3340
System.out.println(result);

src/main/java/com/alibaba/dashscope/aigc/videosynthesis/VideoSynthesisOutput.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,10 @@ public class VideoSynthesisOutput {
1717

1818
@SerializedName("video_url")
1919
private String videoUrl;
20+
21+
@SerializedName("check_audio")
22+
private String checkAudio;
23+
24+
@SerializedName("orig_prompt")
25+
private String origPrompt;
2026
}

src/main/java/com/alibaba/dashscope/aigc/videosynthesis/VideoSynthesisUsage.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,17 @@ public class VideoSynthesisUsage {
1313

1414
@SerializedName("video_ratio")
1515
private String videoRatio;
16+
17+
private float duration;
18+
19+
private String size;
20+
21+
@SerializedName("input_video_duration")
22+
private float inputVideoDuration;
23+
24+
@SerializedName("output_video_duration")
25+
private float outputVideoDuration;
26+
27+
@SerializedName("SR")
28+
private String SR;
1629
}

0 commit comments

Comments
 (0)