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