This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Deinterlace only the frames flagged as interlaced
#4
If you try to do that in a custom section, you need to:

a. make sure you load all the dependencies
b. let Hybrid know that after your addition, the content is progressive
So for example:
import ctypes
import sys
import os
import functools
Dllref = ctypes.windll.LoadLibrary("F:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")

core.std.LoadPlugin(path="%FILTERPATH%/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="%FILTERPATH%/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="%FILTERPATH%/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="%FILTERPATH%/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="%FILTERPATH%/Support/EEDI3m.dll")# vsQTGMC
core.std.LoadPlugin(path="%FILTERPATH%/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="%FILTERPATH%/Support/libmvtools.dll")
core.std.LoadPlugin(path="%FILTERPATH%/Support/fmtconv.dll")
core.std.LoadPlugin(path="%FILTERPATH%/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="%FILTERPATH%/DeinterlaceFilter/Bwdif/Bwdif.dll")
core.std.LoadPlugin(path="%FILTERPATH%/DeinterlaceFilter/VIVTC/VIVTC.dll")
import qtgmc
clip2clip = clip
def postprocess(n, f, clip, deinterlaced):
  if f.props['_Combed'] > 0:
    return deinterlaced
  else:
    return clip
clip2clip = qtgmc.QTGMC(Input=clip2clip, Preset="fast", TFF=True, FPSDivisor=2)
clip = core.vivtc.VFM(clip=clip, order=1)
clip = core.std.FrameEval(clip=clip, eval=functools.partial(postprocess, clip=clip, deinterlaced=clip2clip), prop_src=clip)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# scantype progressive
but, due to a bug in Hybrid that will not work atm. (since Hybrid doesn't respect the '# scantype progressive' as it should)
=> you will have to write your own script if you want to use this.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
RE: Deinterlace only the frames flagged as interlaced - by Selur - 24.03.2025, 21:11

Forum Jump:


Users browsing this thread: 1 Guest(s)