From 6dec46f809b8aa4d070289a6eab2d0c95384a3ce Mon Sep 17 00:00:00 2001 From: Adam Djellouli <37275728+djeada@users.noreply.github.com> Date: Wed, 3 Sep 2025 19:35:00 +0000 Subject: [PATCH] fix(make_short): shift content right with left padding instead of overlay; preserve full video --- src/make_short.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/make_short.sh b/src/make_short.sh index d1fb79c..bd9605a 100755 --- a/src/make_short.sh +++ b/src/make_short.sh @@ -236,9 +236,12 @@ case "$FIT" in *) echo "Invalid --fit: $FIT"; exit 1 ;; esac -# Overlay left black margin on the final 1080x1920 frame without distorting content +# Apply left safety margin without covering or cropping content: +# - scale to fit within (1080 - SAFE_LEFT) x 1920 preserving AR +# - then pad to 1080x1920 with left offset SAFE_LEFT and vertical centering if (( SAFE_LEFT > 0 )); then - vf_chain+=("drawbox=x=0:y=0:w=${SAFE_LEFT}:h=ih:color=black:t=fill") + vf_chain+=("scale=${TW}:1920:force_original_aspect_ratio=decrease:force_divisible_by=2") + vf_chain+=("pad=1080:1920:${SAFE_LEFT}:floor((oh-ih)/2)") fi # Pixel/Display aspect