View Full Version : Script Problem - Need Help
ArieBK
19th March 2002, 06:24
this is the script i try to make work :
LoadPlugin("D:\-= DVD =-\DVD2sVCD\MPEG2Dec\mpeg2dec.dll")
Mpeg2source("c:\_project\Jackal.d2v")
function VD_Subtitler(clip clip, string filename)
{
LoadVirtualdubPlugin("D:\-= DVD =-\VirtualDub-1_4\plugins\subtitler.vdf", "_VD_Subtitler")
return clip._VD_Subtitler(1, filename)
}
BicubicResize(480,480,0.75,0.75)
VD_Subtitler(clip ,"c:\_project\subs.ssa")
ResampleAudio(44100)
the error i get is that somthing wring in the script @ line 9 about "clip"
what wrong :confused:
allso do i need to insert a RGB filter to get it work ?
tanks
hakko504
19th March 2002, 09:03
First, VD filters always only work in RGB mode, so convert to RGB is needed. Second, in order to make AVIsynth use the clip from the last command there is a 'last' function included, so your script should look like this:
LoadPlugin("D:\-= DVD =-\DVD2sVCD\MPEG2Dec\mpeg2dec.dll")
Mpeg2source("c:\_project\Jackal.d2v")
function VD_Subtitler(clip clip, string filename)
{
LoadVirtualdubPlugin("D:\-= DVD =-\VirtualDub-1_4\plugins\subtitler.vdf", "_VD_Subtitler")
return clip._VD_Subtitler(1, filename)
}
BicubicResize(480,480,0.75,0.75)
ConvertToRGB()
VD_Subtitler(last ,"c:\_project\subs.ssa")
ConvertToYUY2()
ResampleAudio(44100)
or in order to make the VD_S function more general:
LoadPlugin("D:\-= DVD =-\DVD2sVCD\MPEG2Dec\mpeg2dec.dll")
Mpeg2source("c:\_project\Jackal.d2v")
function VD_Subtitler(clip clip, string filename)
{
LoadVirtualdubPlugin("D:\-= DVD =-\VirtualDub-1_4\plugins\subtitler.vdf", "_VD_Subtitler")
return clip.ConvertToYUY2()._VD_Subtitler(1, filename).ConvertToRGB()
}
BicubicResize(480,480,0.75,0.75)
VD_Subtitler(last ,"c:\_project\subs.ssa")
ResampleAudio(44100)
ArieBK
19th March 2002, 09:26
what is the different between last and clip ?
hakko504
19th March 2002, 10:47
'clip' as a variable isn't defined until you give it a value either with '=' or in a function call. 'last' is always defined as the result of the last AVISynth command.
ArieBK
19th March 2002, 18:18
tanks for your advices ! :)
the script DIDN'T Work until i change it a bit
the WORKING Script looks like :
LoadPlugin("D:\-= DVD =-\DVD2sVCD\MPEG2Dec\mpeg2dec.dll")
Mpeg2source("c:\_project\Jackal.d2v")
ConvertToRGB()
function VD_Subtitler(clip clip, string filename)
{
LoadVirtualdubPlugin("D:\-= DVD =-\VirtualDub-1_4\plugins\subtitler.vdf","_VD_Subtitler")
return clip._VD_Subtitler(1, filename)
}
BicubicResize(480,480,0.75,0.75)
VD_Subtitler(last ,"c:\_project\subs.ssa")
ResampleAudio(44100)
tanks again !!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.