diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2013-06-20 19:21:49 +0200 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-06-20 19:21:49 +0200 |
commit | 1fc7dfe68f7b1eb784fd80ecd6774b52eaab3186 (patch) | |
tree | 6623902b7dc7c59d6cffdc3037fc0f6b6397d19a /TOOLS/vf_dlopen | |
parent | c430d89adbda1f4be542b98a52ed4828f63750d1 (diff) | |
download | mpv-1fc7dfe68f7b1eb784fd80ecd6774b52eaab3186.tar.bz2 mpv-1fc7dfe68f7b1eb784fd80ecd6774b52eaab3186.tar.xz |
ildetect.sh: add a quiet mode; verify telecine decision
For quiet mode: ILDETECT_QUIET=1 ildetect.sh ...
Telecine decision (guess by ildetect.so) is verified by retrying the
ildetect run with the pullup filter inserted.
Diffstat (limited to 'TOOLS/vf_dlopen')
-rwxr-xr-x | TOOLS/vf_dlopen/ildetect.sh | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/TOOLS/vf_dlopen/ildetect.sh b/TOOLS/vf_dlopen/ildetect.sh index 44a9e4ef05..6c9f3003cd 100755 --- a/TOOLS/vf_dlopen/ildetect.sh +++ b/TOOLS/vf_dlopen/ildetect.sh @@ -14,6 +14,7 @@ esac : ${ILDETECT_MPV:=$MPV} : ${ILDETECT_MPVFLAGS:=--start=35% --length=35} : ${ILDETECT_DRY_RUN:=} +: ${ILDETECT_QUIET:=} : ${MAKE:=make} # exit status: @@ -33,7 +34,8 @@ testfun() --vf=dlopen="$MYDIR/ildetect.so" \ --o= --vo=null --no-audio --untimed \ $ILDETECT_MPVFLAGS \ - | tee /dev/stderr | grep "^ildetect:" + | { if [ -n "$ILDETECT_QUIET" ]; then cat; else tee /dev/stderr; fi } \ + | grep "^ildetect:" } out=`testfun "$@"` @@ -45,10 +47,21 @@ case "$out" in exit 0 ;; *"probably: TELECINED"*) - [ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre pullup - r=$? - [ $r -eq 0 ] || exit $(($r | 16)) - exit 1 + out2=`ILDETECT_MPVFLAGS="$ILDETECT_MPVFLAGS --vf-pre=pullup,scale" testfun "$@"` + case "$out2" in + *"probably: TELECINED"*|*"probably: INTERLACED"*) + [ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre yadif + r=$? + [ $r -eq 0 ] || exit $(($r | 16)) + exit 2 + ;; + *) + [ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre pullup + r=$? + [ $r -eq 0 ] || exit $(($r | 16)) + exit 1 + ;; + esac ;; *"probably: INTERLACED"*) [ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre yadif |