digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   TMPGEnc: Error using script... (http://www.digitalfaq.com/archives/encode/11746-tmpgenc-error-script.html)

loser79 08-25-2004 02:57 AM

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.

Boulder 08-25-2004 03:09 AM

What version of Avisynth do you have?

loser79 08-25-2004 03:13 AM

I'm using version 2.5

Boulder 08-25-2004 03:26 AM

But which one, v2.54 is the latest official version.

loser79 08-25-2004 03:33 AM

Sorry about that. I'm using the newest, v2.54

Dialhot 08-25-2004 03:40 AM

You use a DVD2AVI (or DGIndex) that does not match the version of mpeg2dec3 used by avisynth.

loser79 08-25-2004 03:44 AM

Hmmm... Okay, so what do I do now? Thanks for all the replies!

Dialhot 08-25-2004 04:09 AM

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 !

loser79 08-25-2004 04:54 AM

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?

Dialhot 08-25-2004 06:26 AM

Are you sure you have mpeg2dec3.dll and only this in your plugin directory ? No "mpeg2dec" nor "mpegdecoder'. Only mpeg2dec3 ?

loser79 08-25-2004 06:39 AM

Yep. I only have MPEG2Dec3.dll.

Dialhot 08-25-2004 06:51 AM

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.

Boulder 08-25-2004 06:54 AM

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)  ")
I'd still rather use mode 2 in TemporalSoften:
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)  ")
Just put that all on the same line in your script and try it.

rds_correia 08-25-2004 12:18 PM

Quote:

Originally Posted by Dialhot
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 !

Well if we're heading this way..., I guess that loser79 needs to find the DGDecode.dll in the Avisynth's
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

Dialhot 08-25-2004 12:53 PM

Quote:

Originally Posted by rds_correia
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.

You're right. I forgot that this dll was also renamed !

loser79 08-27-2004 03:22 AM

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.

rds_correia 08-27-2004 05:00 AM

Quote:

Originally Posted by loser79
...but it works now.

Hi Loser,
I just wanted to say that it really doesn't matter.
All that matters is that now it's working ;-)
Cheers

jorel 08-27-2004 06:26 AM

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.

Dialhot 08-27-2004 06:31 AM

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.

jorel 08-27-2004 06:51 AM

Quote:

Originally Posted by Dialhot
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. .

yeah...seems very logical! :tup:

Quote:

Originally Posted by Dialhot
Fortunally, avisynth does not work like this.

yeah...seems my luck! :)


All times are GMT -5. The time now is 07:41 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.