![]() |
Error using script...
Hey, hopefully someone can help me out. I honestly have no idea what i'm doing... just experimenting I guess. Anyway, i'm trying to encode a video using this script.
################################################## ################ # Using Kwag’s Motion Adaptive Filtering to get more compression # ################################################## ################ ############## # Parameters # ############## myanamorphic=true # change to false if on step 6 you had 4:3 instead of 16:9 m_width=720 movie="E:\Dune\Dune1.d2v" myoverscan=1 # Test values from 0 to 3 here. Bigger files produce more quality but MaxTreshold = 1.50 nf = 0 # Current frame. ################ ## Functions ### ################ function fmin( int f1, int f2) { return ( f1<f2 ) ? f1 : f2 } ########## # Script # ########## MPEG2Source(movie) #Resize, over scan and borders undot() Limiter() asharp(1, 4) GripCrop(m_width,480,overscan=myoverscan,Source_an amorphic=myanamorphic,dest_anamorphic=false) GripSize(resizer="BicubicResize") STMedianFilter(8, 32, 0, 0 ) MergeChroma(blur(MaxTreshold)) MergeLuma(blur(0.1)) ## Linear Motion Adaptive Filtering ## # # ( Portions from AviSynth's manual ) - This will apply temporalsoften to # very static scenes, and apply variable blur on moving scenes. # We also assign a variable - and this is why a line break is inserted: SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 ScriptClip("nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ") # # # GripBorders() #Subtitles # ############ #VobSub(subtitle) # Add a # in the beginning of this line if you don't need #subtitles. converttoyuy2() Everytime I open it in TMPGenc I get this message that also gets put on the video itself. Evaluate: Unrecognized Exception ([ScriptClip],Line1) Any ideas? Sorry but i'm a complete noob when it comes to all of this. Thanks in advance. |
What version of Avisynth do you have?
|
I'm using version 2.5
|
But which one, v2.54 is the latest official version.
|
Sorry about that. I'm using the newest, v2.54
|
You use a DVD2AVI (or DGIndex) that does not match the version of mpeg2dec3 used by avisynth.
|
Hmmm... Okay, so what do I do now? Thanks for all the replies!
|
Remove DGindex if you have it. Remove mpeg2dec3dg.dll form the avisynth plugin directory if there is there.
Retrieve on the net mpeg2dec3.dll and DVD2AVI 1.76 (or 1.77.3) and use them ! |
Okay I downloaded version 1.77.3 of dvd2avi. I downloaded the mpeg2dec3.dll and then ran dvd2avi again. I'm still getting the same message. Any other ideas, or maybe something i missed?
|
Are you sure you have mpeg2dec3.dll and only this in your plugin directory ? No "mpeg2dec" nor "mpegdecoder'. Only mpeg2dec3 ?
|
Yep. I only have MPEG2Dec3.dll.
|
Maybe it's the unfilter plugin taht is not correct then.
I suggest you to purge your plugin directory (put the current cotnent elsewhere on your disc) and to put there only the file you need, and to be sure of the correct version installed. |
Check that the line is correctly written, maybe a line break is missing. Copy the 'official' version from here:
Code:
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")Code:
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 2) ") |
Quote:
plugin directory and remove it too, right? Otherwise, even though he uninstalled DGMPGDec from his drive and reinstalled DVD2AVI 1.77.3, he will have both DGDecode.dll and Mpeg2Dec3.dll in the plugins directory. Now, in the presence of these two which one will be called by the Mpeg2Source command? Better check it again that you only have Mpeg2Dec3.dll loser79 ;-) Cheers |
Quote:
|
Hey, I just wanted to say thanks to everyone for all the help. I followed all the suggestions and got it working. I changed so much that last time i'm not sure which thing exactly made the difference but it works now. Thanks again.
|
Quote:
I just wanted to say that it really doesn't matter. All that matters is that now it's working ;-) Cheers |
loser79
is working without change the positions in the script? 8O i see: ## Functions ### ################ function fmin( int f1, int f2) { return ( f1<f2 ) ? f1 : f2 } before: # Script # ########## MPEG2Source(movie) #Resize, over scan and borders undot() Limiter() asharp(1, 4) ...etc... i don't knew that "functions" could be used in the begining before "script" :? can you confirm that?..thanks. |
In a lot of tool and programmating languages, functions must be declared before they are used ! That means that is you have a line with "Filter()" before you have the line 'function Filter() { ... body of the function ... }, you have an error.
Fortunally, avisynth does not work like this. |
Quote:
Quote:
|
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.