Log in

View Full Version : trbarry's mpeg2dec2.dll


MattO
18th May 2003, 22:26
trbarry,

Hi, I have used your 'MPEG2DEC2.DLL' for some time now and everything has been fine with it.
I have upgraded my system to XP (NTFS on the C drive) and I cannot get your 'MPEG2DEC2.DLL' to work.
I have a basic AVS file which is fine on an alternative WIN98 box, but I get a 'Unrecognized exception!' error when trying to use it on the WinXP box.
I then substituted the 'MPEG2DEC2.DLL' lines for nic's 'MPEGDECODER.DLL' lines and that worked fine on the WinXP box. I have tried a few different versions of 'MPEG2DEC.DLL' and they all give the same error as yours.
I want to carry on using your 'MPEG2DEC2.DLL' because, to my knowledge, its the quickest version of MPEG2DEC which still allows you to get info about the MPEG2 file via the PVideoInfo routine from a third party program, (I have created a small Delphi app which uses it), as detailed by Aquaplaning here:
http://aquaplaning.20m.com/mpeg2dec_src.zip
I know MarcFD removed this functionality from his 'MPEG2DEC3.DLL'.

Are you aware of this WinXP problem?
Is it something that can be easily fixed?

thanks for any help

MattO

trbarry
18th May 2003, 23:32
I don't know anything about the PVideoInfo and I've pretty much switched to MPEG2DEC3 myself, using YV12 and Avisynth 2.5. But something sounds fishy here. Why don't you post your avs script. And make sure your .d2v file does not specify idct=5 unless you are running on a P4.

Finally, why not try it with a .d2v file made with
www.trbarry.com/DVD2AVIT3.zip .

- Tom

MattO
19th May 2003, 13:29
trbarry,

This is my AVS file:

LoadPlugin("D:\MPEG2Dec2.dll")
MPEG2Source("D:\test.d2v")

I did say it was basic ;). This will work with exactly the same setup on a WIN98 machine.
I have also tried it successfully on a XP system upgraded from 98 (which kept the FAT32 file system). As I said my XP system is NTFS, is there something in this?

The equivilent MPEGDecoder AVS:

LoadPlugin("D:\MPEGDecoder.dll")
MPEGSource("D:\test.d2v")

works fine on all of my test systems.

Could it possibly be the compilation method?

Has anyone else experienced this problem?

Does MPEG2DEC2.DLL need something which isn't installed as standard from a clean XP Pro install?

I know people are going to say I should upgrade to a different version, or use 'MPEGDecoder.dll', but I have been using my existing configuration successfully for quite a while now so I don't really want to change it, and I didn't think upgrading the OS would break it.

MattO

Nic
19th May 2003, 14:09
@MattO:

Please try the suggestions trbarry has made, check the .d2v does not say idct=5 and could you tell us what version of AviSynth your using (as well as what version of DVD2AVI)?

Also, if using AviSynth 2.5 try MPEG2Dec3.dll v1.04 from the thread in this forum and see if that helps.
(if not using avisynth 2.5, try upgrading to it, using mpeg2dec3 and if really needing YUY2 use YV12toYUY2() after MPEG2ource)

Cheers,
-Nic

ps
It wont be XP thats causing the problems, instead it will be a mismatch in software somewhere...

MattO
19th May 2003, 17:51
Nic,

This is the header of the .D2V:

----------
DVD2AVIProjectFile
1
17 D:\test\a\4~3.M2V

Stream_Type=0,0,0
iDCT_Algorithm=2
YUVRGB_Scale=1
Luminance=128,0
Picture_Size=0,0,0,0,0,0
Field_Operation=0
Frame_Rate=25000
Location=0,0,0,5FB0
----------

DVD2AVI 1.76
AVISynth 2.06

I know they are not the most up to date versions but they work fine on all the other test systems.

As part of my test I recreated the directory structure from the XP box onto the 98 box, re-installed AVISynth in the same manner as on XP and using the same files it works fine.

