zhangyong 1 month ago
parent
commit
52e26f5d50
1 changed files with 3 additions and 0 deletions
  1. 3 0
      workers/consumption_work.py

+ 3 - 0
workers/consumption_work.py

@@ -204,6 +204,9 @@ class ConsumptionRecommend(object):
                                   "【 机器改造通知 】")
                 continue
             logger.info(f"[机器改造] 视频更改分辨率处理")
+            width, height = FFmpeg.get_w_h_size(video_path)
+            if width < height:  # 判断是否需要修改为竖屏
+                video_path = FFmpeg.update_video_h_w(video_path, file_path)
             if task["crop_tool"]:  # 判断是否需要裁剪
                 video_path = FFmpeg.video_crop(video_path, file_path)
             if task["gg_duration"]:  # 判断是否需要指定视频时长