Selur's Little Message Board
Enabling FilmGrainGLSL causes crash - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: Enabling FilmGrainGLSL causes crash (/thread-4113.html)

Pages: 1 2 3


Enabling FilmGrainGLSL causes crash - lostsnowboardvideos - 16.05.2025

Selur, enabling FilmGrainGLSL causes Hybrid to crash. Using the 2025.04.27.1 version.

Debug and script attached.


RE: Enabling FilmGrainGLSL causes crash - Selur - 16.05.2025

Do the other GLSL filets work for you?
If not, then its a problem with OpenGL supported in your system.

Cu Selur


RE: Enabling FilmGrainGLSL causes crash - lostsnowboardvideos - 16.05.2025

Enabled CAS GLSL and it ran fine, then enabled DPIRDeblock with it and it crashed.


RE: Enabling FilmGrainGLSL causes crash - Selur - 16.05.2025

I tested it here:
  • DPIRDeblock + FilmGrain (GLSL) => works
  • DPIRDeblock (using TRT) + FilmGrain (GLSL) => works
  • DPIRDeblock (using TRT + FP16) + FilmGrain (GLSL) => works

  • DPIRDeblock + CAS (GLSL) => works
  • DPIRDeblock (using TRT) + CAS (GLSL) => works
  • DPIRDeblock (using TRT + FP16) + CAS (GLSL) => works

Does the Vapoursynth Preview work for you, or does the Vaporusynth Preview also crash?
If the Vapoursynth Preview does not work, does it show an error?

Looking at the script:
# Imports import vapoursynth as vs # getting Vapoursynth core import logging 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") # Force logging to std:err logging.StreamHandler(sys.stderr) # 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/DenoiseFilter/CTMF/CTMF.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libvs_placebo.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/DenoiseFilter/TTempSmooth/TTempSmooth.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/DCTFilter.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/ZSmooth/zsmooth.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/vsnlm_cuda.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/NEO_FFT3DFilter/neo-fft3d.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/Support/EEDI3m_opencl.dll")# vsQTGMC core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.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/fmtconv.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/LSMASHSource.dll") # Import scripts import edi_rpow2 import dehalo import denoise from vsdpir import dpir as DPIR import qtgmc import validate # Source: 'C:\Users\Computer\Downloads\amarectv310\amarectv310\amarec(20250515-1707).avi' # Current color space: YUV422P8, bit depth: 8, resolution: 720x480, frame rate: 29.97fps, scanorder: top field first, yuv luminance scale: limited, matrix: 470bg, format: lagarith # Loading C:\Users\Computer\Downloads\amarectv310\amarectv310\amarec(20250515-1707).avi using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Computer/Downloads/amarectv310/amarectv310/amarec(20250515-1707).avi", format="YUV422P8", stream_index=0, cache=0, fpsnum=30000, fpsden=1001, 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 29.97fps clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # making sure the detected scan type is set (detected: top field first) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_TOP) # tff # ColorMatrix: adjusting color matrix from 470bg to 2020ncl using transfer BT.709 clip = core.std.SetFrameProps(clip=clip,_Transfer=1) # adjusting luma range to 'limited' due to post clipping clip = core.resize.Bicubic(clip=clip, matrix_in_s="470bg", matrix_s="2020ncl", range_in=0, range=0) # Deinterlacing using QTGMC clip = qtgmc.QTGMC(Input=clip, Preset="Very Slow", InputType=0, TFF=True, TR2=3, Sharpness=0.1, SourceMatch=3, Lossless=2, EZKeepGrain=6.00, NoisePreset="Slow", opencl=True, Denoiser="KNLMeansCL") # new fps: 59.94 # Making sure content is preceived as frame based clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive # adjusting color space from YUV422P8 to RGBH for vsDPIRDeblock clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="2020ncl", range_s="limited") # deblocking using DPIRDeblock clip = DPIR(clip=clip, strength=10.000, task="deblock", device_index=0, num_streams=3, trt=True, trt_cache_dir="C:/Users/Computer/AppData/Local/Temp") # adjusting color space from RGBH to YUV444P16 for vsMCTemporalDenoise clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="2020ncl", range_s="limited") # denoising using MCTemporalDenoise clip = denoise.MCTemporalDenoise(i=clip, settings="low", ncpu=1) with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/CAS.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define SHARPENING 0.0', '#define SHARPENING 0') glsl = glsl.replace('#define CAS_BETTER_DIAGONALS 1', '#define CAS_BETTER_DIAGONALS 1') glsl = glsl.replace('#define CAS_GO_SLOWER 0', '#define CAS_GO_SLOWER 1') glsl = glsl.replace('#define SOURCE_TRC 0', '#define SOURCE_TRC 1') glsl = glsl.replace('#define TARGET_TRC 0', '#define TARGET_TRC 1') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=clip.width, height=clip.height) # applying dehalo using DeHalo_alpha clip = dehalo.DeHalo_alpha(clip, rx=2.50) # applying dehalo using YAHR clip = dehalo.YAHR(clip, depth=24) # resizing using NNEDI3CL # current: 720x480 target: 1620x1080 -> pow: 4 clip = edi_rpow2.nnedi3cl_rpow2(clip=clip, rfactor=4, nsize=3, nns=4) # 2880x1920 # resizing 2880x1920 to 1620x1080 clip = core.fmtc.resample(clip=clip, w=1620, h=1080, kernel="spline64", interlaced=False, interlacedd=False)# before YUV444P16 after YUV444P16 # adjusting output color from: YUV444P16 to YUV420P8 for x264Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, 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()
I see no problem, and it does seem to work fine here. (used latest dev 2025-05.15.1)
Maybe another problem is interfering ? (make sure to have the preview and any other media player or similar closed during encoding.)

