Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th July 2003, 18:54   #1  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,212
Foolproof and automatic loading of AVS 2.0x plugins

It took me enough tinkering with this process that I thought I'd share the exact steps.

Download:
LoadPluginEx.dll -- dunno exactly which package it came out of, but it's the one that works
oldPlugins.avsi -- autoloading script

Make a subdirectory off your plugins directory and stick your preferred AVS 2.0x plugins there. Add LoadPluginEx2.dll to the same folder. (My DLLs are numbered because I was experimenting with several versions, but you can call it whatever you want so long as you update the script below).

Put the .avsi in your regular plugins directory. Open it in a text editor. Should look something like this:
Code:
LoadPlugin("c:\pf\avisynth2\plugins\old\LoadPluginEx2.dll")
LoadPlugin("c:\pf\avisynth2\plugins\old\DustV5.dll")
LoadPlugin("c:\pf\avisynth2\plugins\old\GuavaComb.dll")
LoadPlugin("c:\pf\avisynth2\plugins\old\PeachSmoother.dll")
LoadPlugin("c:\pf\avisynth2\plugins\old\SmoothHiQ.dll")
Change the path to your plugins directory if necessary, and add references to any other old plugins you may want to use. Save.

You should now be able to integrate AVS 2.0x and AVS 2.5x plugins seamlessly. Here's a script I used on last night's video capture, for instance:

Code:
cap = AviSource("d:\sg-1.avi").ConvertToYUY2
#cap = AviSource("l:\sg-1.avi").ConvertToYUY2
#crop = cap.Crop(0,56,0,-64)
crop = cap  # Lindsey's filters apparently don't like crops

comb = crop.GuavaComb(mode = "NTSC", recall=75, maxVariation=15, activation=40)
peach = comb.PeachSmoother(noiseReduction=30, stability=20, spatial=100, dot=FALSE)
peach = peach.Crop(0,56,0,-64)

decomb = peach.Telecide(order=1, guide=1, post=2, vthresh=45, show=FALSE)
decomb = decomb.Decimate(cycle=5, mode=0)

dust = decomb.PixieDust(limit=2)

resize = dust.LanczosResize(640, 360)

return resize
#return StackVertical(decomb, dust)
#return cap.AssumeTFF.SeparateFields
Richard Berg is offline   Reply With Quote
Old 19th July 2003, 19:30   #2  |  Link
wotef
Registered User
 
wotef's Avatar
 
Join Date: Apr 2002
Posts: 272
genius, it works!

btw, is there something special about an .avsi file or is it more that the text file resides in the plugin directory?

thanks again for this nifty tip!
wotef is offline   Reply With Quote
Old 19th July 2003, 19:48   #3  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,212
Just as putting a DLL in the plugins directory is the same as calling LoadPlugin() on it at the top of your script, putting an AVSI file in there is like calling Invoke() on it.

This is probably not as widely known since there have been a few issues with it:
(1) code in an avsi should be limited to commands that don't affect the A/V streams, such as SetWorkingDir or anything wrapped in a function
(2) the default extension has been changed a few times to try to avoid the above conflicts (e.g., if you didn't move the *.avs documentation provided with filters, you'd get weird errors) -- we finally settled on *.avsi ("AVS Include") but I suspect many people's function collections haven't been updated
Richard Berg is offline   Reply With Quote
Old 19th July 2003, 22:35   #4  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,295
1) I thought that you can't use AviSynth v2.5 plugins after loading loadpluginex.dll?

2) I thought that Loadpluginex.dll is an AviSynth v2.5 plugin?
Wilbert is offline   Reply With Quote
Old 19th July 2003, 22:54   #5  |  Link
Dreassica
Registered User
 
Join Date: May 2002
Posts: 386
u can load 2.5 plugins after loadpluginex.dll, i do that all the time with no prob.
It is a 2.5 plugin but it doesnt matter in this case.
Dreassica is offline   Reply With Quote
Old 20th July 2003, 01:33   #6  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,212
Quote:
1) I thought that you can't use AviSynth v2.5 plugins after loading loadpluginex.dll?
I don't think you can, but why does that matter? The LoadPlugin commands in the AVSI aren't executed until all your v2.5 plugins are already autoloaded.

Quote:
2) I thought that Loadpluginex.dll is an AviSynth v2.5 plugin?
Of course it is, otherwise there'd be no point. If you're asking why I stick it in "old," the reason is because it doesn't work when it's autoloaded. (Well it does, but it then interferes with the autoloading of other v2.5 plugins). I suppose it would be clearer to create yet another directory for LoadPluginEx.dll, but I personally can't be bothered

Theory aside, all I care about right now is whether it works as advertised. If so, I think this is valuable information considering how many people have had problems with it. If not, I need to know so I can withdraw my code and revise.
Richard Berg is offline   Reply With Quote
Old 20th July 2003, 10:46   #7  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,295
Quote:
If you're asking why I stick it in "old," the reason is because it doesn't work when it's autoloaded.
I should have asked that, cause that's what I meant. You had to do that with the first version of loadpluginex.dll. But I don't have problems with the newer versions ...

Quote:
If not, I need to know so I can withdraw my code and revise.
Your methods works fine
Wilbert is offline   Reply With Quote
Old 22nd July 2003, 01:07   #8  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,212
Sounds like a good report. Posted and linked appropriately.
Richard Berg is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:14.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.