@@ -20,6 +20,7 @@ Required:
2020Crop:
2121 --crop auto Auto-detect black borders (SAFE; won't overcrop)
2222 --crop manual:L:T:R:B Manually crop by pixels (Left,Top,Right,Bottom)
23+ --crop none Disable all cropping
2324 --probe-seconds S Seconds to analyze for auto-crop (default: 6)
2425
2526Fit/Output:
@@ -69,6 +70,7 @@ while [[ $# -gt 0 ]]; do
6970 -o|--output) OUTPUT=" ${2:- } " ; shift 2 ;;
7071 --crop)
7172 if [[ " ${2:- } " == " auto" ]]; then CROP_MODE=" auto" ; shift 2
73+ elif [[ " ${2:- } " == " none" ]]; then CROP_MODE=" none" ; shift 2
7274 elif [[ " ${2:- } " =~ ^manual: ]]; then CROP_MODE=" manual" ; CROP_SPEC=" ${2# manual: } " ; shift 2
7375 else echo " Invalid --crop value" ; exit 1; fi ;;
7476 --fit) FIT=" ${2:- } " ; shift 2 ;;
197199case " $CROP_MODE " in
198200 auto)
199201 DET=" $( autodetect_crop_whxy || true) "
200- SAFE=" $( synthesize_safe_916_crop " $IW " " $IH " " ${DET:- } " ) "
201- vf_chain+=(" crop=${SAFE}${CROP_SUFFIX} " )
202+ if [[ " $FIT " == " shortsmart" || " $FIT " == " cropfill" ]]; then
203+ SAFE=" $( synthesize_safe_916_crop " $IW " " $IH " " ${DET:- } " ) "
204+ vf_chain+=(" crop=${SAFE}${CROP_SUFFIX} " )
205+ else
206+ # For pad/stretch, only remove detected black bars; don't force 9:16 crop.
207+ if [[ -n " $DET " ]]; then
208+ vf_chain+=(" crop=${DET}${CROP_SUFFIX} " )
209+ fi
210+ fi
202211 ;;
203212 manual)
204213 IFS=' :' read -r L T R B <<< " $CROP_SPEC"
@@ -212,7 +221,10 @@ case "$CROP_MODE" in
212221 vf_chain+=(" crop=${MAN}${CROP_SUFFIX} " )
213222 fi
214223 ;;
215- * ) # none
224+ none)
225+ # Explicitly disable cropping.
226+ ;;
227+ * ) # default
216228 if [[ " $FIT " == " shortsmart" || " $FIT " == " cropfill" ]]; then
217229 # No bars removal requested; derive 9:16 from full frame
218230 SAFE=" $( synthesize_safe_916_crop " $IW " " $IH " " ${IW} :${IH} :0:0" ) "
0 commit comments