final fix with autocrop
This commit is contained in:
@@ -298,6 +298,7 @@ def _snap_to_known_ar_cropdetect(w, h, x, y, video_w, video_h, tolerance=0.03):
|
||||
new_h = round(video_w / best_match['ratio'])
|
||||
if new_h % 8 != 0:
|
||||
new_h = new_h + (8 - (new_h % 8))
|
||||
new_h = min(new_h, video_h)
|
||||
new_y = round((video_h - new_h) / 2)
|
||||
if new_y % 2 != 0:
|
||||
new_y -= 1
|
||||
@@ -307,6 +308,7 @@ def _snap_to_known_ar_cropdetect(w, h, x, y, video_w, video_h, tolerance=0.03):
|
||||
new_w = round(video_h * best_match['ratio'])
|
||||
if new_w % 8 != 0:
|
||||
new_w = new_w + (8 - (new_w % 8))
|
||||
new_w = min(new_w, video_w)
|
||||
new_x = round((video_w - new_w) / 2)
|
||||
if new_x % 2 != 0:
|
||||
new_x -= 1
|
||||
|
||||
Reference in New Issue
Block a user