Skip to content
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

Can no longer deinterlace certain files with d key #2539

Closed
sumyungguy opened this issue Nov 28, 2015 · 6 comments
Closed

Can no longer deinterlace certain files with d key #2539

sumyungguy opened this issue Nov 28, 2015 · 6 comments

Comments

@sumyungguy
Copy link

Using release 0.10 and later, using the d key to turn on deinterlacing doesn't work for some files that worked in previous versions of mpv.

I added vf-defaults=yadif=field:no to mpv.config. But it still doesn't work. If I turn it on with vf=yadif=field:no it works, but then I can't turn it off with the d key.

It seems that putting frame/field in vf-defaults has an effect, but yes/no for interlaced-only does not. [edit: I was mistaken, frame/field has no effect either.]

Tested on OS X 10.10.

@kevmitch
Copy link
Member

The yadif inserted by the d key only deinterlaces frames tagged interlaced. The non-working files are probably broken. You can try adding --field-dominance=top or bottom (depending on which they are) - the idet filter as inserted with TOOLS/idet.sh or TOOLS/lua/autodeint.lua should be able to figure it out.

Unfortunately, the vf-defaults trick no longer works for the "d" key because of the way that the extra options are added. This is a known issue.
This is a known issue due to the way that the field and interlaced-only options are added.

@ghost
Copy link

ghost commented Nov 29, 2015

The vf-defaults thing could be easily fixed with a hack. But I'm also pondering a --deinterlace=force flag, which would override the current behavior. (I'm also wondering whether the "normal" --deinterlace mode could be made default.)s

@ChrisK2
Copy link
Member

ChrisK2 commented Nov 30, 2015

I'd also like some way to force deinterlacing, ideally toggable during playback.

@sumyungguy
Copy link
Author

Yes, my non-working files are broken. Some of them are interlaced material that were captured as progressive, some are progressive that are flagged interlaced, all have different field dominance...

At first I figured out that I could get the old behavior back of forcing deinterlace by binding: d vf toggle yadif=frame:no - not sure how that's different from changing the deinterlace property, but it seemed to work.

I decided I prefer the "field" setting though. But then I needed a second key to set the field-dominance for the broken files. I guess you'd have the same problem with a --deinterlace=force flag, because generally when you need to force it on, the file isn't flagged properly, and it will be a coin toss whether the default dominance of top is correct.

So I set deinterlace=yes, which just works now for files that are correctly flagged, without having to press any keys. I think it would be reasonable if that was made the default. I tried mapping d cycle field-dominance, which works to force deinterlace on, but I couldn't force it off for files that are incorrectly flagged as interlaced.

I ended up mapping the d key to cycle through forcing deinterlace with bottom, top, or disabled, or back to auto:
d cycle-values deinterlace yes yes no yes; cycle-values field-dominance bottom top auto auto; show-text "deinterlace: ${deinterlace} ${field-dominance}"

That seems to work well. Most of the time I don't have to do anything, and all broken files can be handled with one key.

I did try idet.sh, which didn't seem to do anything, and autodeint.lua, which generally works but isn't always consistent. For example I found it often didn't work right during the opening titles. Still it's good to have as an option.

I also set use-filedir-conf and put some mpv.conf files into folders of files that I know are broken in a particular way, with the appropriate deinterlace and field-dominance settings. So I guess I'm set - actually it's now working better than ever!

@ghost ghost closed this as completed in 7fa06e4 Dec 21, 2015
@mystica555
Copy link

I can't get the proposed solution of

d cycle-values deinterlace yes yes no yes; cycle-values field-dominance bottom top auto auto; show-text "deinterlace: ${deinterlace} ${field-dominance}"

to work

Is there any progress on forcing deinterlace toggleable with the 'd' key?
I am taking advantage of mpv<youtube-dl integration and no videos on Youtube are properly encoded as 'interlaced' yet people with HDV cameras post 50i/60i videos all the time and I want to be able to deinterlace only those and have it toggleable at runtime.

@sumyungguy
Copy link
Author

@mystica555 , there wasn't any progress, since this bug was closed as fixed in 2015. It remained fixed up until release 0.27.0, Sept. 2017.

The above method still works in release 0.26.0, on your example youtube file. Hardware decoding must be turned off. The autodeint.lua script also works, if hardware decoding is off.

As of release 0.27.0, I can't get either of those methods to work. The release notes for 0.27.0 include:

Changed: video: change --deinterlace behavior
Removed: --field-dominance (GPL-only author, no chance of relicensing)

I assume that's why. I tried removing the "field-dominance" part of the command, but it didn't help.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants