Log in

View Full Version : There is no function named MPEG2Source


GlemGem
22nd December 2012, 18:29
Hello guys,

I am new here and started to use AviSynth few days ago.

I have some old 16mm film on DVD which I want to clean up by using the script from this thread http://forum.doom9.org/showthread.php?t=161493. However, when I test the script I got this error:

Script error: there is no function named "MPEG2Source" (my_DVD_sample.avs, line 16)

I am using AviSynth 2.5 with Windows 7 (64bit).

In my plugin folder are the following filters: http://oi50.tinypic.com/717fax.jpg

User fpp suggested a few tips to me already like to use LoadPlugin(dgdecode.dll) but then I get error "unable to load plugin....". He also suggest to install the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) which I did. However, the problem still exsists.

Any ideas how to solve this?

Would be great if someone can help.

Thanks.

Mounir
22nd December 2012, 19:47
you have to load the .dll DGDecode.dll you can find in on Dgindex http://neuron2.net/dgmpgdec/dgmpgdec.html
First you have to generate a .d2v file with dgindex

The script:
LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\DGDecode.dll")
MPEG2Source("MyVideo.d2v", cpu=0,info=3)

GlemGem
22nd December 2012, 20:30
I have the DGDecode.dll in my plugin folder http://oi50.tinypic.com/717fax.jpg ...as already mentioned, LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") doesn't work. I get error "unable to load plugin....". :(

Mounir
22nd December 2012, 21:39
Perhaps because you are on Win7 64 and using the AutoLoadplugins ? Am i right ?

If you are on win7 x64 the path is slightly different ....Program Files (x86) ....
Edit the AutoLoadPlugins.reg as follow:


REGEDIT4


[HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth]
"plugindir2_5"="c:\\Program Files (x86)\\AviSynth 2.6\\plugins"


replace Avisynth 2.6 with 2.5 if you're still using this version

Sparktank
22nd December 2012, 22:13
I have the DGDecode.dll in my plugin folder http://oi50.tinypic.com/717fax.jpg ...as already mentioned, LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") doesn't work. I get error "unable to load plugin....". :(

Did you index the video with dgmpgdec?
You have to index the movie first so the DLL can decode and read the index properly.

Open dgmpgdec and load the mpeg file and "Save project".
it will create a .d2v file after it's finished indexing.

In your script for MPEG2Source, point to the .d2v file.

Read through the Quick Help guide that comes with dgmpgdec for more information.

GlemGem
22nd December 2012, 22:58
Perhaps because you are on Win7 64 and using the AutoLoadplugins ? Am i right ?

Yes, I am on W7 64.

If you are on win7 x64 the path is slightly different ....Program Files (x86) ....
Edit the AutoLoadPlugins.reg as follow:

Quote:
REGEDIT4


[HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth]
"plugindir2_5"="c:\\Program Files (x86)\\AviSynth 2.6\\plugins"
replace Avisynth 2.6 with 2.5 if you're still using this version
I just tried it but got still error "unable to load plugin".


Did you index the video with dgmpgdec?
You have to index the movie first so the DLL can decode and read the index properly.

Open dgmpgdec and load the mpeg file and "Save project".
it will create a .d2v file after it's finished indexing.

In your script for MPEG2Source, point to the .d2v file.

Read through the Quick Help guide that comes with dgmpgdec for more information.
The mpg clip is indexed by using the my_DVD_sample.bat and it creates the my_DVD_sample.d2v. Also, I did tried to index the file with dgmpgdec and everything worked fine creating the my_DVD_sample.d2v. However, I got still the same error: http://oi45.tinypic.com/2gtukva.jpg ...I've tried with LoadPlugin and without but the result is the same, error. I did also tested different mpg file without success.

Mounir
22nd December 2012, 23:53
My advice:
- remove the DGDecode.dll from the main plugins folder
- load the dll manually from the dgindex folder

StainlessS
23rd December 2012, 05:44
My advice:
- remove the DGDecode.dll from the main plugins folder
- load the dll manually from the dgindex folder

Agreed. Should not really have in autoload plugins directory if you are manually loading.

Also, suggest remove fftw3.dll from plugins folder, this dll should be in sytem32 on 32 bit and SysWOW64 on 64 bit.
(Usually for FFT3DFilter and perhaps others)

Here a list of all dll's that DGDecode.dll is dependent upon on my 32bit XP


