Posts: 329
Threads: 107
Joined: May 2017
Avisynth preview error: -> Could not allocate video frame. Out of memory. memory_max = 1073741824, memory_used = 460782005 Request=66355200
Avisynth preview error: couldn't convert image data to pixmap,.. (0)
Posts: 10.551
Threads: 57
Joined: May 2017
Hybrid uses 32bit Avisynth+ which is restricted in how much memory it uses.
Since switching to Avisynth+ 64bit would mean dropping support for:
see:
https://forum.doom9.org/showthread.php?t=181022
I have no plan to switching to 64bit Avisynth.
Looking at your script:
ClearAutoloadDirs()
LoadCPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\despot.dll")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading source: I:\!_Video\704.mp4
# input color sampling YV12@8, matrix:Rec.709
# input luminance scale tv
Source = FFVideoSource("I:\!_Video\704.mp4",cachefile="C:\Windows\Temp\mp4_d0e32cc26616a0761a8b137f28dbba5d_853323747_1_0.ffindex",fpsnum=30,colorspace="YV12")
# cutting from 0 with 42722 frames - WARNING: This might cause synch issues
Source = Source.Trim(0, 42722)
# current resolution: 3840x2160
# filtering
# despotting using DeSpot
SourceFiltered = Source
SourceFiltered = SourceFiltered.DeSpot(median=false,p2=22,seg=2,mheight=15,interlaced=false)
# stacking horizontal for filter preview
# adjust color to RGB32
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec709")
Source = Source.ConvertToRGB32(matrix="Rec709")
StackHorizontal(Source, SourceFiltered)
PreFetch(6)
return last
the only real way I see to lower the memory consumption would be to:
a. enable 'Filtering->Avisynth->Misc->Miscellaneous->AvisynthPlus limit memory' and try different values for 'Memory max'
b. use a lower MT-Thread count by setting 'Filtering->Avisynth->Misc->Miscellaneous->MT-Threads' to a value like 2 and if that does not help use 'Disable MT' to disable threading through Avisynth (filters itself might still use threading)
If the source&filter combination you chose (4k video + DeSpot) still crashes with, I can only advice to either try using Vapoursynth or look for another tool than Hybrid.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.