31.01.2024, 17:37
Es hat mal funktioniert, schätze aber seit dem letzten Update nicht mehr. Wäre schön, wenn Du mal einen Blick drauf werfen könntest, Selur.
y4m: failed to parse y4m header.
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import site
import sys
import os
from fractions import Fraction
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
os.environ["CUDA_MODULE_LOADING"] = "LAZY"
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/akarin.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/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
from importlib.machinery import SourceFileLoader
vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module()
# source: 'C:\Users\Bobby\Desktop\abc.mkv'
# current color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Bobby\Desktop\abc.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Bobby/Desktop/abc.mkv", format="YUV420P8", stream_index=0, cache=0, fpsnum=24000, fpsden=1001, prefer_hw=0)
frame = clip.get_frame(0)
# Setting detected color matrix (709).
clip = core.std.SetFrameProps(clip, _Matrix=1)
# Setting color transfer (to 709), if it is not set.
if '_Transfer' not in frame.props or not frame.props['_Transfer']:
clip = core.std.SetFrameProps(clip, _Transfer=1)
# Setting color primaries info (to 1), if it is not set.
if '_Primaries' not in frame.props or not frame.props['_Primaries']:
clip = 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 23.976
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
from vsmlrt import Backend
clip = core.misc.SCDetect(clip=clip,threshold=0.150)
clip = core.std.AddBorders(clip=clip, left=0, right=0, top=8, bottom=8) # add borders to archive mod 32 (vsRIFEmlrt) - 3840x2176
# adjusting color space from YUV420P8 to RGBS for vsRIFEmlrt
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_s="limited")
# adjusting frame count&rate with RIFE (mlrt)
clip = vsmlrt.RIFE(clip, multi=Fraction(2), model=44, backend=Backend.TRT(fp16=False,device_id=0,verbose=True,use_cuda_graph=False, num_streams=1, workspace=1 << 30,builder_optimization_level=3)) # new fps: 47.952
clip = core.std.CropRel(clip=clip, left=0, right=0, top=8, bottom=8) # removing borders (vsRIFEmlrt) - 3840x2160
# adjusting output color from: RGBS to YUV420P8 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 47.952fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=48000, fpsden=1001)
# Output
clip.set_output()
(31.01.2024, 18:09)Selur Wrote: [ -> ](könntest mal versuchen ob es mit FP16 läuft, da ist der VRAM Bedarf entsprechend kleiner und es ist flotter)
(31.01.2024, 18:09)Selur Wrote: [ -> ]Treiber aktualisieren ist auch immer ein guter Start.