Selur's Little Message Board

Full Version: AVS preview won't load
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Selur, I can't get AVS preview to load any time I input an AVI file to encode. I use avisource for avi input but the file crashes.
If the preview does not work, neither will the encoding.
Code:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\ColorMatrix64.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\CAS.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\MedianBlur2.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\dither.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\Deblock.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\DctFilter.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\nnedi3.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\neo-fft3d.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\mvtools2.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\masktools2.dll")
LoadPlugin("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\RgTools.dll")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\SMDegrain.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\Deblock_QED_MT2.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi")
Import("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi")
# loading source: C:\Users\Computer\Videos\RJ videos\Misc\VDub\VDub test\VHS\(1999) The Haakonsen Faktor.avi
# color sampling YUY2@8, matrix: bt601, scantyp: top field first, luminance scale: limited
AviSource("C:\Users\Computer\Videos\RJ videos\Misc\VDub\VDub test\VHS\(1999) The Haakonsen Faktor.avi")
# current resolution: 720x480
# color modifications
ColorMatrix(mode="Rec.601->Rec.709",clamp=3,interlaced=true,hints=false)
# deinterlacing
AssumeTFF()
QTGMC(Preset="Very Slow", ediThreads=8)
# cropping
Crop(16,0,-6,-4)# 698x476
Deblock_QED()
ConvertToYV12(interlaced=false)
SMDegrain(interlaced=false)
# scaling to 1620x1080
LanczosResize(1620,1080)
CAS(sharpness=1.00)
# adjust color to RGB32 (color matrix: Rec709)
ConvertToRGB32(matrix="Rec709")
# setting output fps to 59.940fps
AssumeFPS(60000,1001)
PreFetch(16)
#  output: color sampling RGB32@8, matrix: Rec.709, scantyp: progressive, luminance scale: limited
return last
seems, like a bug with QTGMC 'very slow' when processing YUY2 content.
When using LWLibavVideoSource with YUV422P8 it works fine.
I will look into it.

Cu Selur
Since I don't want to spend hours figuring out where the problem in QTGMC.avsi is, I adjusted Hybrid to not use YUY2 with QTGMC, which will tell Hybrid to add:
Code:
ConvertToYv16(interlaced=true)
to the code, which fixes the problem.
(a better solution, might be to fix QTGMC.avsi, but that can be done by someone else)
=> uploaded a new dev with this change

Cu Selur

Ps.: Why are you using Avisynth at all? None of the filters you use is only available in Avisynth.
Thanks! Was using CCD in avisynth and didn't realize there is a VS plugin now for it. Although it reduces speed.
Assuming your CPU supports AVX2.
You can try the latest dev, it includes CCD support through the zsmooth (which added it recently).
Not sure how fast that is compared to the Avisynth version, but it's faster than the Vapoursynth script used before.

Cu Selur