1, 支持AI生成文案预览
2, 支持自定义视频文案,关键词 3, 可选择是否启用字幕 4, UI优化 5, 一些其他bug修复和优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
punctuations = [
|
||||
"?", ",", ".", "、", ";",
|
||||
"?", ",", "。", "、", ";",
|
||||
"?", ",", ".", "、", ";", ":",
|
||||
"?", ",", "。", "、", ";", ":",
|
||||
]
|
||||
|
||||
@@ -8,6 +8,11 @@ import warnings
|
||||
warnings.filterwarnings("ignore", category=UserWarning, message="Field name.*shadows an attribute in parent.*")
|
||||
|
||||
|
||||
class VideoConcatMode(str, Enum):
|
||||
random = "random"
|
||||
sequential = "sequential"
|
||||
|
||||
|
||||
class VideoAspect(str, Enum):
|
||||
landscape = "16:9"
|
||||
portrait = "9:16"
|
||||
@@ -23,6 +28,12 @@ class VideoAspect(str, Enum):
|
||||
return 1080, 1920
|
||||
|
||||
|
||||
class MaterialInfo:
|
||||
provider: str = "pexels"
|
||||
url: str = ""
|
||||
duration: int = 0
|
||||
|
||||
|
||||
VoiceNames = [
|
||||
# zh-CN
|
||||
"female-zh-CN-XiaoxiaoNeural",
|
||||
@@ -77,11 +88,21 @@ class VideoParams:
|
||||
}
|
||||
"""
|
||||
video_subject: str
|
||||
video_script: str = "" # 用于生成视频的脚本
|
||||
video_terms: str = "" # 用于生成视频的关键词
|
||||
video_aspect: Optional[VideoAspect] = VideoAspect.portrait.value
|
||||
video_concat_mode: Optional[VideoConcatMode] = VideoConcatMode.random.value
|
||||
video_clip_duration: Optional[int] = 5
|
||||
|
||||
voice_name: Optional[str] = VoiceNames[0]
|
||||
bgm_name: Optional[str] = "random"
|
||||
bgm_type: Optional[str] = "random"
|
||||
bgm_file: Optional[str] = ""
|
||||
|
||||
subtitle_enabled: Optional[bool] = True
|
||||
font_name: Optional[str] = "STHeitiMedium.ttc"
|
||||
text_fore_color: Optional[str] = "#FFFFFF"
|
||||
text_background_color: Optional[str] = "transparent"
|
||||
|
||||
font_size: int = 60
|
||||
stroke_color: Optional[str] = "#000000"
|
||||
stroke_width: float = 1.5
|
||||
|
||||
Reference in New Issue
Block a user