From 744fe28421e866ee5083b9908e226323019930c9 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 10 Mar 2025 15:07:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B1=85=E4=B8=AD=E5=88=87?= =?UTF-8?q?=E5=89=B2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entity/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity/ffmpeg.py b/entity/ffmpeg.py index 3558ad2..d296647 100644 --- a/entity/ffmpeg.py +++ b/entity/ffmpeg.py @@ -181,7 +181,7 @@ class FfmpegTask(object): _v_w = pos_json.get('imgWidth', 1) _f_x = pos_json.get('ltX', 0) _f_x2 = pos_json.get('rbX', 0) - _x = f'{float((_f_x2 - _f_x)/(2 * _v_w)) :.4f}*iw' + _x = f'{float((_f_x2 + _f_x)/(2 * _v_w)) :.4f}*iw-ih*ih/(2*iw)' filter_args.append(f"{video_output_str}crop=x={_x}:y=0:w=ih*ih/iw:h=ih[v_cut{effect_index}]") video_output_str = f"[v_cut{effect_index}]" effect_index += 1