The used script looks fine:
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import site
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/vstrt.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libimwri.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: 'C:/Users/renarchi/Downloads/pwnsweet_evangelion/pwnsweet_evangelion/gt/0001.png'
# Current color space: RGB24, bit depth: 8, resolution: 1000x1000, frame rate: 25fps, scanorder: progressive, yuv luminance scale: full, matrix: 709, format: PNG
# Loading C:\Users\renarchi\Downloads\pwnsweet_evangelion\pwnsweet_evangelion\gt\%04d.png using vsImageReader
clip = core.imwri.Read("C:/Users/renarchi/Downloads/pwnsweet_evangelion/pwnsweet_evangelion/gt/%04d.png", firstnum=1)
clip = core.std.Trim(clip=clip, length=2119)
frame = clip.get_frame(0)
# 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_BT709), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709)
# 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
# adjusting color space from RGB24 to RGBH for vsDPIRmlrtDenoise
clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, range_s="full")
# denosing using DPIR (mlrt)
clip = vsmlrt.DPIR(clip, strength=10.000, overlap=16, model=1, backend=Backend.TRT(fp16=True,device_id=0,verbose=True,use_cuda_graph=False, num_streams=1,builder_optimization_level=3,engine_folder="C:/Users/renarchi/AppData/Local/Temp"))
# adjusting output color from: RGBH to YUV444P8 for PNGModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, matrix_s="709", range_s="full", dither_type="error_diffusion")
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# output
clip.set_output()
The encoding call:
Code:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "D:\test\encodingTempSynthSkript_2024-12-17@22_34_52_7510_0.vpy" - -c y4m | "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -noautorotate -nostdin -threads 8 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range pc -f yuv4mpegpipe -i - -an -sn -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range pc -fps_mode passthrough -vcodec png -dpi 0 -dpm 0 -pred 0 -vf zscale=matrixin=709:matrix=709,format=rgb24 -pix_fmt rgb24 -metadata encoding_tool="Hybrid 2024.11.23.1" "D:\test\1_1_%04d.png"
looks fine too.
Encoding stopped without an error:
Code:
024.12.17 - 22:35:07_Windows 10 Version 22H2 (64bit)_2024.11.23.1 - level 9: FFmpeg output: [out#0/image2 @ 0000019d07308580] video:370796KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame= 360 fps= 25 q=-0.0 Lsize=N/A time=00:00:14.40 bitrate=N/A speed=1.02x
2024.12.17 - 22:35:07_Windows 10 Version 22H2 (64bit)_2024.11.23.1 - level 9: process finished with exitcode: 0 and exitStatus: 0
Does the Vapoursynth Preview show all frames?
Assuming it does, the problem is not with the script, but might be triggered by some antivirus or similar tool interfering. (Windows Defender never made problems, but suits like norton&co sometimes do.)
I would suggest, to try:
1. move your temp folder into another folder outside your users folder (currently: "C:/Users/renarchi/AppData/Local/Temp").
2. set an exemption in your virus scanner for the temp, output and Hybrid folder.
3. deactivate your antivirus scanner and similar stuff that might interact with running tools.
Also, make sure to not run HDR or other content through your gpu while processing. Sometimes this can mess with torch addons.
Quote:the process reaches about 16%, the job completes
That happened since Hybrid assumed there should be more frame coming, but since ffmpeg stopped sending them and ended without an error, Hybrid assumes everything is fine.
Cu Selur