mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-03-16 11:10:10 +00:00
handle when crop values are all 0 and supmover minimally warning about cropping
This commit is contained in:
@@ -266,6 +266,9 @@ setup_pgs_mkv() {
|
||||
right=${left}
|
||||
bottom=${top}
|
||||
fi
|
||||
|
||||
# only crop if actually required
|
||||
if [[ "${left}${top}${right}${bottom}" != "0000" ]]; then
|
||||
# crop sup
|
||||
(
|
||||
set -x
|
||||
@@ -277,7 +280,8 @@ setup_pgs_mkv() {
|
||||
)
|
||||
local cropRet=$?
|
||||
# supmover does not error for out-of-bounds subtitles
|
||||
if grep 'Window is outside new screen area' "${cropSup}.out"; then
|
||||
# so error only when there is most certainly an issue
|
||||
if [[ "$(grep -c 'Window is outside new screen area' "${cropSup}.out")" -gt 5 ]]; then
|
||||
echo_fail "check ${cropSup}.out for complete logs"
|
||||
cropRet=1
|
||||
fi
|
||||
@@ -289,6 +293,10 @@ setup_pgs_mkv() {
|
||||
# create placeholder copy for replacement
|
||||
cp "${ogSup}" "${cropSup}" || return 1
|
||||
fi
|
||||
else
|
||||
# create placeholder copy for replacement
|
||||
cp "${ogSup}" "${cropSup}" || return 1
|
||||
fi
|
||||
|
||||
if ! replace_mkv_sup "${INPUT}" "${cropSup}" "${cropMkv}" "${stream}"; then
|
||||
echo_fail "could not replace mkv sup for ${stream}"
|
||||
|
||||
Reference in New Issue
Block a user