Log in

View Full Version : Avisynth will not import script gives errors


molitar
10th October 2005, 16:22
Ok problem seems to happen when I load up Wilberts dub script. Seems combination of updating AVISYNTH, MPEG2DEC (I could have wrong version can't find Dividee's version), and DGINDEX broke the capability in both DVD2AVI and DGINDEX. My DVD.AVS Script:

#LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\MPEG2Dec.dll")
LoadPlugin("C:\Program Files\Encoding\DGMPGDEC\DGDecode.dll")
LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\decomb.dll")
#LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\InverseTelecine.dll")
#LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\Avisynth_Spatial.dll")
#LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\GreedyHMA.dll")
#LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\vobsub.dll")
LoadPlugin("C:\Program Files\Encoding\AviSynth 2.5\plugins\SimpleResize.dll")
#
# SOURCE
mpeg2source("E:\Temp\VTS_04_1.d2v")
Import("vdub_filters.avs")
#
# TRIM
#trim(startframe,endframe)
#
# IVTC
#Telecide()
#Decimate(cycle=5)
# or use
#InverseTelecine(40,10,15)
#GreedyHMA(1,0,4,0,0,0,0,0)
#
# DEINTERLACING
FieldDeinterlace()
# or use
#VerticalReduceBy2
# or maybe
#GreedyHMA(1,0,0,0,0,0,0,0)
#
# CROPPING
crop(4,0,2,2)
#
# RESIZING
SimpleResize(740,480)
#
# SUBTITLES
#VobSub("FileName")
#
#
# DENOISING: choose one combination (or none)
# 1) little noise (fast)
#TemporalSmoother(2,1)
#
# 2) medium noise (slow)
#SpatialSoftenMMX(1,4,6,false,false,4,4,6,8)
#TemporalSmoother(2)
#
# 3) heavy noise (very slow, you have been warned)
#SpatialSoftenMMX(2,4,6,false,false,4,4,6,8)
#TemporalSmoother(3)
#SpatialSoftenMMX(1,4,6,false,false,4,4,6,8)
#
# BORDERS
#AddBorders(left,top,right,bottom)
#
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
#
# FOOL CCEnc
#ResampleAudio(44100)

Now the wilbert's script is here at the avisynth site and have used it for over a year now without any problems until I did the updates:

http://www.avisynth.org/VirtualDub_I

------------------------------------------------

When I play it back with my player MPC I get the message the script's return value was not a video clip. If I try it with dvd2avi I get the message that mpeg2dec.dll is not a valid avisynth 2.5 plugin. It just does not seem to like the script at all. Even if I shorten the script to the first only process for a test it still fails.

#############################################################
# This file provides convenient Avisynth interfaces to #
# various VirtualDub plugins. Load it in your script with: #
# #
# Import("vdub_filters.avs") #
# #
# Version 1.5+, 05-12-2003; #
# sent remarks to w.j.dijkhof@tue.nl #
# #
# I want to thank all the people who helped me providing #
# these scripts (in particular the people at Doom9). #
#############################################################

########################################################
# Change VirtualDub_plugin_directory below to point to #
# the directory containing your VirtualDub plugins. #
########################################################

global VirtualDub_plugin_directory = "C:\Program Files\Encoding\VirtualDubMod\plugins\"

##################################################################
# Some general notes: #
# #
# 1) Colorspace: #
# VD filters use RGB input as opposed to Avisynth which works #
# in both YUV and RGB space. Simply adding ConvertToRGB32 before #
# the VD_xxxx call and everything should work ok and add #
# ConvertToYUY2 after the VD_xxxx call. #
# #
# 2) Interlaced material: #
# Some VirtualDub filters (for example Zoom v1.2) have an option #
# to select interlaced while the corresponding script has not. #
# This can be done internally in AviSynth in the following way: #
# clip.SeparateFields.VD_Zoom(...).Weave or #
# Weave(VD_Zoom(SeparateFields(clip),...)) #
# #
# 3) If you are using AviSynth2 you can use ConvertbackToYUY2 #
# instead of ConvertToYUY2 for converting back to YUV. #
##################################################################

####################################
# Most filters can be found at: #
# http://sauron.mordor.net/dgraft/ #
####################################


#####################################
# 2D Cleaner by Jim Casaburi, v0.6b #
# #
# threshold (0-255), radius (0-10) #
# #
# For athlon/pIII/pIV users there #
# is an optimized version. #
#####################################

function VD_2DCleaner(clip clip, int "threshold", int "radius", bool "interlaced")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\2dclean.vdf", "_VD_2DCleaner")
return clip._VD_2DCleaner(default(interlaced,false)?1:0, default(threshold,75), default(radius,1))
}

# example:
# ConvertToRGB()
# VD_2DCleaner(75, 1)
# ConvertToYUY2()

Guest
10th October 2005, 17:04
The only problem I see is that your crop line is given as:

crop(4,0,2,2)

...which makes a 2x2 frame and resize barfs. When I changed it to:

crop(4,0,-2,-2)

...everything worked fine.

Of course the last script you posted will give the error about not returning a video clip, because it doesn't. You haven't sourced an input file.

molitar
10th October 2005, 17:55
Ok I corrected them.. Yeah that missing source was from all the various testing I been doing re-editing the file. Ok well now it seems to be a filter issue seems simpleresize.dll does not play well with dgindex or avisynth anymore. Any recommendations for a good sizing filter? When I try simpleresize only my video has all kinds of strange hues to it now, but at least now I can see video.

Guest
10th October 2005, 18:26
LanczosResize()

molitar
10th October 2005, 19:47
Hey thanks for the help getting the script to load but since it's now focusing on encode quality I am going to carry it over to a new thread with a sample vob clip to see if someone can help me clean it up. It's a really poor dvd encode.

BTW the funky hues was from default size of 720 x 480 as soon as I reduced it to 640 x 480 the strange hue issue went away.