New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just deinterlace when I want deinterlacing #5219

Closed
mystica555 opened this Issue Dec 11, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@mystica555

mystica555 commented Dec 11, 2017

just_freakin_deinterlace_already.patch.txt

mpv version and platform

git master - sabayon linux

Reproduction steps

press 'd' during playback to deinterlace a video pulled with youtube-dl from youtube URL.
ex:
mpv https://www.youtube.com/watch?v=Ka-LEcZaYqQ
(let it buffer/load the video)
press d

Expected behavior

the 50i video to deinterlace properly

Actual behavior

i still see interlacing lines

Log

http://sprunge.us/EBVH
ex:

Sample files

https://www.youtube.com/watch?v=Ka-LEcZaYqQ

Reference Bug:

#2539

??? IS there a way to fix this with simple config file modification?

*** Screenshot attached.
mpv-shot0002

*** Patch attached.

@kevmitch

This comment has been minimized.

Member

kevmitch commented Dec 11, 2017

??? IS there a way to fix this with simple config file modification?

in input.conf:
d set hwdec no ; vf toggle "@deint:yadif

@mystica555

This comment has been minimized.

mystica555 commented Dec 11, 2017

Seems that
"@deint:yadif=send_field"
may be the better method, to actually do what the source does by default of 'send_field'.

I am curious however;

  • How exactly did you come up with the "@deint" part? Where is this particular documented?
  • What does the @ represent?

And, I still think that the source patch should be applied because the default action of "d will deinterlace" should not require manual intervention on the user's part.

Finally are there any good resources to have examples of "all" "working" deinterlace methods and how to specify them in config without going crazy trying everything? I'm even seeing now 'vavpp' which is unknown to me as of yet. Ugh.

@kevmitch

This comment has been minimized.

Member

kevmitch commented Dec 11, 2017

yadif is probably the best deinterlacer. vavpp, vdpaupp and d3d11vpp are for if you must use hwdec but still want deinterlacing. The vavpp deinterlacer in particular is nothing to write home about as it uses the primitive bob method by default. My hardware can't do the more advanced motion-adaptive or motion-compensated methods, which the man page says may be buggy anyway

@kevmitch

This comment has been minimized.

Member

kevmitch commented Dec 11, 2017

And the filter label syntax is covered in the video filters section.

@wm4

This comment has been minimized.

Contributor

wm4 commented Dec 11, 2017

(I think the advanced vavpp methods work fairly well with current hardware and drivers.)

@kevmitch kevmitch self-assigned this Jan 3, 2018

@pcordes

This comment has been minimized.

pcordes commented Jan 7, 2018

+1 for this bug. If you have to hit d to enable deinterlacing in the first place, it should work even if the video is incorrectly flagged (in its own metadata) as progressive.

Ideally this should use the best deinterlacer supported by the system, considering a tradeoff between performance and quality. e.g. HW deinterlace if anything better than bob is available, otherwise yadif. (With a config option to tune this heuristic, so people with slow CPUs or high rez videos can use low-quality HW deinterlacing instead of too-slow CPU deinterlace without having to figure out how to manually specify a given HW deinterlace method.)

@kevmitch

This comment has been minimized.

Member

kevmitch commented Jan 7, 2018

Ideally this should use the best deinterlacer supported by the system, considering a tradeoff between performance and quality. e.g. HW deinterlace if anything better than bob is available, otherwise yadif. (With a config option to tune this heuristic, so people with slow CPUs or high rez videos can use low-quality HW deinterlacing instead of too-slow CPU deinterlace without having to figure out how to manually specify a given HW deinterlace method.)

The deinterlacer used is determined by which hwdec api (if any) is chosen. If hwdec is on, there isn't much choice. The corresponding deinterlacer must be used. We cannot mess with the defaults of the hardware deinterlacer becuase anything else may not be supported on all platforms. However, note that hwdec is off by default. Therefore the best deinterlacer (yadif) is always used in the default case. If the user enables hwdec, there are all kinds of warnings in the manual that it may reduce quality.

Anyway, I think there are three options in order of difficulty:

  • just drop the interlaced-only flag
  • create a property to toggle the interlaced-only flag
  • insert proper detection and labelling of frames before the deinterlacer

This last one would have to let very few interlaced frames go undetected which might be hard.

@kevmitch

This comment has been minimized.

Member

kevmitch commented Jan 7, 2018

@wm4 mentioned that some users just leave deinterlacing on all the time. Simply dropping the interlaced-only flag would mean we're causing them to all of a sudden deinterlace their progressive (possibly hi-res) video. Even if this is obviously their fault, I'd hate to think of the net carbon footprint that would entail.

@kevmitch kevmitch closed this in 830f0ae Feb 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment