RE: 25i to 29.97i with interpolation - Selur - 22.11.2022
Still works for me:
# Imports
import vapoursynth as vs
import os
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import sys
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'i:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/FrameFilter/Interframe/svpflow2_vs64.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/FrameFilter/Interframe/svpflow1_vs64.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/HQDN3D/libhqdn3d.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/RemoveDirt/RemoveDirtVS.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/d2vSource/d2vsource.dll")
# Import scripts
import interframe
import G41Fun
import mvsfunc
import killerspots
import lostfunc
import havsfunc
# source: 'G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\burosch1.mpg'
# current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\burosch1.mpg using D2VSource
clip = core.d2v.Source(input="G:/Temp/mpg_ed41fc4229e1bdb10d2f5a06b76ec2ef_853323747.d2v", rff=False)
# Setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=5)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# converting interlaced to half-height progressive for filtering (vsDeSpot) (QTGMC(preset="Fast"))
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", Lossless=2, TFF=False) # new fps: 50
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0)
clip = lostfunc.DeSpot(o=clip)
clip = killerspots.KillerSpots(clip=clip)
# removing grain using MLDegrain
clip = G41Fun.MLDegrain(clip=clip, soft=[0,0,0])
# denoising using HQDN3D
clip = core.hqdn3d.Hqdn3d(clip=clip)
# adjusting frame count with Interframe/SVP
clip = interframe.InterFrame(clip, NewNum=60000, NewDen=1001, overwriteSuper="{scale:{up:0},gpu:1,rc:true}", overwriteSmooth="{rate:{num:60000,den:1001,abs:true},algo:2,mask:{area:100},scene:{mode:0}}") # new fps: 59.9401
# Resizing using 10 - bicubic spline
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1440, h=812, interlaced=False, interlacedd=False) # resolution 1440x812
# converting progressive to interlaced for 'progressive to interlaced (1)'
clip = core.std.SeparateFields(clip=clip, tff=False)
clip = core.std.SelectEvery(clip=clip, cycle=4, offsets=[0, 3])
clip = core.std.DoubleWeave(clip=clip, tff=False) # resolution 1440x812
clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=0) # new fps: 29.97
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# adjusting output color from: YUV420P16 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited", dither_type="none")
# set output frame rate to 29.97fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Output
clip.set_output()
RE: 25i to 29.97i with interpolation - Selur - 22.11.2022
1. Try to keep it simply and just use Interframe to see if the parsing works.
2. You did reset your defaults etc., right?
Cu Selur
RE: 25i to 29.97i with interpolation - Miranda - 22.11.2022
{rate:{num:60000,den:1001,abs:true},algo:2,mask:{area:100},scene:{mode:0}}
Thanks, this seems to work
(22.11.2022, 18:09)Miranda Wrote: {rate:{num:60000,den:1001,abs:true},algo:2,mask:{area:100},scene:{mode:0}}
Can you help me to understand what these parameters mean?
RE: 25i to 29.97i with interpolation - Selur - 22.11.2022
Quote:Can you help me to understand what these parameters mean?
Can't really say anything other than what is written over at https://www.svp-team.com/wiki/Manual:SVPflow
Cu Selur
RE: 25i to 29.97i with interpolation - Miranda - 22.11.2022
It makes no sense to meĀ
RE: 25i to 29.97i with interpolation - Selur - 22.11.2022
Sadly, afaik. that is the only available documentation.
Cu Selur
RE: 25i to 29.97i with interpolation - Miranda - 07.12.2022
When i do the upscale and interpolation, what would be the best way to change the field dominance from "bottom field first" to "upper field first", as per HD 1080i?
RE: 25i to 29.97i with interpolation - Selur - 07.12.2022
The:
# converting progressive to interlaced for 'progressive to interlaced (1)'
clip = core.std.SeparateFields(clip=clip, tff=False)
clip = core.std.SelectEvery(clip=clip, cycle=4, offsets=[0, 3])
clip = core.std.DoubleWeave(clip=clip, tff=False) # resolution 1440x812
clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=0) # new fps: 29.97
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
part, where your progressive content is converted to interlaced, should be adjusted accordingly.
No, Hybrid has no option for this, so you would have to write a script for this manually.
(or write a custom addition that is inserted before the end that reverses the field order)
Cu Selur
RE: 25i to 29.97i with interpolation - Miranda - 07.12.2022
When I import to Final Cut, it automatically changes the field order to top, so I guess I can let Final Cut handle this final part.
RE: 25i to 29.97i with interpolation - Miranda - 09.12.2022
Is it also possible to go from 25p to 29.97i (59.94 interlaced) with interpolation?
|