Log in

View Full Version : VIVTC usage, trying to find a good config to fix combing


PackonS
19th December 2020, 13:25
Hey everyone! I've been trying to come up with a good configuration that deinterlaces my source which is interlaced blu-ray.

I've gotten excellent results with other sources but I am struggling a lot to get some combed removed from this one.

I have to say I've tried a lot of methods from the ones I've found online and this one has given me the best results:

def postprocess(n, f, clip, deinterlaced):
if f.props['_Combed'] > 0:
return deinterlaced
else:
return clip
input_clip = core.dgdecodenv.DGSource(r'J:\SOURCES\Fairy Tail\FT 1\01.dgi')#.text.ClipInfo()
matched_clip = core.vivtc.VFM(input_clip,order=1, field = 0, mode=3)
deinterlaced_clip = core.eedi3.eedi3(matched_clip, field=0)
postprocessed_clip = core.std.FrameEval(matched_clip, functools.partial(postprocess, clip=matched_clip, deinterlaced=deinterlaced_clip), prop_src=matched_clip)
decimated_clip = core.vivtc.VDecimate(postprocessed_clip)
src = decimated_clip

Although this works really well in most parts, the combing persists in some areas, especially in mouth movements.

https://imgur.com/pq8Pg4b
https://imgur.com/pq8Pg4b
https://imgur.com/eyGZ2GR
https://imgur.com/eyGZ2GR
https://imgur.com/ttWM7FC
https://imgur.com/ttWM7FC

I would appreciate any advice, I have tweaked VFM and eedi3 values, played around with the thresh, etc. But I still have this happening maybe around 5 times per episode, it's not a lot but I want to try to encode as perfect as I can, thanks in advance!

Selur
20th December 2020, 09:42
have you tried:
a. bobbing with qtgmc and using sRestore?
b. using vinverse/vinverse2 ?
can't say more without a sample,..

PackonS
20th December 2020, 14:52
Thanks for the reply Selur,
I did try qtgmc and it didn't remove these specific remains of combing, it also created some artifacts in different areas,
vinverse/vinverse2 don't seem to do anything when I use them, perhaps I am not using the right config, I've uploaded
two samples directly from the source, if you could try and let me know if something works on them I would appreciate it.
As I said the combing persists in the mouth movement at some point, not always.

https://mega.nz/folder/M55kHaSQ#E0Um-eAX6MEtuxtqH-v2cw

Selur
20th December 2020, 15:46
Problem is that those combing artifacts are present in the fields itself, so ivtc and deinterlacing will not remove them.
Also those artifacts have do not have a thickness of 1 pixel and thus will not be detected as normal combing artifacts.
Look at the output of the Vapoursynth script without any deinterlacing&co and you'll see for yourself. (alternatively, separate the fields and look at the fields)
-> normal automated field matching will not remove those artifacts

PackonS
20th December 2020, 21:05
Thanks man, I understand and it's quite a relief, I thought I was doing something wrong!

foxyshadis
21st December 2020, 01:15
I would definitely check out srestore in havsfunc. You'll probably need to perform a further vertical blend after a basic bobbing and before srestore for good results, but there's not much help for it, only so much can be done for interlaced video that's been vertically resized. Yadifmod makes for a good bobber that won't introduce too many artifacts on a bad source.

PackonS
22nd December 2020, 01:14
I would definitely check out srestore in havsfunc. You'll probably need to perform a further vertical blend after a basic bobbing and before srestore for good results, but there's not much help for it, only so much can be done for interlaced video that's been vertically resized. Yadifmod makes for a good bobber that won't introduce too many artifacts on a bad source.

Thanks for the answer! May I know how your suggestion would look written in code? Thanks!