View Full Version : MPEGDecoder.dll (Direct VOB/M2v -> AviSynth)
Pages :
1
2
3
4
5
[
6]
7
8
9
10
Nic
22nd September 2002, 11:13
Cheers UGA :) Ill have to start to use my non SSE machine to test my code on :)
-Nic
kilg0r3
23rd September 2002, 09:52
just a suggestion: depending on the bios you can disable sse there. might make testin more comfortable :)
SILICON
23rd September 2002, 12:01
Please, answer me....
If the user give the crop values to MPEGDecoder, then the MPEGdecoder can ship the decoding of de macroblocks out of window wanted.
Less macrobpocks decoded, less process power.
It can speed the decoding process.
ŋ Is a stupid idea?
bugs7
26th September 2002, 11:08
It work on a P3 933 (in my work) :)
I still wait for my athlon in my home.
I' can only test in my work, not encode ;)
I think it woudl be nice to add a version in your dll ( with a right click on your dll in windows, i would like to see the version)..
thx for your good job :)
Defiler
26th September 2002, 13:23
Originally posted by SILICON
Please, answer me....
If the user give the crop values to MPEGDecoder, then the MPEGdecoder can ship the decoding of de macroblocks out of window wanted.
Less macrobpocks decoded, less process power.
It can speed the decoding process.
ŋ Is a stupid idea? Wouldn't that make the video impossible to deinterlace?
dattrax
28th September 2002, 10:53
For some reason Mpegdecoder.dll doesn't seem to like cce 2.66. The script works in CCE2.5 and in virtualdub, but on cce 2.66 it has the red text saying there is an error in line 3.
here's the script
LoadPlugin("c:\Program Files\dvd2avi186\MPEGDecoder.dll")
LoadPlugin("c:\Program Files\dvd2avi186\Convolution3D.dll")
video=MPEGSource("D:\media\Enterprise-Sleeping Dogs.m2v",0,"raw").separatefields()
even=video.SelectEven().convolution3d(0, 8, 16, 8, 8, 3, 0)
odd=video.SelectOdd().convolution3d(0, 8, 16, 8, 8, 3, 0)
interleave(even,odd).weave()
LanczosResize(720,576)
letterbox(0,0,8,8)
Any ideas?
Jim
dattrax
28th September 2002, 13:43
There has been a few posts on partial decoding of mpeg frames.
If we had a sequence that was all I frame encoded, then it would be possible to drop slices at the top and bottom of the picture, as the predictors are the start of a slice. The problem comes when you have motion compensation, in future frames which relies on data, you didn't decode.
So I believe the answer is no.
Jim
HarryM
28th September 2002, 20:49
Nic:
I tested results of MPEG2DEC2 from trbarry and your MPEGDecoder.
I get 'little' another results, not identical.
Which decoding plugin is more accurate (better quality), please? Your faster MPEGDecoder or older trbarry's MPEG2DEC2? :rolleyes:
Marc FD
28th September 2002, 20:59
Hi Nic ;)
is it possible to have the source of your MPEGDecoder ??
to try somse debugging.
i really want to get it work on my computer.
(yes i'm still unable to make it work !!)
Nic
29th September 2002, 15:24
Yes but I warn you...the source is evil! ;) (i.e. it couldnt be worst written if I tried (now you see why I havent updated it recently, I cant bare to look at it)
Its always been on my site, but now Ive made my site a (tiny) bit prettier :) http://nic.dnsalias.com
ill be dumping everything else ive done up there too. If your going to fix things etc. it would be nice if you released it through me (i.e. send me the patch & ill update the site, give you full credit etc). Obviously you dont have to (I wont hold it against you if you dont :) ) but it makes things easier (as ill be updating the rff problem soon)
(its all under GPL as its just a rehash of the libmpeg2 project)
-Nic
Marc FD
29th September 2002, 15:50
yes i'm going to
1) make it work on my computer
2) hack a lot
3) take the best of MPEG2Dec and merge tham :devil:
of course i'll give you the result first and i'll let you release.
i have no reason to do it an other way ;)
DBaT
30th September 2002, 16:20
@Nic
Any idea what's wrong with my setup when I get this result when trying to start an encode using your version of Mpegdecoder with xvid in virtualdub?
Output from dbug view:
---------------------------------------
O:\Path\file.d2v
Allocating 1646184
Allocating 823092
Allocating 823092
Quantizer distribution for 2nd pass:
----------------------------------------
As output I get first- and seconpass as something like 20kb files.
I don't know if this helps anything but when I point your Mpegdecoder
directly to the vob file and open virtualdub I have only a yellow frame or some other color when I scroll the frames in vdub (I know that seeking isn't enabled in your build but it just seems somewhat strange).
benf2
2nd October 2002, 12:52
SOS(same old ****)!!
Even after new os install...this time xp prof. i still cant get this to work. My AVS plays in media player.... the false avi i get from link2 plays in media player... CCE accepts the false avi and allows me to make my changes and save the ecl....but when its time to encode i still get "UNABLE TO OPEN SOURCE"
ANY ONE ELSE EXPERIENCE THIS PROBLEM.... THE ONLY PLUGIN IS THE MPEGENCODER.DLL AND I AM READING VOBS AND TRIED BOTH KILLAUDIO AND RESAMPLE AUDIO WITH SAME RESULTS....
IS THERE ANYONE OUT THERE RUNNING INTO THIS? NIC, YOU SAY U USE LINK2...WHAT AM I DOING WRONG??????:confused:
ps...forgot to ask...is link2 any advantage in speed since 2.640110 and 2.66 accepts avs files?
HELP!!:devil:
beber75
3rd October 2002, 03:49
Originally posted by The Link
mpeg2dec is faster than Nicīs plugin though there are peaks up to 17 fps with Nicīs plugin but it falls down to 1 fps very often.
Same thing to me.
With meg2dec, i encode at 50 et 60 fps (bi athlon mp 2100 + 512 mo)
If I use mpegdecoder the speed is between 40 to 50 falling regularely to 1 fps and finaly after 15% of 1st pass compression it falls definitly at 1 fps.
Here is my mpeg2dec scripts:
LoadPlugin("MPEG2Dec.dll")
LoadPlugin("SimpleResize.dll")
MPEG2source("D:\xxx\VIDEO_TS\01.d2v")
crop(0,73,718,431)
VerticalReduceBy2
SimpleResize(640,264)
and here is the mpegdecoder:
LoadPlugin("MPEGDecoder.dll")
LoadPlugin("SimpleResize.dll")
MPEG2source("D:\xxx\VIDEO_TS\01.lst")
crop(0,73,718,431)
VerticalReduceBy2
SimpleResize(640,264)
PS: 01.lst have the path to my 2 vob files
It there a solution for that problem (if it's a problem) or am i doing something wrong?
SILICON
3rd October 2002, 16:35
Originally posted by beber75
LoadPlugin("MPEG2Dec.dll")
LoadPlugin("SimpleResize.dll")
MPEG2source("D:\xxx\VIDEO_TS\01.d2v")
crop(0,73,718,431)
VerticalReduceBy2
SimpleResize(640,264)
If you delete VerticalReduceBy2 will engance the quality and the speed.
Your numbers for resolution:
Original: 720x480
After CROP: 718x431 (note: Use pair number)
After VerticalReduce: 718x215
After SimpleResize: 640x264
You are lost information (215 lines) and in SimpleResize can't recover this information.
is not it?
The Link
3rd October 2002, 16:55
@ beber75
With the latest Avisynth version 2.06 the 1fps fallback issue disappeared for me. I didnīt compare the speed against normal mpeg2dec though.
Regards,
The Link
(The one you cannot click on :) )
beber75
3rd October 2002, 17:13
Ok, if I well understood I should try this script:
LoadPlugin("MPEGDecoder.dll")
LoadPlugin("SimpleResize.dll")
MPEG2source("D:\xxx\VIDEO_TS\01.lst")
crop(0,73,718,430)
SimpleResize(640,264)
I'll try it after work (when i'll go home in 2 hour). But the changes that you point me out will have no effect on the drop down performance? isn't it?
Oh, by the way I already use the last version of avisynth (2.06) and the last version of Simpleresize (witch have no green line border bug) and MPEGDecoder 1.31
PS: The script you've seen have been generated by Gordian Knot, i've just replace the LoadPlugin section. That's wy I've not change the resizing way to do (and because i'm beginning with avisynth scripts :D)
By the way could someone told me witch resizing method is the most useful for a good compromise between speed/quality.
ACClarke
3rd October 2002, 18:32
it will be better like this
LoadPlugin("MPEGDecoder.dll")
LoadPlugin("SimpleResize.dll")
MPEGsource("D:\xxx\VIDEO_TS\01.lst")
crop(0,73,718,430)
SimpleResize(640,264)
lat3ralis
3rd October 2002, 23:42
By the way could someone told me witch resizing method is the most useful for a good compromise between speed/quality.
@beber75:
I believe LanczosResize is the best quality/speed resizing filter available atm. It is included with avisynth 2.06, more information/discussion can be found here (http://forum.doom9.org/showthread.php?s=&threadid=33290).
lat3ralis
beber75
4th October 2002, 02:07
Originally posted by ACClarke
it will be better like this
LoadPlugin("MPEGDecoder.dll")
LoadPlugin("SimpleResize.dll")
MPEGsource("D:\xxx\VIDEO_TS\01.lst")
crop(0,73,718,430)
SimpleResize(640,264)
I've found why i fall down to 1 fps (see my previous post).... Shame on me.
I have to put on all films I encode the frame lenght for example:
MPEGsource("D:\xxx\VIDEO_TS\01.lst", 146557)
If I dind't do that vdub report me that the movie is 940043 frame long !!! Even if I use the -1 0 and -2 option.
I've just started agin the encoding to see if it stops now.
Bionic-Badger
4th October 2002, 09:34
Hmm... I get that frame # error as well and the plugin crashes when I press the right-arrow key to move forward one frame in Virtual Dub. Guess I'll start using exact frame counts with it.
-Bionic-Badger-
ffroms
7th October 2002, 14:38
Hi!
For start here are my comp. spec.
Celeron 800MHz - 2HDD - 256MB RAM - WinXP
I'm using version MPEGDecoder.dll 1.31 . I'm using The Phantom DVD2 PAL (25FPS).
Here is my avs script
LoadPlugin("D:\Program Files\GordianKnot\MPEGDecoder.dll")
MPEGSource("C:\1_Movies\Phantom\vts_01.lst")
#Trim(0,7499) -for testing
Crop(11,71,-9,-68)
LanczosResize(704,304)
After VDub finished everything was OK but when I tried to mixed with audio it was out of synch. When I checked number of frames in AVI and script (using DVD2AVI project and mpeg2dec) I found out that I'm missing some frames.
AVI=144232
Script=144296
Missing = 64 frames (2,56 sec.)
Then tried again using only 5 min (Trim) with MPEGDecoder and MPEG2dec with Xvid.
Here are resoults:
Test-VOB
1.pass - 12:34
2.pass - 11:36
Test-D2V
1.pass-13:16
2.pass-12:27
As you can see speed was at MPEGDecoder side.
At the end both files had 7500 frames and 5 min. but they don't end with same picture. I moved few frames back and find same picture in both avi's but frames were diffrent. Again I had 2 frames drop only in 5 min video and I'm sure now that is not problem with LanczosResize.
Is there any help 'couse I would love to use MPEGDecoder for speed reason (only celeron 800) but without framedrops.
Thanks
Marc FD
7th October 2002, 15:05
Hi ^^
i'm unable to use MPEGDecoder (doesn't like my athlon XP 1600+ with XP pro) but i think i _may_ have pointed out a problem.
(how ? hehe, i'm still able to read source code ;) )
so if a good soul could compare on a _interlaced_ source the output of :
- MPEGDecoder
- MPEG2Dec
- MPEG2Dec3 with fast = true
i'd really like to know the results (accuracy) of decombing.
(hint : vertically subsampled chroma planes)
and i like to know what's the speed difference (in fps please) between MPEG2Dec and MPEGDecoder. 10 fps ? 50 % ?
thx in advance.
Cheers,
MarcFD
ffroms
7th October 2002, 15:41
and i like to know what's the speed difference (in fps please) between MPEG2Dec and MPEGDecoder. 10 fps ? 50 % ?
I readed in some post that speed boost is 20% (maybe for P4-SSE2) but I got (from my test) 5% speed boost (1-2fps).
Marc FD
7th October 2002, 16:02
thx ffroms.
20% between MPEG2Dec2 with SSE2MMX iDCT and MPEGDecoder seems a bit execssive for me. can a p4 owner say more ??
MPEG2Dec3 fast=true gave me +2.5 fps (5%) too, so it seems reasonnable.
so, 5% for everyone or someone noticed more ??
Nic
7th October 2002, 16:19
It depended on the version :) . The version I was trying to upload yesterday, but didnt have time, is probably the slowest, but the most stable. (theyve got slower & slower)
i.e. I can do nice two pass on it (MPEG1-MPEG2), use long spaced filenames & list files. Doesnt crash, etc.
Ill speed it up afterwards...
-Nic
ps
(The fact the later versions have to do two WaitForSingleObject calls for every frame, doesnt help the speed any :) ). As soon as I can get round that safely, the speed should be nice & quick :D
ffroms
7th October 2002, 18:14
THX Nic for your time :p to do this but what about droped frames? Is there any hope or I'm doing something wrong?
Nic
8th October 2002, 13:15
@ffroms:
Hopefully the next version isnt dropping any frames, but ill look more closely just to make sure :)
-Nic
ffroms
8th October 2002, 15:01
Looking forward to next version.:D
Your's 1.31 version is faster then Marc FD's by around 0.5% (at least at my machine).
Marc FD
8th October 2002, 18:09
There is no serious speed optimisation in MPEG2Dec3 (maybe fast=true ?) .
the next beta will have ssemmx and 3dnow Motion Compensation.
but i cannot test the speed because it's already too fast :rolleyes:
and it seems to be slowed by my memory size/bandwidth (256 Mb DDR-266)
SILICON
8th October 2002, 20:36
Originally posted by Marc FD
There is no serious speed optimisation in MPEG2Dec3 (maybe fast=true ?) .
the next beta will have ssemmx and 3dnow Motion Compensation.
but i cannot test the speed because it's already too fast :rolleyes:
and it seems to be slowed by my memory size/bandwidth (256 Mb DDR-266)
MPEG2DEC3 was a bit slower than MPEG2DEC and MPEG2DEC2.:confused: I make only one test.
I have a 128/266 DDR ram, K7 1700XP and use IDCT=2, CPU=0 for the test.
I think that if you use convolution3d (or any slow filter)you can increase CPU use and not incresase memory bandwidth.
I hope your 3Dnow version. The quality is very good.:)
I hope your filter without program too.
CruNcher
12th October 2002, 22:29
Nic do you know why this happens ?
http://forum.doom9.org/showthread.php?s=&threadid=35636
Emp3r0r
14th October 2002, 22:11
I just checked out the newest version with the sample interface and it seems to be working. I did notice a few things. My only source for testing was some decrypted vobs which were split during ripping. If I open the first vob, the first frame is fine. If I open any successive vob, the first frame is green. Also, if I scroll to the last frame then back I get a writing to memory error. I don't think that these errors have anything to do with MPEGdecoder.dll so I'm assuming that 1.32 using with AVIsynth is the same as 1.31. Keep up the good work Nic. ;)
CruNcher
14th October 2002, 22:37
Nic the error (weird bug) is still there in your example programm its the same every first frame is truncated its not only on Vobs it's also occureing on PS Streams :( so it isn't Avisynths fault could you look into it ? also the speed decreased dramaticly and filesize differs now check comparsion table
@Emp3r0r
do you mean this truncated green first frame ?
http://forum.doom9.org/showthread.php?s=&threadid=35636
and is the first frame of the Vob Black ? maybe thats why it can't be seen on the first Vob if it is a Cinema Movie ;) (will test with other Vobs to be sure) this is weird
Nic
14th October 2002, 23:11
Im not getting that bug, the new dll release is different to 1.31 & the example program needs a hell of a lot of work (but it only took like 5mins to write, so its not bad) (the source for both the dll & example prog are in the _src.zip)
The speed will be slower at present, I can speed it up easily later. Just want to get rid of these weird frame bugs first. Ill have another look tomorrow.
Its more stable now, doesn't crash easily on MPEG-1 & the source is slightly neater to work with. Ill get there in the end :)
-Nic
CruNcher
15th October 2002, 00:03
@Nic
i tested some encrypted and unentcrypted dvds it looks like it has something to do with css encrypted/decrypted streams that where ripped to harddisk
non secured dvds are no prob i now try to rip the vob encrypted from the DVD and use the decss option maybe that is an option for now :)
nope no effect problem still persists *gush* :(
poptones
15th October 2002, 04:11
I don't want to be a splash of cold water, but I've not been able to get any version of this to actually work. I'm using 2.06 with the latest gizmos on sourceforge and, while the last one sorta worked, this one today just crashes. It also crashes when I try to open an MPEG2 using the dialog box. This is with an Athlon XP w/128MB RAM under windows 2000SP3.
I'd really like to see this work, but so far I got zero lovin.'
Edit: hmmm. It seems to be this one file I just made the other day. I have several others encoded with TMPEG that it opens just fine. Could it be related to nonstandard (non-DVD) sizes? This video clip is 640x480 where the others are 480x480. Could it be quantizer related? I already tried changing the file name from .mpg to .mpeg and that didn't help ;)
Edit again: Aha! I have another TMPEG encoded clip (done at a different time, different settings, different rev of tmpeg) of "nonstandard size" and it ALSO crashes when I try to open. when I let the debugger open it goes to this section with an "unhandled exception 0x0000005":
01774527 movd mm0,dword ptr [ecx+eax*4]
0177452B movd mm1,dword ptr [edx+eax*4]
0177452F movq mm2,mmword ptr [esi+eax*8]
01774533 punpcklbw mm0,mm1
01774536 movq mm3,mm2
01774539 punpcklbw mm2,mm0
0177453C punpckhbw mm3,mm0
>>0177453F movq mmword ptr [edi],mm2
01774542 movq mmword ptr [edi+8],mm3
01774546 inc eax
01774547 add edi,10h
0177454A cmp eax,ebx
This other clip is 720x400 pixels high. Must be the nonstandard sizes causing the crash...
Nic
15th October 2002, 09:23
I must just be lucky then :( Ive got the fifthelement & sections of LOTR on my HD & both work fine as well as random SVCD clips ive got.
Ill work on it today & try get it more stable.....
-Nic
Nic
15th October 2002, 10:16
I just tried a CCE clip at 640x480 but I had to load it using:
MPEGSource("D:\MP2Transcode\files\640x480.m2v",-2,"raw")
Worked fine for me (?)
Cheers,
-Nic
BTW:
Dont use the dialog app for testing as that is really just an example of the interface, the interface wont change but the DLL will improve (so the dialog app will improve with it)
Seeking only seems to work for VOBs & ES Streams (not normal PS ones).
That green screen that occurs on some vobs...If it doesn't occur on the first vob, then that is what Id expect. Because maybe it hasn't been split on a I-Frame ? I could make it so it skips to the first I Frame everytime its loaded if people preferred...(which would get rid of the green blocks)
benf2
15th October 2002, 10:19
i ck these post daily, did i miss another release or is 1.31 still the current one?
bugs7
15th October 2002, 10:36
1.32 on http://nic.dnsalias.com/ -> MPEGDecoder ;)
benf2
15th October 2002, 10:44
:D THANKS!!
Koepi
15th October 2002, 12:43
@Nic,
with this version, does 2pass mode work correctly or do I have to check that first? :)
Stopping encoding, restarting with mpegdecoder.dll :)
Thanks for the great work,
best regards,
Koepi
Nic
15th October 2002, 13:01
Yes , I tried especially with MPEG-1 for you :)
Whats strange is there are bugs in CCE 2.66 depending on the resolution. I cant remember exactly now, but try twopass encoding a 352x240 res file to MPEG-2. It will always seem to say there was a CheckSum error. No matter the source. (so watch out for bizzare resolutions)
But for normal resolutions, it was working great in two pass CCE for me. :)
Cheers,
-Nic
Bionic-Badger
15th October 2002, 13:03
Humm... I get these two bad frames (first two frames of the vob),
http://www.g6net.com/~chris/badframe1.png
http://www.g6net.com/~chris/badframe2.png
when I use MPEGDecoder on Chapter 2, Cell 1 of my AKIRA DVD when using this script:
SetMemoryMax(512)
MPEGSource("G:\DVDRIP\AKIRA_Ch2_1.vob", 4213)
Crop(8,0,704,480)
LanczosResize(704, 400)
When I comment out the Crop and the LanczosResize lines I only get one bad frame (first frame),
http://www.g6net.com/~chris/badframe3.png
but it skips a few frames after that one as well (probably 3-5 I'm guessing). In addition when I hit the right-arrow key without first grabbing the slider with the mouse and moving it around, VirtualDub reports, "Avisynth read error: Avisynth: caught an access violation at 0x011e13e8, attempt to read from 0x000001cc."
I get no such errors using MPEG2Dec.
I am using AVISynth 2.06, MPEGDecoder 1.32 (it happened with older versions as well), and VirtualDub 1.4.10 release 13870.
Thanks.
-Bionic-Badger-
Koepi
15th October 2002, 14:38
Heya Nic,
unfortunately this issue is still present:
[1024] P-frame quantizer prevented from rising too steeply
[1024] 2nd-pass: quant:8 Cust inter stats1:1393 scaled:792 actual:2618 overflow:-20026 movie
As you can see, at quant 8 the frame is still bigger as in first pass/quant 2, so there's a frame mismatch involved :-/
Keep up the good work!
Best regards,
Koepi
Nic
15th October 2002, 14:43
Could you tell me what was the source? I group of MPEG2 files? PS/ES?
Weird, I didn't get this at all, I used CCE as well to make sure seeing its so sensitive....
-Nic
CruNcher
15th October 2002, 16:25
@Bionic-Badger
what you used to rip that DVD i trying something different now maybe there is some problem in encrypted dvds or with disabling macrovision who knows will test everything
Koepi
15th October 2002, 17:36
Hi Nic,
the source is a pure mpeg1 system stream @29.972 fps (well, yeah...) - it's an episode of a series.
I hope this helps, but I can snip out an MB of it and make it available for you to test with.
Best regards,
Koepi
Bionic-Badger
15th October 2002, 18:08
Originally posted by CruNcher
what you used to rip that DVD i trying something different now maybe there is some problem in encrypted dvds or with disabling macrovision who knows will test everything
I used SmartRipper (most recent version) and left it as it was ripped. Since it was a chapter from the vob and not the raw vob itself would this have anything to do with it? Also any ideas on why it stops VirtualDub from working?
-BB-
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.