修复居中切割的问题
This commit is contained in:
parent
cf43e6d549
commit
744fe28421
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user