Log in

View Full Version : Problem using external plugins in Avisynth


Marin85
9th November 2011, 06:28
This is basically one of those threads of the type "what am I doing wrong?". After reading through probably 100s of non-relevant documentation, forum posts, discussions, blogs and personal webpages, I finally overcame my frustration and decided to ask these very basic questions.

My first problem is how to make ffmpegsource work with Avisynth. For this purpose I have downloaded ffms2-2.16-avs-cplugin.7z from here (http://code.google.com/p/ffmpegsource/downloads/list) and then unpacked its content in the Avisynth plugin subdirectory. When trying to load Matroska file with only h.264 video inside via ffmpegsource, I get the error message Script error: there is no function named "ffmpegsource". I have also tried LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ffms2.dll") and LoadCPlugin("C:\Program Files\AviSynth 2.5\plugins\ffms2.dll") first and then adding a second line ffmpegsource("c:\sample.mkv") (given that my sample.mkv is on c:\ ), but I am getting the same error message. So, this brings me to the question: how in hell do I make this plugin work? :-)

My second problem is how to make LimitedSharpenFaster work. I have downloaded LimitedSharpenFaster.avs, MaskTools2 2a21+ and Removegrain 1.0-pre from here (http://avisynth.org/mediawiki/LimitedSharpen) as well as Warpsharp package from here (http://avisynth.org/warpenterprises/). Then I placed LimitedSharpenFaster.avs inside Avisynth plugin directory and extracted the other three packages in the same place. If I don't place Warpsharp package in there, opening Avspmod gives a warning about mt_masktools-25.dll and mt_masktools-26.dll that the plugin names contain undesirable symbols etc. When I extract the Warpsharp package in the same directory, Avspmod prompts the following error upon launching: Import: couldn't open "C:\Program Files\Avisynth 2.5\plugins\avsfilter.vdf.avs". and then it prompts the aforementioned warning. Now, when I load my sample with DirectShowSource (at least, this still works fine) and then apply LimitedSharpenFaster, I get the error message Script error: there is no function named "LimitedSharpenFaster".

At this point, I am fairly clueless as to how to make those things work. I will appreciate if the replies contain rather detailed instructions.

manolito
9th November 2011, 07:04
After reading through probably 100s of non-relevant documentation, forum posts, discussions, blogs and personal webpages, I finally overcame my frustration and decided to ask these very basic questions.
Maybe you should just have read the FFMPEGSOURCE documentation...:p

ffms2.dll does not expose a function called "ffmpegsource", and therefore you get the error message. You have to use it like this:
A = FFAudioSource(X)
V = FFVideoSource(X)
AudioDub(V, A)

As an alternative you can use a function called "ffmpegsource2" which is defined in ffms2.avsi. Note that this will not process audio by default (atrack=-2), you have to specify your audio track. If you always prefer to process your first audio track, edit ffms2.avsi and replace the line
atrack = default(atrack,-2)
by
atrack = default(atrack,-1)


For LimitedSharpenFaster I can only speculate. First of all you should change the file extension from avs to avsi so the script will autoload.


Cheers
manolito

sekininsha
9th November 2011, 13:28
for ffmpegsource("c:\sample.mkv") .. uses all these plugins in the folder "plugins" of avisynth

http://avisynth.org/warpenterprises/files/ffmpegsource_20071006.zip

Marin85
9th November 2011, 14:46
for ffmpegsource("c:\sample.mkv") .. uses all these plugins in the folder "plugins" of avisynth

http://avisynth.org/warpenterprises/files/ffmpegsource_20071006.zip
That worked lika a charm! Thank you very much for providing this link!

Apparently, I had the wrong package...

@manolito: Actually, I did read the documentation for those files some time ago, but right now I was following GrandDK's encoding guide and the usage of ffmpegsource() and the given link probably did not have much in common except being outdated... Anyhow, it works now with the new package, and I will try out your suggestion about .avsi extension and will report back.



Update: I changed the extension to .avsi as per manolito's suggestion and Avspmod stopped giving me the error that there is no such function. However, the other two errors still keep pooping up, and when I tested Limitedsharpenfaster, it is non-functional as it does not change the output even the slightest no matter if I increase the sharpening effect.

manolito
9th November 2011, 15:17
Apparently, I had the wrong package...
No you didn't. The plugin from this link dates back to the year 2007, it is rather outdated...


Cheers
manolito

Marin85
9th November 2011, 15:45
No you didn't. The plugin from this link dates back to the year 2007, it is rather outdated...
Well, in that case, did they change the usage? Because with the outdated package ffmpegsource() works fine, but with the new package I downloaded first I have to use it via

A = FFAudioSource(X)
V = FFVideoSource(X)
AudioDub(V, A)


As for LimitedSharpenFaster, I finally managed to find versions of the dependency packages that do not produce any error. I have made a simple self-sufficient bundle (http://ifile.it/n45f1gu) if anyone else runs into the same problems as I did... The packages might be outdated, so here are the versions:
RemoveGrain-1.0
avsrecursion_20050913
masktools_20070805
warpsharp_25_dll_20030103

Except for RemoveGrain, the other three were downloaded from here (http://avisynth.org/warpenterprises/). If anyone believes he has more recent versions of these packages that will work error-free with LimitedSharpenFaster, please feel free to post them here (as always, links will be appreciated).

sekininsha
9th November 2011, 19:02
currently recommended is FFmpegsource2, with "ffms2.dll" and "ffmsindex.exe" in the folder "plugins" of avisynth should work ...


A = FFAudioSource("c:\sample.mkv")
V = FFVideoSource("c:\sample.mkv")
AudioDub(V, A)

Marin85
10th November 2011, 00:28
Ok, gotcha. Thank you both for the valuable input, it is much appreciated!