1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 00:07:33 +00:00

idet.sh: Fix telecine detection.

This commit is contained in:
Rudolf Polzer 2014-07-15 11:10:24 +02:00
parent 23a7257cca
commit f5449870e0

View File

@ -30,7 +30,7 @@ esac
testfun() testfun()
{ {
$ILDETECT_MPV "$@" \ $ILDETECT_MPV "$@" \
--vf=lavfi="[idet]" --msg-level ffmpeg=v \ --vf-add=lavfi="[idet]" --msg-level ffmpeg=v \
--o= --vo=null --no-audio --untimed \ --o= --vo=null --no-audio --untimed \
$ILDETECT_MPVFLAGS \ $ILDETECT_MPVFLAGS \
| { if [ -n "$ILDETECT_QUIET" ]; then cat; else tee /dev/stderr; fi } \ | { if [ -n "$ILDETECT_QUIET" ]; then cat; else tee /dev/stderr; fi } \
@ -87,7 +87,7 @@ judge()
echo "$verdict" echo "$verdict"
} }
judge "$@" judge --vf-clr "$@"
case "$verdict" in case "$verdict" in
progressive) progressive)
[ -n "$ILDETECT_DRY_RUN" ] || \ [ -n "$ILDETECT_DRY_RUN" ] || \
@ -98,7 +98,7 @@ case "$verdict" in
exit 0 exit 0
;; ;;
interlaced-tff) interlaced-tff)
judge "$@" --vf-pre=pullup --field-dominance=top judge "$@" --vf-clr --vf-pre=pullup --field-dominance=top
case "$verdict" in case "$verdict" in
progressive) progressive)
[ -n "$ILDETECT_DRY_RUN" ] || \ [ -n "$ILDETECT_DRY_RUN" ] || \
@ -117,7 +117,7 @@ case "$verdict" in
esac esac
;; ;;
interlaced-bff) interlaced-bff)
judge "$@" --vf-pre=pullup --field-dominance=bottom judge "$@" --vf-clr --vf-pre=pullup --field-dominance=bottom
case "$verdict" in case "$verdict" in
progressive) progressive)
[ -n "$ILDETECT_DRY_RUN" ] || \ [ -n "$ILDETECT_DRY_RUN" ] || \
@ -136,7 +136,7 @@ case "$verdict" in
esac esac
;; ;;
interlaced) interlaced)
judge "$@" --vf-pre=pullup judge "$@" --vf-clr --vf-pre=pullup
case "$verdict" in case "$verdict" in
progressive) progressive)
[ -n "$ILDETECT_DRY_RUN" ] || \ [ -n "$ILDETECT_DRY_RUN" ] || \