That source is messed up, just looking at the separated fields.
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/d2vSource/DGDecode.dll")
# Import scripts
import validate
# Source: 'C:\Users\Selur\Desktop\SampleSlowMotion.m2v'
# Current color space: YUV420P8, bit depth: 8, resolution: 720x576, frame rate: 25fps, scanorder: top field first, yuv luminance scale: limited, matrix: 470bg, format: mpeg-2
# Loading C:\Users\Selur\Desktop\SampleSlowMotion.m2v using DGDecode
clip = core.dgdecode.MPEG2Source("J:/tmp/m2v_89c4bff806ba156959ee6cb3e488895d_853323747.d2v",info=3)# 25 fps, scanorder: top field first
frame = clip.get_frame(0)
# setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT470_BG)
# setting color transfer (vs.TRANSFER_BT601), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT601)
# setting color primaries info (to vs.PRIMARIES_BT470_BG), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
clip = core.std.SeparateFields(clip, tff=True)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
even = clip[::2]
odd = clip[1::2]
clip = core.std.StackHorizontal([odd.text.Text("ODD"),even.text.Text("EVEN")])
clip.set_output()
the clips is a mess. (looks like some messed up norm conversion
https://forum.doom9.org/showthread.php?t=176104 with some blended frames)
This looks like some pulldown pattern and from the looks of it half of the fields are trash,... so after a bobbing only 2 out of 4 frames seem useable.
You could do something like:
Code:
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=False, opencl=True) # new fps: 50
# Making sure content is preceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# adjusting frame with SelectEvery
clip = core.std.SelectEvery(clip=clip, cycle=8, offsets=[1, 2])
clip = core.std.AssumeFPS(clip=clip,fpsnum=12000, fpsden=960)# new fps: 12.5
clip = core.std.Crop(clip=clip, left=30, right=32, top=0, bottom=8)# cropping to 658x568
# Resizing using 10 - bicubic spline
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=704, h=570, interlaced=False, interlacedd=False) # resolution 704x570 before YUV420P8 after YUV420P16
# adjusting output color from: YUV420P16 to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited", dither_type="error_diffusion")
# set output frame rate to 25fps (progressive) due to 'Change speed
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
(QTGMC_bob + SelectEvery(clip=clip, cycle=8, offsets=[1, 2]) + Change Speed 25;
https://pastebin.com/5m29YM8p)
Cu Selur