Log in

View Full Version : Highlight combed sections of video?


bcn_246
3rd March 2016, 14:07
Hey,

I wondered if there was any way of highlighting any residual interlacing (like that detected with Vinverse). Either highlighting combed sections in bright red or something and/or outputting a list of frames with residual combing to a log file.

Thanks,

Ben

Sharc
3rd March 2016, 14:30
What comes into my mind is the Decomb avisynth-plugin:

FieldDeinterlace(map=true)

or

IsCombed()

You'll find more details in the documentation which is included in the package.

StainlessS
3rd March 2016, 14:34
You could try IsCombed http://avisynth.nl/index.php/Decomb
together with ScriptClip, and write frames to file.

FrameSel(c,cmd=FramesFileName,Show=True) would allow viewing of just combed frames.
FrameSel(c,cmd=FramesFileName,Show=True,Reject=True) would allow viewing of just NON-combed frames.
And FrameSel_CmdReWrite (from FrameSel) allows to to re-write a file of frame numbers into
a file of FrameRanges.

EDIT: Beaten by a Shark :)

Sharc
3rd March 2016, 14:50
Never mind..... just a random pick :D

cihub
26th March 2016, 21:08
Its' weird that no one gave a proper answer... There's actually a function called CombMask that is present in two flavours: (1) the one from MaskTools v1, (2) another designed from ground up by chikuzen, but is based on code/ideas from TIVTC. chikuzen's plugin uses 5-point sampling to determine combing in a pixel, while Manao's uses 3-point sampling. Both have their own uses. If you want to calculate combing in UV planes as well, I have updated Manao's version in which I have added such functionality. But I guess for your purposes chikuzen's version will do fine...

You can get both versions from the attachment (or if you want to compile yourself: https://github.com/chikuzen/CombMask/tree/master/avisynth). There's static and dynamic DLL for chikuzen's version and only static for mine.

To log combing value you may use this code:

src = %clip%
mt_combmask(thy1=10, thy2=10, y=3, u=-128, v=-128)
WriteFile("c:\log.txt", """ ScriptClip(String(AverageLuma())) """)


Haven't tested the code, but it should be enough to get started.


Update.
Me and my memory... Forgot to mention why you may want to choose chikuzen's version: it has an option to use motion compensation, which is very useful. But there's one caveat: mocomping breaks detection during static blending/fades.