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

unusual glitchy "scratch" artifacts on one source #19

Open
Statick opened this issue Oct 15, 2020 · 4 comments
Open

unusual glitchy "scratch" artifacts on one source #19

Statick opened this issue Oct 15, 2020 · 4 comments

Comments

@Statick
Copy link

Statick commented Oct 15, 2020

I'm using TDeint 1.7 with Staxrip 2.1.3.0
I've opened a .d2v source and have no other filters in my script except for TDeint(), no parameters just the defaults

I'm getting these very strange artifacts that look a bit like film scratches - mostly appearing in the top right corner here https://ibb.co/wJf41Dd but with a couple of lighter coloured artifacts elsewhere across the frame as well

They aren't present in the source (this part of the source is very blurry so there's no hard edges like this at all), and they don't appear if I use other deinterlacers such as FieldDeinterlace(). They remain consistent, not changing at all over multiple frames, usually only disappearing (and new ones appearing) when there's a scene change, but they will stay fixed in place even as the camera pans around etc, so they don't appear to be attached to the image itself, although they do change when there's a scene change

Staxrip is bundled with TD 1.5 and it was doing it on that as well, prompting me to look for an update, which I have installed, and it's still doing it on 1.7. I've switched to FieldDeinterlace(full = false, blend = false) and the artifacts are gone, so that's sorted my project for now at least, but I felt this warranted investigation anyway

I'm aware that there's possibly some parameters that might solve this if adjusted, but as I have no idea what could possibly lead to such artifacts, I also have no idea what to change to try and resolve them. This is an unusual source in that most of the video is not interlaced, but the intro sequence has a mixture of interlaced and non-interlaced scenes, and for most of it the picture is split vertically to show two scenes simultaneously, side-by-side, and sometimes one side is interlaced and the other is not. So it needs an adaptive deinterlacer to sort it.

@pinterf
Copy link
Owner

pinterf commented Oct 15, 2020

Could you prepare me a small fragment of this source for me to reproduce? Thanks

@Statick
Copy link
Author

Statick commented Oct 16, 2020

here's the intro sequence
the screenshot in my first post is frame 611
https://drive.google.com/file/d/1QSLc_l13HCMbcPljIGTxCjyYN5nU7WXe/view?usp=sharing

@pinterf
Copy link
Owner

pinterf commented Oct 17, 2020

Thanks, I can see the artifacts. They exist even in the original TDeint v1.1 (from 2007), regardless of YV12 or YUY2 format. I think the algorithm has sometimes wrong decision on what to mask and from where should it grab the actual content. Nevertheless, this clip is surely not an easy one to process.

You can try to visualize the actual decision by a color map, e.g. TDeint(map=1) for other values see TDeint.html for further reference.
Looking at the documentation again, I found a parameter that helped somewhat: I was able to decrease the residual combing with TDeint(mthreshL=1) but I don't know what other things it makes worse in exchange. Maybe nothing.

@Statick
Copy link
Author

Statick commented Oct 18, 2020

thanks, I was hoping there would be an easy answer to this but apparently not!
I guess with it being a "high speed" section where every frame changes a lot, it becomes difficult to process

I realised that using FieldDeinterlace() on my project was producing inferior results overall, so I became determined to find a way to make TDeint() work, as the overall result is much better looking (apart from obvious artifcacts during the intro)

I found the parameter AP and by setting AP=20 it has almost completely removed the artifacts (they are still slightly visible but it's improved 95%), and when watching the clip they now cannot be noticed, so I'm happy with that. I still need to make sure this change hasn't impacted the rest of the project, as the docs suggest a minimum value of 25 here, but so far it's looking good

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

2 participants