Log in

View Full Version : My first avs script & I've tripped up already!


Roscoe62
26th January 2005, 10:11
When I try to open my very first avs script with VDubMod I get the following VirtualDub Error:

Avisynth open failure:
MPEG2Source: couldn't open file
(F:\XVid\B\B.avs, line 10)

Here is the script....

# PLUGINS
LoadPlugin("C:\PROGRA~1\GordianKnot\mpeg2dec3.dll")
# AviSynth 2.5 plugins
LoadPlugin("C:\PROGRA~1\Avisynth\plugins\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\Avisynth\plugins\UnDot.dll")
# AviSynth 2.0 plugins loaded here
LoadPlugin("C:\PROGRA~1\Avisynth\plugins\LoadPluginEx.dll")
LoadPlugin("C:\PROGRA~1\Avisynth\plugins\DustV5.dll")
# SOURCE
mpeg2source("F:\XVid\B\A.d2v")
#LumaFilter()
Undot()
ConvertToYUY2().PixieDust(limit=2)
# CROPPING
crop(20,0,684,572)
# RESIZING
LanczosResize(544,416)

The DVD files are currently in my F:\XVid\A directory
My d2v file (imaginatively called A.d2v)is in my F:\XVid\B directory

AviSynth is currently installed in C:\AviSynth & Gordian Knot is installed in C:\Program Files\Gordian Knot



I'm guessing this is likely a syntax error on my part, but can anyone correct what I've done wrong?

Thanks!

Ultra_Immortal
26th January 2005, 12:30
I would suggest making the .d2v file in the same folder as your DVD Files. Thats what I do. ^_^

Roscoe62
26th January 2005, 20:10
Thanks,

I can give that a try, but the avs script I've generated in the past from Gordian Knot has used this location before without any hitches, so I suspect the problem lies elsewhere.

The only difference is that I've altered the script to include the other AVS filters - the locations of the source files hasn't changed.

Anyone?

DigitalDeviant
26th January 2005, 20:45
Drop MPEG2Dec.dll or DGDecode.dll (depending on what was used to make the d2v file.) I don't see any reason to use both and I'm assuming that the wrong one is attempting to open the d2v file. If for some reason you do need both, switch the order they're in.

Roscoe62
26th January 2005, 23:10
Thanks.

I used Robot4rip/DVD2AVI to create the d2v file, so I'm guessing mpeg2dec3.dll is the correct one to use?

I'll comment out that line and see what happens.

So, mpeg2dec3 & dgdecode do similar things?

Thanks for your help!

niamh
26th January 2005, 23:19
Yes they do, dgdecode.dll/dgindex is a more recent version of mpeg3dec3.dll/dvd2avi, and it's highly recommended you use that pair rather than the older one. (note that it isn't backwards compatible, so any d2v you made with dvd2avi will not work with dgdecode, you would need to redo them)

Cyberia
26th January 2005, 23:47
@Roscoe62: Your error is happening on the mpeg2source command, so first try removing EVERYTHING else and get that to work, then add things back and see if it still works.

Second, DGDecode is a much newer and better version of mpeg2dec. If you can, stop using the older version.

Third, you should perform Cropping sooner in your scripts to make them faster. Cropping should be the first or second thing you do in every script. The only thing that needs to be done before cropping is deinterlacing/IVTC.

Roscoe62
27th January 2005, 02:13
Thanks for your advice, I will try it out tonight.

Cyberia,

I basically "modified" an avs script that GK produced in order to add in the AVS filters I wanted to use. This is probably causing my problems. Without adding any of the avsfilter lines, the vanilla GK script used to find the source files without any problems.

The script I had from GK was working fine, but I want to use PixieDust specifically, so I started "tinkering" with the script.

Ultimately I'd like to ditch GK and just refine a script that I know will work well. All my encodes are TV episodes from DVDs so there's not likely to be a need to change it much.

I would also like to use DGdecode as you suggest, however I'm not sure how. Robot4rip/DVD2AVI is creating the d2v file so in order to generate a d2v file that will happily use DGdecode how do I go about that? Do I just need a newer version of DVD2AVI, or do I need to use a different app to demux the audio to create a d2v file that'll play nicely with DGencode?

Sorry to be so full of newbie questions....but I guess that's what I am!:rolleyes:

Ultra_Immortal
27th January 2005, 06:07
Hey in order to use dgdecode.dll you need a later version of DVD2AVI. Or is that a modified version. Oh! Well whatever it is you need this program: "DGMPGDec" which can be found here:

DGMPGDec Homepage (http://neuron2.net/fixd2v/decodefix.html)


Hope this helps you. ^_^

niamh
27th January 2005, 08:25
The version of GK you use must be really old if it still uses dvd2avi, that means, all the other apps included are outdated too. DGindex was introduced with 0.28.6
My advice is delete the registry keys in options in Gknot(don't forget otherwise there are conflicts between the old meg2dec and dgdecode, and the d2v will not open), then install a brand spanking new one. You can get 0.33.1 here:version 0.33.1 rip pack (http://sourceforge.net/projects/gordianknot/). .These new builds come also with an advanced avs window(where you can customize avs scripts, and save them to an ini file) and a ton of xml help files for new filters, so I'd think you would find it very useful without having to manually edit your scripts, and even if you do, you're up to date.

Roscoe62
27th January 2005, 10:01
Wow!!! I have NO idea how I ended up with such an old version! I THOUGHT I dl'ed it from the Doom9 site only 3-4 months ago, but now I'm not so sure. In any case that DOES explain a lot!

In the short term I managed to rem out the DGDecode plugin and that got the script working for now.

I will now go ahead and uninstall the old version, dl the updated one & install that.

I'm probably going to end up having a bit of "fun" deleting the offending registry entries. I'm not afraid of deleting registry entries (I've done that before) but I'd like to be sure I'm deleting the right ones, and I'm not sure where to find them or which ones need to be deleted. I will be sure to back up the registry before doing anything but can you offer any suggestions as to where to look?

Again, sorry for asking newbie questions, and thanks for setting me straight......again.:)

EDIT: I just realised where the old programs must have come from - not from Gordian Knot - but from Robot4rip. That's the app I use to control the others - DVD2AVI, ChapterXtractor & BeSweet. Don't know how R4R would handle these newer apps so I might be better off learning to use the new ones individually.

niamh
27th January 2005, 14:24
I will be sure to back up the registry before doing anything but can you offer any suggestions as to where to look?
all you really need to do is go to the options tab in GK and hit " delete registry keys", usually nothing more is required.

Don't know how R4R would handle these newer apps so I might be better off learning to use the new ones individually.

AFAIK , R4R has been reintroduced in GK 0.33.1 due to popular demand (I never used it, so I never even checked). All the other apps have not changed as such, but their version are much more recent. Only dv2avi changed name to DGindex, but it looks the same still anyway.and yes, learning to handle them on their own is always valuable (It isn't hard either)

Roscoe62
27th January 2005, 19:55
Excellent! That makes it even easier!

Thanks all for your patience & guidance.

Cheers
Ross :)

Ultra_Immortal
28th January 2005, 13:27
I'm glad I was able to help you. ^_^