Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th January 2025, 21:55   #1  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 324
Vapoursynth: Telecine with VIVIC

How do I accomplish these tasks in Vapoursynth, or just the last part, at least?

Code:
Automatic comparisons with telecine sources can be improved by utilizing VIVTC's frameprops.
The comparison tool can skip frames marked with the Combed property to avoid leftover interlaced frames being left in the comparison.
Additionally, decimation differences can be accounted for by utilizing VIVTC's scene change property and avoiding frames +-1 around scene changes.

Last edited by jay123210599; 19th January 2025 at 22:07.
jay123210599 is offline   Reply With Quote
Old 23rd January 2025, 20:45   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,562
Sounds like normal VIVTC usage with a fallback deinterlacer as post-processor for combed frames:
Code:
clip2clip = clip
clip2clip = havsfunc.QTGMC(Input=clip2clip, Preset="fast", opencl=True, TFF=True, FPSDivisor=2)
clip = core.vivtc.VFM(clip=clip, order=0, field=2, mode=1, mchroma=True, cthresh=9, mi=80, chroma=True, blockx=32, blocky=32, y0=16, y1=16, scthresh=12, micmatch=1, micout=False)
# VDecimate helper function 
def postprocess(n, f, clip, deinterlaced):
  if f.props['_Combed'] > 0:
    return deinterlaced
  else:
    return clip
clip = core.std.FrameEval(clip=clip, eval=functools.partial(postprocess, clip=clip, deinterlaced=clip2clip), prop_src=clip)
clip = core.vivtc.VDecimate(clip=clip, cycle=5, chroma=True, dupthresh=1.1, scthresh=15, blockx=64, blocky=64))
VFM add does field matching and add the '_Combed' flag, the FrameEval line should replace the marked frames with deinterlaced frames (using QTGMC) and the VDecimate line does the decimation, where you can use scthresh (scene threshold) and the other parameters to improve the decimation.
This will only work as you intended if:
a. VFM is tuned to the source to properly notice the residual combing after field matching
b. the chosen deinterlacer is tuned to properly removes the combing.
c. you tune the VDecimate setting to the source.

Remembering:
Quote:
VIVTC is basically a reimplementation of TIVTC and only borrows two (I think) heavily refactored field matching metric calculation functions. The rest is implemented more or less based on common sense/TIVTC documentation description which means it doesn't match the actual TIVTC behavior at all.
source: https://forum.doom9.org/showthread.p...49#post1938149
I still prefer using TIVTC. (but sometimes I get better results using VIVTC)

Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum

Last edited by Selur; 23rd January 2025 at 20:50.
Selur is offline   Reply With Quote
Reply

Tags
decimation, interlaced, telecine, vapoursynth, video comparison

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.