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.

[HELP] 25i to 29.97i with interpolation
#81
The frame rate you specified is ignored since you specified a custom one with 'rate:{num:2,den:1,abs:false}' this tells SVP to double the frame rate.
You should set 'rate:{num:2,den:1,abs:false}' to 'rate:{num:60000,den:1001,abs:false}' if you want 59.94fps.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#82
If I change the setting, the script will not run:

Not using InterFrame since the current fps (50) is less or equal target (50) fps!

[Image: Screenshot-2022-11-22-at-14-19-12.png]
Reply
#83
Seems like Hybrid isn't detecting the fps properly.
=> I'll look at it.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#84
Thank you, your help is much appreciated Smile

Here is the generated script:

# Imports
import os
import sys
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = '/Applications/Hybrid.app/Contents/MacOS/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Import scripts
import edi_rpow2
import G41Fun
import mvsfunc
import havsfunc
# source: '/Volumes/Drobo/Hybrid/KENNY-IN/JokeBox-Dec21-Sony-DMR-SD_BFF.mov'
# current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading /Volumes/Drobo/Hybrid/KENNY-IN/JokeBox-Dec21-Sony-DMR-SD_BFF.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="/Volumes/Drobo/Hybrid/KENNY-IN/JokeBox-Dec21-Sony-DMR-SD_BFF.mov", format="YUV420P8", cache=0, fpsnum=25, prefer_hw=0)
# 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)
# converting interlaced to half-height progressive for filtering (vsDeblock) (QTGMC(preset="Faster"))
clip = havsfunc.QTGMC(Input=clip, Preset="Faster", Lossless=2, TFF=False) # new fps: 50
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0)
# applying delocking using Deblock
clip = core.deblock.Deblock(clip=clip)
# removing grain using MLDegrain
clip = G41Fun.MLDegrain(clip=clip, tr=1, soft=[0,0,0])
# denoising using HQDN3D
clip = core.hqdn3d.Hqdn3d(clip=clip, lum_spac=0.00, chrom_tmp=4.50)
# contrast sharpening using CAS
clip = core.cas.CAS(clip=clip, sharpness=0.700)
# deringing using HQDeringmod
clip = havsfunc.HQDeringmod(clip, nrmode=2, darkthr=3.0)
# Not using InterFrame since input (50) is less or equal target (50) fps!
# resizing using ZNEDI3
clip = edi_rpow2.nnedi3_rpow2(clip=clip, rfactor=2) # 1440x1152
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1440, h=1080, kernel="lanczos", interlaced=False, interlacedd=False)
# adding Grain using AddGrain
clip = core.grain.Add(clip=clip)
# adjusting output color from: YUV420P16 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
Reply
#85
Found the issues.
a. needs to be 'rate:{num:60000,den:1001,abs:true}' (with: 'abs: false' it's a factor)
b. there's a bug in the parsing of the parameters.
got it fixed locally, building a new dev version will send you a link one it's compiled and uploaded (~30min).

Note that you will have to reset the filter queue/order and resave profiles and models when using the new version.
(alternatively, you could deinstall Hybrid with its settings and recreate profiles&co anew.)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#86
Here's the script with the dev version - something is still not right:

# Not using InterFrame since input (50) is less or equal target (50) fps!




# Imports
import vapoursynth as vs
import os
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import sys
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/HQDN3D/libhqdn3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/RemoveDirt/RemoveDirtVS.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import edi_rpow2
import G41Fun
import mvsfunc
import killerspots
import lostfunc
import havsfunc
# source: 'S:\KENNY\JokeBox-IN\JokeBox-Dec21-Sony-DMR.mov'
# current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading S:\KENNY\JokeBox-IN\JokeBox-Dec21-Sony-DMR.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="S:/KENNY/JokeBox-IN/JokeBox-Dec21-Sony-DMR.mov", format="YUV420P8", stream_index=0, cache=0, fpsnum=25, prefer_hw=0)
# 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, advanced=False)
# cropping the video to 670x536
clip = core.std.CropRel(clip=clip, left=24, right=26, top=26, bottom=14)
# removing grain using MLDegrain
clip = G41Fun.MLDegrain(clip=clip, tr=1, soft=[0,0,0])
# denoising using HQDN3D
clip = core.hqdn3d.Hqdn3d(clip=clip, lum_spac=0.00, chrom_spac=7.00, chrom_tmp=10.50)
# deringing using HQDeringmod
clip = havsfunc.HQDeringmod(clip, mrad=2, msmooth=2, nrmode=2, darkthr=3.0)
# Not using InterFrame since input (50) is less or equal target (50) fps!
clip = core.std.AddBorders(clip=clip, left=0, right=2, top=0, bottom=0) # add borders to archive mod 4 (NNEDI3(CL)) - 672x536
# resizing using ZNEDI3
# current: 672x536 target: 1440x1080 -> pow: 4
clip = edi_rpow2.nnedi3_rpow2(clip=clip, rfactor=4) # 2688x2144
clip = core.std.CropRel(clip=clip, left=0, right=8, top=0, bottom=0) # removing borders (NNEDI3(CL)) -  2680x2144
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1440, h=1080, kernel="lanczos", interlaced=False, interlacedd=False)
# 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 1440x1080
clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=0) # new fps: 25
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# adjusting output color from: YUV420P16 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited", dither_type="error_diffusion")
# set output frame rate to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
Reply
#87
What do your custom smooth settings look like?
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#88
rate:{num:60000,den:1001,abs:true}
Reply
#89
I can't reproduce the issue with the version I send you.
Using:
{rate:{num:60000,den:1001,abs:true},algo:2,mask:{area:100},scene:{mode:0}}
I get:
# Imports
import vapoursynth as vs
import os
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/SourceFilter/d2vSource/d2vsource.dll")
# Import scripts
import interframe
# 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 (Interframe) (separate fields)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, range_s="limited")
clip = core.std.SeparateFields(clip, tff=False)
clipEven = clip[::2] # resolution 720x288
clipEven = core.std.SetFrameProp(clip=clipEven, prop="_FieldBased", intval=0)
clipOdd = clip[1::2] # resolution 720x288
clipOdd = core.std.SetFrameProp(clip=clipOdd, prop="_FieldBased", intval=0)
# adjusting color space from YUV444P8 to YUV420P8 for Interframe
clipEven = core.resize.Bicubic(clip=clipEven, format=vs.YUV420P8, range_s="limited")
# adjusting frame count with Interframe/SVP
clipEven = interframe.InterFrame(clipEven, 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
# adjusting color space from YUV444P8 to YUV420P8 for Interframe
clipOdd = core.resize.Bicubic(clip=clipOdd, format=vs.YUV420P8, range_s="limited")
# adjusting frame count with Interframe/SVP
clipOdd = interframe.InterFrame(clipOdd, 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
# converting progressive to interlaced for 'progressive to interlaced (1)'
clip = core.std.Interleave([clipOdd, clipEven])
clip = core.std.DoubleWeave(clip=clip, tff=False)  # resolution 720x576
clip = core.std.SelectEvery(clip, 2, 0)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 59.9401fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001)
# Output
clip.set_output()
(didn't add the resize and denoising you used)
=> Parsing the settings seems to work fine for me with that version.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#90
I'm also using your settings from earlier in this thread, to keep interlacing.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)