09.11.2024, 14:01
Code:
[yuv4mpegpipe @ 000002b3aada8c00] Header too large.
The Vapoursynth script:
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import site
from fractions import Fraction
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))
os.environ["CUDA_MODULE_LOADING"] = "LAZY"
# loading plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vsov.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/LSMASHSource.dll")
# Import scripts
from importlib.machinery import SourceFileLoader
vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module()
import validate
# Source: 'S:\Twemlow IN for 5994 Sep 2024\Eye of Satan-NTSC-VHS-Omode3-25.mov'
# Current color space: YUV422P10, bit depth: 10, resolution: 616x462, frame rate: 25fps, scanorder: progressive, yuv luminance scale: limited, matrix: 470bg, transfer: bt.709, primaries: bt.470 system m, format: prores
# Loading S:\Twemlow IN for 5994 Sep 2024\Eye of Satan-NTSC-VHS-Omode3-25.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="S:/Twemlow IN for 5994 Sep 2024/Eye of Satan-NTSC-VHS-Omode3-25.mov", format="YUV422P10", stream_index=0, cache=0, fpsnum=25, prefer_hw=0)
frame = clip.get_frame(0)
# setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT470_BG)
# setting color transfer (vs.TRANSFER_BT709), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709)
# setting color primaries info (to vs.PRIMARIES_BT470_BG), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# making sure the detected scan type is set (detected: progressive)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
from vsmlrt import Backend
clip = core.misc.SCDetect(clip=clip,threshold=0.150)
clip = core.std.AddBorders(clip=clip, left=12, right=12, top=8, bottom=10) # add borders to archive mod 32 (vsRIFEmlrt) - 640x480
# adjusting color space from YUV422P10 to RGBS for vsRIFEmlrt
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# adjusting frame count&rate with RIFE (mlrt)
clip = vsmlrt.RIFE(clip, multi=Fraction(2.5), model=424, backend=Backend.OV_CPU(fp16=False), ensemble=True) # new fps: 62.5
clip = core.std.Crop(clip=clip, left=12, right=12, top=8, bottom=10) # removing borders (vsRIFEmlrt) - 616x462
# 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 62.5fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=960)
# output
clip.set_output()
Don't see anything strange happening with the resolution. (RIFE requires mod32, which is why Hybrid pads the source and removes the padded borders)
Using latest dev with:
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import site
from fractions import Fraction
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
os.environ["CUDA_MODULE_LOADING"] = "LAZY"
# loading plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vs-mlrt/vsort.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/akarin.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
from importlib.machinery import SourceFileLoader
vsmlrt = SourceFileLoader('vsmlrt', 'F:/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module()
import validate
# Source: 'G:\TestClips&Co\files\test.avi'
# Current color space: YUV420P8, bit depth: 8, resolution: 640x352, frame rate: 25fps, scanorder: progressive, yuv luminance scale: limited, matrix: 470bg, format: MPEG-4 Visual
# Loading G:\TestClips&Co\files\test.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="G:/TestClips&Co/files/test.avi", format="YUV420P8", stream_index=0, cache=0, fpsnum=25, prefer_hw=0)
frame = clip.get_frame(0)
# setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT470_BG)
# setting color transfer (vs.TRANSFER_BT601), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT601)
# setting color primaries info (to vs.PRIMARIES_BT470_BG), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# making sure the detected scan type is set (detected: progressive)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
from vsmlrt import Backend
clip = core.misc.SCDetect(clip=clip,threshold=0.100)
# adjusting color space from YUV420P8 to RGBS for vsRIFEmlrt
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# adjusting frame count&rate with RIFE (mlrt)
clip = vsmlrt.RIFE(clip, multi=Fraction(2.4), model=424, backend=Backend.ORT_CPU(fp16=False), ensemble=True) # new fps: 60
# adjusting output color from: RGBS to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 60fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=60, fpsden=1)
# output
clip.set_output()
Code:
clip = vsmlrt.RIFE(clip, multi=Fraction(2.4), model=424, backend=Backend.ORT_CPU(fp16=False), ensemble=True) # new fps: 60
=> What does the Vapoursynth Preview say?