Log in

View Full Version : DelayAudio() - DGIndex's Generated Delay value is invalid :O


FLM
29th September 2008, 02:36
Hi, all...

I have a little problem with DelayAudio().
I use a template avs file to generate an automated script with DGIndex.
My script is:

LoadPlugin("DGDecode.dll")
LoadPlugin("NicAudio.dll")
v = mpeg2source("__vid__",cpu=0)
a = nicmpasource("__aud__")
DelayAudio(__del__)
AudioDub(v,a)

as you can see, I want to delay the audio automatically without having to delay it by using the "Interleaving..." option in VDub.
the problem is that when opening the avs file with vdub I get an error message saying: "Script error: Invalid arguments to function DelayAudio"

Generally, I get a delay of 56ms so the value is DelayAudio(0.056) and the error happens.
I use avisynth 2.5.7 and DGindex 1.5.0.

Can it be that something has changed in DelayAudio's syntax?

any help appreciated. thanks :)

Guest
29th September 2008, 03:33
Your script is wrong. DelayAudio(0 is looking for the clip in the implicit variable 'last', but it's not there, because you've assigned it to a. Try this:

LoadPlugin("DGDecode.dll")
LoadPlugin("NicAudio.dll")
v = mpeg2source("__vid__",cpu=0)
a = nicmpasource("__aud__").DelayAudio(__del__)
AudioDub(v,a)

FLM
29th September 2008, 03:50
Now it works ;)
I now see that it was a problem on my end... ;P

Thank you so much for the quick and helpful reply, neuron2 ;)