|
|
@@ -9,6 +9,11 @@ import lombok.Data; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* https://note.youdao.com/s/7OZ5UfES |
|
|
|
* @author Administrator |
|
|
|
* |
|
|
|
*/ |
|
|
|
@Data |
|
|
|
public class AiVideoParam { |
|
|
|
/** |
|
|
@@ -49,58 +54,6 @@ public class AiVideoParam { |
|
|
|
|
|
|
|
private Map<String,Object> subtitle; |
|
|
|
|
|
|
|
public String neglectImgString(){ |
|
|
|
StringBuffer str = new StringBuffer(); |
|
|
|
str.append("{"); |
|
|
|
str.append("\"gen_txt\":").append("\"").append(gen_txt).append("\","); |
|
|
|
str.append("\"video_template_id\":").append("\"").append(video_template_id).append("\","); |
|
|
|
str.append("\"voice_id\":").append("\"").append(voice_id).append("\","); |
|
|
|
str.append("\"voice_style\":").append("\"").append(voice_style).append("\","); |
|
|
|
if (StringUtils.isNotBlank(tenancy_logo)) { |
|
|
|
str.append("\"tenancy_logo\":").append("\"").append(tenancy_logo).append("\","); |
|
|
|
} |
|
|
|
if ( null != user_level) { |
|
|
|
str.append("\"user_level\":").append("").append(user_level).append(","); |
|
|
|
} |
|
|
|
if(video_files != null){ |
|
|
|
str.append("\"video_files\":").append("{"); |
|
|
|
if(video_files.getBack_ground() != null){ |
|
|
|
str.append("\"back_ground\":").append("{") |
|
|
|
.append("\"image\":").append("\"").append("\",") |
|
|
|
.append("\"type\":").append("\"").append(video_files.getBack_ground().getType()).append("\"") |
|
|
|
.append("},"); |
|
|
|
} |
|
|
|
if(video_files.getDigital_human() != null){ |
|
|
|
str.append("\"digital_human\":").append("{") |
|
|
|
.append("\"coord\":").append(JSONObject.toJSONString(video_files.getDigital_human().getCoord())).append(",") |
|
|
|
.append("\"level\":").append(video_files.getDigital_human().getLevel()).append(",") |
|
|
|
.append("\"ratio\":").append(video_files.getDigital_human().getRatio()) |
|
|
|
.append("},"); |
|
|
|
} |
|
|
|
if(video_files.getMaterial() != null && video_files.getMaterial().size() > 0){ |
|
|
|
str.append("\"material\":").append("["); |
|
|
|
for (Material material:video_files.getMaterial()) { |
|
|
|
if(material != null){ |
|
|
|
str.append("{"); |
|
|
|
str.append("\"coord\":").append(JSONObject.toJSONString(material.getCoord())).append(",") |
|
|
|
.append("\"image\":").append("\"").append("\",") |
|
|
|
.append("\"level\":").append(material.getLevel()).append(",") |
|
|
|
.append("\"ratio\":").append(material.getRatio()); |
|
|
|
str.append("},"); |
|
|
|
} |
|
|
|
} |
|
|
|
str.deleteCharAt(str.length()-1); |
|
|
|
str.append("]"); |
|
|
|
} |
|
|
|
str.append("},"); |
|
|
|
} |
|
|
|
str.deleteCharAt(str.length()-1); |
|
|
|
str.append("\"subtitle\":").append(JSON.toJSONString(subtitle)); |
|
|
|
str.append("}"); |
|
|
|
|
|
|
|
return str.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
@Data |
|
|
|
public static class VideoFiles { |
|
|
|
private BackGround back_ground; |
|
|
|