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.

Dev version keeps crashing on video step
#10
Same error, x264 aborts with:
y4m [error]: bad sequence header magic
when calling:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "E:\Hybrid -debug logs\Temp\encodingTempSynthSkript_2023-11-10@21_12_19_0810_0.vpy" - -c y4m | "C:\Program Files\Hybrid\64bit\x264.exe" --preset slow --crf 18.00 --profile high422 --bframes 5 --b-adapt 0 --sync-lookahead 17 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --partitions i4x4,p8x8,b8x8 --no-fast-pskip --subme 5 --trellis 2 --weightp 1 --nr 1 --sar 1:1 --non-deterministic --range tv --colormatrix bt470bg --demuxer y4m --input-range tv --fps 60000/1001 --output-csp i422 --output-depth 8 --output "E:\Hybrid -debug logs\Temp\2023-11-10@21_12_19_0810_05.264" -
while:
"E:\Hybrid -debug logs\Temp\encodingTempSynthSkript_2023-11-10@21_12_19_0810_0.vpy"
contains:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
import os
import site
core = vs.core
# 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/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/AviSource/avisource.dll")
# source: 'E:\Film-Tape Captures\Tests\Hybrid Test video.avi'
# current color space: YUV422P8, bit depth: 8, resolution: 720x480, fps: 59.94, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading E:\Film-Tape Captures\Tests\Hybrid Test video.avi using VsAviSource
clip = core.avisource.AVISource(path="E:/Film-Tape Captures/Tests/Hybrid Test video.avi")
# Setting detected color matrix (470bg).
clip = core.std.SetFrameProps(clip, _Matrix=5)
# Setting color transfer info (470bg), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
# Setting color primaries info (), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Primaries') else 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 59.94
clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# Weighted resize - START
clipSmoothed = clip
# Resizing using fmtconv - cubic
clipSmoothed = core.fmtc.resample(clip=clipSmoothed, kernel="linear", w=1440, h=960, interlaced=False, interlacedd=False) # resolution 1440x960 before YUV422P8 after YUV422P16
from vsrealesrgan import realesrgan as RealESRGAN
# adjusting color space from YUV422P8 to RGBH for vsRealESRGAN
clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="470bg", range_s="limited")
# resizing using RealESRGAN
clip = RealESRGAN(clip=clip, model=5, device_index=0, trt=True, trt_cache_path=r"E:\Hybrid -debug logs\Temp", num_streams=2) # 2880x1920
# resizing 2880x1920 to 1440x960
# adjusting resizing
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, range_s="limited")
clip = core.fmtc.resample(clip=clip, w=1440, h=960, kernel="lanczos", interlaced=False, interlacedd=False)
clipSmoothed = core.resize.Bicubic(clip=clipSmoothed, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
clip = core.std.Merge(clipa=clipSmoothed,clipb=clip,weight=0.5)
# Weighted resize - END
# adjusting output color from: RGBS to YUV422P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P8, matrix_s="470bg", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 59.94fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001)
# Output
clip.set_output()

The Vapoursynth Preview is closed, when you start the job, right?
(Otherwise the preview would probably eat up all the gpu resources and the encoding would fail, since no more gpu resources would be available,..)

Encoding while using Vapoursynth does work, if you don't use any of the stuff from the add-ons, right?

Cu Selur
Reply


Messages In This Thread
RE: Dev version keeps crashing on video step - by Selur - 11.11.2023, 06:12

Forum Jump:


Users browsing this thread: 3 Guest(s)