05.01.2024, 18:49
Quote:Missing FFMPEG tab: The FFmpeg tab is no longer to the right of (De-)Interlace/Telecine. Is that normal?Yes, since mixing FFmpeg and Synth filters is not advised it's not shown unless 'no XSynth' is selected.
Quote:Crashed: FFmpeg output: -vsync is deprecatedHas nothing to do with the crash.
The crash happens because of:
[yuv4mpegpipe @ 000001795afda280] Header too large.
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import site
import ctypes
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# Adding torch dependencies to PATH
path = site.getsitepackages()[0]+'/torch_dependencies/bin/'
ctypes.windll.kernel32.SetDllDirectoryW(path)
path = path.replace('\\', '/')
os.environ["PATH"] = path + os.pathsep + os.environ["PATH"]
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.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/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/fft3dfilter.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3m.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/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeinterlaceFilter/Bwdif/Bwdif.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import havsfunc
# source: 'J:\#8mm Project\1991-08-19 - Ontario Time Horton's and Wendy'sl - TRV66 - ES15 - DVK200 - AIW9600XT - VDub1911.avi'
# current color space: YUV422P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading J:\#8mm Project\1991-08-19 - Ontario Time Horton's and Wendy'sl - TRV66 - ES15 - DVK200 - AIW9600XT - VDub1911.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="J:/#8mm Project/1991-08-19 - Ontario Time Horton's and Wendy'sl - TRV66 - ES15 - DVK200 - AIW9600XT - VDub1911.avi", format="YUV422P8", stream_index=0, cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0)
# Setting detected color matrix (470bg).
clip = core.std.SetFrameProps(clip, _Matrix=5)
# Setting color transfer info (470bg)
clip = core.std.SetFrameProps(clip, _Transfer=5)
# Setting color primaries info (5)
clip = 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 29.97
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1) # bff
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=False) # new fps: 29.97
# Making sure content is preceived as frame based
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
clip = clip[::2] # selecting previously even frames
# Color Adjustment using Levels on YUV422P8 (8 bit)
clip = core.std.Levels(clip=clip, min_in=16, max_in=235, min_out=16, max_out=235, planes=[0])
clip = core.std.CropRel(clip=clip, left=8, right=0, top=0, bottom=0)# cropping to 712x480
from vsrealesrgan import realesrgan as RealESRGAN
# adjusting color space from YUV422P8 to RGBS for vsRealESRGAN
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# Step 1: current: 712x480, target: 1070x792
# resizing using RealESRGAN
clip = RealESRGAN(clip=clip, model=5, device_index=0, trt=True, trt_cache_path=r"J:\#8mm Project") # 2848x1920
# resizing 2848x1920 to 1070x792
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1070, h=792, kernel="lanczos", interlaced=False, interlacedd=False)
# denoising stepped resize using RemoveGrain
# adjusting color space from RGBS to YUV444P16 for vsRemoveGrain
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="470bg", range_s="limited", dither_type="error_diffusion")
# removing grain using RemoveGrain
clip = core.rgvs.RemoveGrain(clip=clip, mode=2)
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# sharpening stepped resize using aWarpSharp2
# adjusting color space from RGBS to YUV444P16 for vsAWarpSharp2
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="470bg", range_s="limited", dither_type="error_diffusion")
# sharpening using AWarpSharp2
clip = core.warp.AWarpSharp2(clip=clip, depth=5)
# adjusting color space from YUV444P16 to RGBS for vsRealESRGAN
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# Step 2: current: 1070x792, target: 1414x1080
# resizing using RealESRGAN
clip = RealESRGAN(clip=clip, model=5, device_index=0, trt=True, trt_cache_path=r"J:\#8mm Project") # 4280x3168
# resizing 4280x3168 to 1414x1080
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1414, h=1080, kernel="lanczos", interlaced=False, interlacedd=False)
# adjusting output color from: RGBS to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, matrix_s="470bg", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 29.97fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Output
clip.set_output()
Using stepped Resizing with RealESRGAN will require lots of VRAM.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.