Cu Selur


RE: Enabling FilmGrainGLSL causes crash - lostsnowboardvideos - 16.05.2025

Preview works fine here. No other programs running. I did install the February 2025 vapoursynth torch add on before this happened.


RE: Enabling FilmGrainGLSL causes crash - Selur - 16.05.2025

Okay, if the preview works, it gets tricky.
Then it might be some driver issue (are you using the latest Studio drivers?), running out of ram/vram, overclocking, heat issues or similar. :/
Also try moving the temp folder to a dedicated folder, so that:
a. any virus scanner ignores the content (add an exception)
b. Windows own access protection doesn't get funny ideas.

Does:
vspipe "C:\Users\Computer\AppData\Local\Temp\encodingTempSynthSkript_2025-05-15@20_53_06_2610_0.vpy" NUL --outputindex 0 -c y4m
work? (Taken from the last debug output)

I would recommend trying the latest dev version (2025.05.16.1, just updated Wink) and add-on versions (which are in the same folder on the GoogleDrive), since they are probably more stable in regard to newer driver versions.
(The last few days, I also added some stuff to be more compatible with non-AVX2 capable CPUs on Windows.)

Cu Selur


RE: Enabling FilmGrainGLSL causes crash - lostsnowboardvideos - 17.05.2025

I'll try it tonight. Whatever version of the addon you were running last August was the one I was originally using and it was working just fine. Don't know why I just decided to update it  Rolleyes


RE: Enabling FilmGrainGLSL causes crash - lostsnowboardvideos - 17.05.2025

Updated all of my NVIDIA drivers, updated to the new dev version, updated the torch addon to the 5.5.2025 version, moved the temp folder to a new path on my desktop, and it all still crashes.

Baffling.


RE: Enabling FilmGrainGLSL causes crash - lostsnowboardvideos - 17.05.2025

[Image: Screenshot-2025-05-16-201351.jpg]

Getting this error too.


RE: Enabling FilmGrainGLSL causes crash - Selur - 17.05.2025

Try moving your Output und Temp folder in Hybrid somewhere outside your Users Home, that looks like either the folder does not exist or something is preventing Hybrid from accessing the folder.

Cu Selur