zhangyong il y a 1 an
Parent
commit
020f7ed9e8
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      video_agc/agc_video_method.py

+ 1 - 1
video_agc/agc_video_method.py

@@ -256,6 +256,7 @@ class AgcVidoe():
             "-safe", "0",
             "-i", f"{t_path}",  # 视频文件列表
             "-i", audio_video,  # 音频文件
+            "-vf", f"scale=320x480,{background_cmd},{subtitle_cmd}",  # 添加背景色和字幕
             "-c:v", "copy",
             "-c:a", "aac",
             "-threads", str(num_threads),
@@ -271,7 +272,6 @@ class AgcVidoe():
             "-shortest",  # 保持与音频时长一致
             "-map", "0:v:0",  # 映射第一个输入的视频流
             "-map", "1:a:0",  # 映射第二个输入的音频流
-            "-vf", f"scale=320x480,{background_cmd},{subtitle_cmd}",  # 添加背景色和字幕
             "-y",  # 覆盖输出文件
             v_path
         ]