Log in

View Full Version : MDegrain2 & sRestore crash XViD encode


crasus
24th April 2009, 14:49
Good afternoon! For some time now I've been trying to encode a DVD and every single time the encode crashes. Sometimes it crashed early into the first pass, sometimes in the middle of second pass - there isn't an exact pattern.

Here's the script I've been using :

Loadplugin("C:\DGDecode.dll")
Loadplugin("C:\TDeint.dll")
LoadPlugin("C:\mvtools2.dll")
LoadPlugin("C:\mt_masktools-25.dll")
import("C:\srestore.avs")

MPEG2Source("K:\encode.d2v")
tdeint(mode=1)
srestore()
Crop(16,8,-16,-8)
super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
LanczosResize(624,464)

What could be the problem? Thank you!

Fizick
24th April 2009, 20:39
versions?

crasus
24th April 2009, 21:25
DGDecode.dll - 1.5.0.0 / TDeint.dll - 1.1.0.0 / mvtools - 2.4.2 / masktools - 2.0a36 / srestore (last version available, released on 12.11.2008)

crasus
26th April 2009, 03:47
If it holds any importance, I am using AviSynth 2.5.7, modded by TSP for his MT plugin. I tried both with the plugin activated and without it. Same thing, the encode crashes.

Fizick
26th April 2009, 09:09
try remove srestore to detect reason of crashes

Socio
26th April 2009, 20:22
If you have any .avsi scripts in your plugin folder rename them to .avs they could be causing conflicts.

18fps
27th April 2009, 13:37
Hi! srestore usually has a memory leak, try with srestore(cache=0).

crasus
27th April 2009, 20:09
Thank you for all the advices! Improvements on the situation have appeared :D

Socio was right, it was an .avsi script that was causing the problems (colors_rgb - what's the use of that by the way?). I renamed it to .avs and it worked. Up untill 99% of the second pass when it simply stopped and idles there. Looking at the Task Manager, I see there's a very big Memory Commit Charge although the processor is at 0% use - so I'll assume 18fps is right. Trying again with cache=0.

Gavino
27th April 2009, 21:00
colors_rgb.avsi is a standard part of the Avisynth distribution and simply sets up names (eg color_black) for the hex RGB values of commonly used colors, so it cannot be the real source of the problem.

More likely, not loading it it freed up some memory, allowing your encode to get a bit further before it crashed. So my money is on a memory leak (prob from srestore).

crasus
28th April 2009, 01:46
Well, the first time I tryied to do this encode was on a computer with a Core2Duo at 2.33Ghz & 3Gb of RAM and it still crashed the encode/virtualdubmod. I've taken your advices and set srestored to cache=0. I've also removed the MT plugin (as that eats more RAM) and its functions since I'm not in a hurry. I'll post the results.

crasus
28th April 2009, 08:46
Later Edit : it crashed again, despite the new settings. Any other ideas?

krieger2005
2nd May 2009, 18:06
Have you followed Fizick's advice? Try to remove one part after the other.

crasus
4th May 2009, 11:57
Ups, sorry. I didn't see Fizick's advice. But I tried it now, with srestore removed. The encode crashed again, when the second pass started. I'll try to see the others as well.

Could the problem be caused by the fact that I'm using Celtic Druid's XviD 1.1.2 no-nvop build?

crasus
5th May 2009, 00:41
Tryied with a different xvid build, made no difference. Encode crashed.

Trying with yadif as a bobber instead of tdeint. - Failed & encode crashed. AGAIN. :(

crasus
5th May 2009, 17:13
I ran the encode without Mdegrain and it worked without a single problem. So, I assume that's where the problem comes from.

Should I change any of its settings, or...?

yup
5th May 2009, 17:57
crasus!
May be problem with DVD source. Simple script
MPEG2Source("K:\encode.d2v")
ConvertToYUY2()
and use huffyuv codec in VirtualDub. Try. If will be problem try rerip DVD.
yup.

crasus
6th May 2009, 08:11
Finally! Finally! :D The rip is now complete with all the proper filtering and looks great.

srestore(cache=10) did the trick. Thank you for all the advices and tips!