Log in

View Full Version : AVISynth MT memory leak issues.


n0an
4th March 2010, 02:14
So, I have been using Jeremy Duncan's AVISynth MT for quite a while, and I often face memory leak issues. Same scripts work fine without it, but die during 2 pass with MT/SetMTMode()->Distributor(). SetMemoryMax helps usually to prevent the leak, but it fails at times too. This one particular script I am using even leaks with SetMemoryMax(512). First pass is fine at ~30fps, but the leak starts in the 2nd pass and the encode starts to die - it eventually hits 0 fps.

Here's the script:

SetMemoryMax(512)
SetMTMode(2,0)
dgdecode_MPEG2Source("C:\Documents and Settings\Administrator\Desktop\Videos\MT_test\VTS_12_1.d2v)

tfm(field=1, order=1, mode=6).tdecimate() #TIVTV

Crop(0, 60, -2, -60) #Crop

#resize

FFT3DFilter(sigma=0.3, sigma2=0.3, bw=32, bh=32, ow=16, oh=16, bt=3, plane=4, wintype=2, dehalo=0.2, degrid=0.3) #Denoise

sharpen(0.2) #sharpen

tweak(bright=-4, sat=1.05) #Colors

Distributor()

#Encoder: x264
#CPU Usage: 100%
#Processor Type: Core i7 920
#RAM Usage: 109k
#Installed RAM: 12GB

Can anyone recommend me a workaround for this? What other MT builds could I use? I checked the support page (http://avisynth.org/mediawiki/MT_support_page#SetMTMode.28.29_Mode) for MT and tried SEt's x64 version of FFT3DFilter() and followed the steps on the readme, but that gives the doesn't-exist error for SetMTMode().

Gavino
4th March 2010, 11:48
Why not use the official MT build (based on Avisynth 2.5.7)? There's nothing in your script that requires the new features of v2.5.8.

Also, I believe Mpeg2Source requires SetMTMode(5).

n0an
4th March 2010, 16:29
Why not use the official MT build (based on Avisynth 2.5.7)? There's nothing in your script that requires the new features of v2.5.8.

Also, I believe Mpeg2Source requires SetMTMode(5).

Is it the one by SEt? The one I am using worked fine after 4 failures yesterday, but now when I re-run the same encode, it either leaks or crashes the vfw4x264.exe. Also, the CPU usage on all cores was 100%. Is it safe?

Gavino
4th March 2010, 17:23
SEt's build is probably more reliable than Jeremy Duncan's. But I was referring to tsp's original MT build, available from http://www.avisynth.org/tsp/MT_07.zip.

n0an
4th March 2010, 23:09
The one by JD's acts up a few a few encodes, then replacing the .dll's makes it work fine. I will try tsp's and report back. Thanks!