I know I sound like a stumped newbie ;) but I am not, I have been doing this for years. I hope there is something I have overlooked but I'm 99% sure what I have done is right.

To get the 'Unrecognized Exception!' error AVISynth must be installed correctly? And the AVS definitely points to the MPEG2DEC2.DLL:

LoadPlugin("D:\MPEG2DEC2.dll")
MPEG2Source("D:\dvd.d2v")

because, as I said before, if I put 'MPEGDecoder.dll' in the root of my D drive, and use the previously mentioned AVS, it works.

Is it possible for someone to test this for me ... just to prove I'm not going mad :). Has anyone got a fresh install of XP (NTFS) that they can try this on:
Install AVISynth
create a AVS as above using MPEG2DEC2.DLL
and try to open the AVS somewhere (TMPGenc, Media Player etc).

thanks

MattO

MattO
19th May 2003, 21:13
All,

I don't think I explained myself very well here.
>>>>>
I want to carry on using your 'MPEG2DEC2.DLL' because, to my knowledge, its the quickest version of MPEG2DEC which still allows you to get info about the MPEG2 file via the PVideoInfo routine from a third party program, (I have created a small Delphi app which uses it), as detailed by Aquaplaning here:
http://aquaplaning.20m.com/mpeg2dec_src.zip
I know MarcFD removed this functionality from his 'MPEG2DEC3.DLL'.
>>>>

What I meant was I used MPEG2DEC2.DLL (within my delphi app) to get video info (width, height, framecount etc) by calling the DLL with this delphi code:
-----
function openMPEG2Dll(name: PChar): PVideoInfo; stdcall; external 'mpeg2dec2.dll' name '_openMPEG2Source@4';
procedure closeVideoDll; stdcall; external 'mpeg2dec2.dll' name '_closeVideo@0';
function getRGBFrameDll(frame: integer): PByteArray; stdcall; external 'mpeg2dec2.dll' name '_getRGBFrame@4';
-----

If I use my test AVS with a MPEG2DEC (whatever version) which has this DLL call capability I get the error.
If I use my test AVS with a MPEG2DEC (mpegdecoder, mpeg2dec3, etc) which has this DLL call capability removed I don't get the error ... but obviously I can't get the video info.

Any idea's as to why a DLL with this functionality would crash on a clean XP?

Do these calls require any other software?

thanks

MattO

Nic
20th May 2003, 11:42
Oh, sorry Matt, I misunderstood.

There's no reason that call would crash ? Very bizarre, but the DLLs quite old now. Ive added that old functionality back into MPEG2Dec3.dll, remember that you will need to be able to handle the new VideoInfo structure that comes from AviSynth 2.5 (the structure is different).

You'll be able to do it with the next release :) (1.05/1.06)

Cheers,
-Nic

MattO
20th May 2003, 19:48
trbarry > But something sounds fishy here.
Me > I hope there is something I have overlooked but ...
Nic > There's no reason that call would crash ? Very bizarre ...

Sorry all, I hadn't installed DVD2AVI.VFP into my registry, Doh!!!
I am man enough to admit when I've overlooked something simple, but I am not stupid enough to like it, man ;)

Nic > Ive added that old functionality back into MPEG2Dec3.dll, remember that you will need to be able to handle the new VideoInfo structure that comes from AviSynth 2.5 (the structure is different).

I look forward to trying the next release (1.05/1.06).
Is there a explanation for the new VideoInfo structure for 2.5?
or maybe even a example?

thanks

MattO

Nic
20th May 2003, 21:02
The explanation is that version 2 of the avisynth interface is being used now. Ill post an example in C that I wrote to test the interface. The VideoInfo structure is found in avisynth2.h, so you'll have to convert it to Delphi but im sure thats not too tricky (infact most of the variables (width, height, etc) you want will probably be in the same place.

Cheers,
-Nic