利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.
Python ai-video-generatorcontent-creationffmpeginstagram-reelsllmpythonshort-videosubtitlestext-to-speechtiktokvideo-automationvideo-workflowworkflow-automationyoutube-shorts
fix: accept uppercase local video extensions
Harrya338a8f88d90
diff --git a/app/controllers/v1/video.py b/app/controllers/v1/video.pyindex e7b2b7f8..cbf2fc1c 100644--- a/app/controllers/v1/video.py+++ b/app/controllers/v1/video.py@@ -255,7 +255,9 @@ def upload_video_material_file(request: Request, file: UploadFile = File(...)):request_id = base.get_task_id(request)# check file extallowed_suffixes = ("mp4", "mov", "avi", "flv", "mkv", "jpg", "jpeg", "png")- if file.filename.endswith(allowed_suffixes):+ normalized_filename = (file.filename or "").lower()+ # 统一按小写扩展名校验,兼容 .MOV 这类大写后缀文件。+ if normalized_filename.endswith(allowed_suffixes):local_videos_dir = utils.storage_dir("local_videos", create=True)save_path = os.path.join(local_videos_dir, file.filename)# save filediff --git a/webui/Main.py b/webui/Main.pyindex 49603bd7..1934733a 100644--- a/webui/Main.py+++ b/webui/Main.py@@ -582,9 +582,11 @@ with middle_panel:config.app["video_source"] = params.video_sourceif params.video_source == "local":+ # Streamlit 的文件类型校验对扩展名大小写敏感,这里同时放行大小写两种形式。+ local_file_types = ["mp4", "mov", "avi", "flv", "mkv", "jpg", "jpeg", "png"]uploaded_files = st.file_uploader("Upload Local Files",- type=["mp4", "mov", "avi", "flv", "mkv", "jpg", "jpeg", "png"],+ type=local_file_types + [file_type.upper() for file_type in local_file_types],accept_multiple_files=True,)