c:\non-install\dgmpgdec\DGDECODE.DLL
c:\windows\system32\ADVAPI32.DLL
c:\windows\system32\GDI32.DLL
c:\windows\system32\KERNEL32.DLL
c:\windows\system32\MSVCRT.DLL
c:\windows\system32\NTDLL.DLL
c:\windows\system32\RPCRT4.DLL
c:\windows\system32\SECUR32.DLL
c:\windows\system32\SHLWAPI.DLL
c:\windows\system32\USER32.DLL

(EDIT: Above edited, previously gave list of dependent dll's for DGIndex.exe not DGDecode.dll)

The path to DGdecode is specific to my system.
The dll's in System32 should be in SysWOW64 on yours.
There is no dependence on any version of VC++ redistributable dll's.

Standard Avisynth (MT versions, dont know) still use "Avisynth 2.5" directory even for v2.6a3, check the full path on your system.
(Probably "c:\Program Files (x86)\AviSynth 2.5\plugins" )

Also use full path to the DGIndex.dll and not just "LoadPlugin(dgdecode.dll)".

Good luck.

EDIT: You would need to set the correct plugins directory if you already used the REGEDIT4 script.
Make sure you have the double backslashes in the Regedit command file ('\\' ) named eg AutoLoadPlugins.reg
and double click it.

GlemGem
23rd December 2012, 11:23
Thanks guys! I will test it later when I am back home.

GlemGem
23rd December 2012, 14:46
Ok, the error is gone. I installed the .reg-file now, removed the DGDecode.dll from the plugin folder and load it directly from the dgmpgdec folder and moved the fftw3.dll to SysWOW64. However, now I get another error, unsupported colorspace: http://oi45.tinypic.com/2s0daa9.jpg How can I solve that?

Sorry for all those questions but I am newbie.

StainlessS
23rd December 2012, 15:02
Suggest

Return Info()

Just after Mpeg2Source(), to verify that you have YV12, and then try between lines up to the error producing line.

I dont see any obvious errors, or conversions to something other than YUV Planar (eg YV12).

GlemGem
23rd December 2012, 15:35
I don't have YV12. I get info that ColorSpace is YUY2. Does this mean I have to change to YV12?

JReiginsei
23rd December 2012, 15:55
Try DGDecode_mpeg2source instead of mpeg2source.

LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\DGDecode.dll")
DGDecode_mpeg2source("C:\MyVideoFolder\MyVideo.d2v", cpu=0,info=3)

StainlessS
23rd December 2012, 16:51
"DGDecode_mpeg2source" is unnecessary as you dont have anything in your plugins that can be confused with it,
although it would do no harm.

Ignore the "LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\DGDecode.dll")" as we already established that you will
do manual load from another directory, and it is a "2.5" directory on your system anyway.

Dont know what to make of "cpu=0,info=3" as cpu=0 is just no post processing (fair enough),
but info=3 is "Output hints in the video (as defined in utilities.cpp/utilities.h)",

why would you need that? (IVTC perhaps, dont know)

Perhaps a simple ConvertToYV12() will suffice, maybe after the "Bob()" in your script.

GlemGem
23rd December 2012, 17:46
Perhaps a simple ConvertToYV12() will suffice, maybe after the "Bob()" in your script.
Thanks, that worked!

But now I got error: MDegrain: wrong source or super frame size

Do you know what this is?

StainlessS
24th December 2012, 03:36
Sorry, cant help, I dont use that script and there is no sign of MDegrain in your posted image of the script.
Perhaps fpp or other will reply in this thread, or if no response within a day or two, then post again in fpp's
thread (The power of Avisynth: salvaging "botched" transfers of old 8mm films to DVD).

EDIT: I dont like putting the DGDecode.dll in my plugins, I have an avsi script in plugins
(called LoadPlugins.avsi or similar) which manually loads that dll from my DGIndex directory, just so
there no possibility of my updating DGIndex and having the wrong/old dll in my plugs dir,
perhaps worth considering doing same.

GlemGem
24th December 2012, 10:36
Thanks for all your help guys! :)

StainlessS, thanks for the tip about the DGDecode.dll, will consider that.

I will post in the other thread salvaging "botched" transfers of old 8mm films to DVD (http://forum.doom9.org/showthread.php?t=161493) about the MDegrain error.

I wish you all merry christmas!