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.

[INFO] Feature, add/update rife frame interpolation
#16
Might also be that you are running out of vram. Smile
# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll") core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/FrameFilter/RIFE/RIFE.dll") core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # source: 'C:\Users\Selur\Desktop\sample25seconds.mkv' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading C:\Users\Selur\Desktop\sample25seconds.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/sample25seconds.mkv", format="YUV420P8", cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0) # Setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=1) clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1) clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # making sure frame rate is set to 29.970 clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # adjusting frame with SelectEvery clip = core.std.SelectEvery(clip=clip, cycle=5, offsets=[0, 1, 2, 3]) clip = core.std.AssumeFPS(clip=clip,fpsnum=24000, fpsden=1001)# new fps: 23.976 # cropping the video to 1432x1080 clip = core.std.CropRel(clip=clip, left=244, right=244, top=0, bottom=0) clip = core.misc.SCDetect(clip=clip,threshold=0.150) # adjusting color space from YUV420P8 to RGBS for vsRIFE clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_s="limited") # adjusting frame count&rate with RIFE clip = core.rife.RIFE(clip, model=9, multiplier=2.500000, sc=True) # new fps: 59.94 # needed 8 # adjusting output color from: RGBS to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited", dither_type="error_diffusion") # set output frame rate to 59.94fps clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001) # Output clip.set_output()
works fine here.
But:
# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll") core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll") core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/FrameFilter/RIFE/RIFE.dll") core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # source: 'C:\Users\Selur\Desktop\sample25seconds.mkv' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading C:\Users\Selur\Desktop\sample25seconds.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/sample25seconds.mkv", format="YUV420P8", cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0) # Setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=1) clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1) clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # making sure frame rate is set to 29.970 clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # adjusting frame with SelectEvery clip = core.std.SelectEvery(clip=clip, cycle=5, offsets=[0, 1, 2, 3]) clip = core.std.AssumeFPS(clip=clip,fpsnum=24000, fpsden=1001)# new fps: 23.976 # cropping the video to 1432x1080 clip = core.std.CropRel(clip=clip, left=244, right=244, top=0, bottom=0) clip = core.misc.SCDetect(clip=clip,threshold=0.150) # adjusting color space from YUV420P8 to RGBS for vsRIFE clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_s="limited") # adjusting frame count&rate with RIFE clip = core.rife.RIFE(clip, model=9, multiplier=2.500000, sc=True) # new fps: 59.94 # needed 8 # Resizing using 10 - bicubic spline clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1920, h=1448, interlaced=False, interlacedd=False) # resolution 1920x1448 # adjusting output color from: RGBS to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited", dither_type="error_diffusion") # set output frame rate to 59.94fps clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001) # Output clip.set_output()
crashes,...
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply


Messages In This Thread
RE: Feature, add/update rife frame interpolation - by Selur - 21.07.2022, 19:23

Forum Jump:


Users browsing this thread: 1 Guest(s)