zhangyong 1 year ago
parent
commit
df41cf7650
1 changed files with 1 additions and 1 deletions
  1. 1 1
      video_agc/agc_video_method.py

+ 1 - 1
video_agc/agc_video_method.py

@@ -422,7 +422,7 @@ class AgcVidoe():
                 Common.logger("video").info(f"{mark}的{platform}渠道上传到 OSS 生成视频id为:{oss_id}")
                 # 获取新生成视频时长
                 v_path_duration = cls.get_audio_duration(v_path)
-                if v_path_duration > audio_duration+3:
+                if v_path_duration > audio_duration+3 or v_path_duration < audio_duration-3:
                     Common.logger("video").info(f"{mark}的{platform}渠道最终生成视频秒数错误,生成了:{v_path_duration}秒")
                     return ""
                 # 上传 oss