diff options
Diffstat (limited to 'TOOLS/vf_dlopen/ildetect.sh')
-rwxr-xr-x | TOOLS/vf_dlopen/ildetect.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/TOOLS/vf_dlopen/ildetect.sh b/TOOLS/vf_dlopen/ildetect.sh new file mode 100755 index 0000000000..e9027077d2 --- /dev/null +++ b/TOOLS/vf_dlopen/ildetect.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +case "$0" in + */*) + MYDIR=${0%/*} + ;; + *) + MYDIR=. + ;; +esac + +set -e + +make -C "$MYDIR" + +testfun() +{ + ${MPV:-mpv} "$@" \ + -vf dlopen="$MYDIR/ildetect.so" \ + -o /dev/null -of nut -ovc rawvideo -no-audio \ + | grep "^ildetect:" +} + +out=`testfun "$@"` +echo +echo +echo "$out" +echo +echo +case "$out" in + *"probably: PROGRESSIVE"*) + ${MPV:-mpv} "$@" + ;; + *"probably: INTERLACED"*) + ${MPV:-mpv} "$@" -vf-pre yadif + ;; + *"probably: TELECINED"*) + ${MPV:-mpv} "$@" -vf-pre pullup + ;; + *) + false + ;; +esac |