Log in

View Full Version : MPEGDecoder.dll (Direct VOB/M2v -> AviSynth)


Pages : 1 2 3 4 5 6 [7] 8 9 10

Nic
15th October 2002, 18:11
@Koepi:
If you could snip out & give me a couple of meg, that you know wont do two pass CCE correctly. Then that would really help :) But dont worry if you cant.

Cheers,
-Nic

Koepi
15th October 2002, 18:20
Uh, I don't use or even have CCE, I just use Vdub+XviD+DebugView.

I'll try to find some mpeg-cutter and will upload a snippet and give you a link :)

Best regards,
Koepi

EDIT: ok, got a 10MB piece cut out from it, now have to check that the error occurs. Will take 1-2 hours though since I've still an encoding job running ;)

bugs7
15th October 2002, 20:43
Originally posted by UGAthecat
I was about to post about the same thing as what bugs is running into last night, but it was about 5hrs past bedtime and I was too tired to post coherently.
anyway, I tried basically the same stuff as bugs, except I have more filters loaded (but not really used).
I'm at work so I don't have the script, but as I said, it is basically the same as bugs7's, used with avisynth 2.04 & 2.05.
The only thing I could think of was maybe there is a non-integer SSE instruction horking things, as I have a regular athlon (non-xp), or just a conflict somewhere. I'll post script later if needed.

I try the enw mpegDec (1.32).
It still not work on my TB :mad:
p.s.:
i'try with m2v file ripped with DVDdecrypter (DVD pal) and with my on m2v encoded with CCE (pmeg2 pal 352x576)..

mpegsource("e:\\ts2\\ts2.M2V",-2)
and
mpegsource("e:\\ts2\\ts2.M2V",1000)

Nic
16th October 2002, 09:48
@bugs:
Because you seem to have demultixpled the MPEG2 Stream, youll have a raw MPEG-2 stream, so try:
MPEGSource("D:\vidz\vid_demux.m2v",-2,"raw")

and that should play it. :)

-Nic

bugs7
16th October 2002, 11:16
Originally posted by Nic
@bugs:
Because you seem to have demultixpled the MPEG2 Stream, youll have a raw MPEG-2 stream, so try:
MPEGSource("D:\vidz\vid_demux.m2v",-2,"raw")

and that should play it. :)

-Nic

I think i tired it but i'm not sure.
I will try this night ;)

Nic
16th October 2002, 11:27
well it worked for me once I ripped the m2v out of a vob using:
VStrip kiss.vob -!do kiss.m2v 0xe0

-Nic

bugs7
16th October 2002, 17:21
Originally posted by Nic
well it worked for me once I ripped the m2v out of a vob using:
VStrip kiss.vob -!do kiss.m2v 0xe0

-Nic

It's work with "raw" :) :)

thx.

ffroms
16th October 2002, 19:58
Hi Nic!
I've just tested you latest version (1.32) and , again, I have droped frames.
I've used MPEG1 file (NTSC 29.97) with this script

LoadPlugin("SimpleResize.dll")
LoadPlugin("MPEGDecoder.dll")
MPEGSource("C:\Downloads\test.mpg",75123)
ConvertToYUY2()
Trim(0,12000)
Crop(1,29,0,-30)
SimpleResize(352,192)

After 7 tests I've noticed that first droped frame is after 5770 frame. Frame 5770 is OK (pic. up) but 5771 (pic. down) have some wiered shift and video is behind 1 frame. It happens again at frame 10107-10108 but without shifts (just skips frame). In original video there is no problems. I've tried with difrent resize filter and without ConverttoYUY2() and it's still there.
Is there any help?
Tonight I'm gone test it with DVD PAL and report back is it same thing or something else.

P.S. I did encoding in Divx5 and Xvid at fixed quanta 2.

ffroms
17th October 2002, 06:09
OK, I've tested DVD PAL first 12000 frames and there was no frame drops but from time to time i happens those glitches or shifted block even with avs script not only with encoded parts. Interesting is that shifting shows diffrently under WinXP and WinME but it happens at same frame and with same lenght (about 6 frames).
Hope you'll find the time to correct this.
Thanks for this tool.

Nic
17th October 2002, 16:16
I dont know how frame drops are happening, but ill go look into it :)
@ffroms: that sounds difficult to fix but ill try :)

-Nic

Marc FD
17th October 2002, 17:44
Hi Nic.
I've tested 1.32 and the dx interface works, but the avisynth interface doesnt !!

i don't have time to look deeper in the source and to debug. i can just say that it crashes at the second frame (n!=0) when it calls the YV12->YUY2 convertion.

Cheers,
MarcFD

Nic
22nd October 2002, 11:16
Ive given up on MPEGDecoder.dll for the meanwhile. It needs big changes & I dont have the time :(

As a very minor stopgap until then. I made a version of MPEG2Dec.DLL that can create d2v when they are needed before loading the vob file. Therefore you can request vob files straight off the DVD, then the d2v file will be automatically created (although it make take a little while). It supports encrypted & multiple vobs.
i.e.
mpeg2source("g:\video_ts\vts_01_1.vob+g:\video_ts\vts_01_2.vob")

Read more & download from my site at:
http://nic.dnsalias.com

Cheers,
-Nic

ps
I know it may seem pretty pointless....but it was just an idea. And was easy to implement.

Wilbert
22nd October 2002, 12:28
A pity that you don't have time to develop it further. I hoped you would make it into something which can read mpeg2 files (+ mp2 audio) and mpeg1 files (+ mp1 audio). Although these audio formats aren't supported yet (but they will be).

Nic
22nd October 2002, 12:35
Im working on the audio... :) are you too? Thats what ill be working on tonight. MPEGDecoder.dll will live again im sure, just not now...
(too much time is needed to implement rff/tff & get rid of the odd dropped frame/glitch. I have time to do the coding, just not all the testing that would be needed) :(

Cheers,
-Nic

Wilbert
22nd October 2002, 12:44
Im working on the audio... are you too?
No, sorry. I'm not a programmer. But I understood that people (Sh0dan, DSPGuru, others?) are planning to convert besweet.dll to a suitable AviSynth plugin. In that case there will be mp1 and mp2 support.

Emp3r0r
28th October 2002, 02:03
@Nic: concerning your mpeg2dec.dll, how do you tell it to use force film mode?

Nic
28th October 2002, 14:22
LoL, good point :) Ill add that in soon. New version of MPEGDecoder.dll coming soon lol (I had a brain storm while writing the demux code for the MP2 audio input plugin (no point just having mp2 ES as the input).

Re-wrote mpegdecoder.dll from scratch & contacted the author of libmpeg2. rff/tff support should be easy-ish to put in now (I hope). new version will be out sometime as soon as im sure that it works pretty much 100%
(unlike previous version of MPEGDecoder ;) Also will work on any MMX based machine & higher (& is also faster than before :) ))

Cheers,
-Nic

Koepi
28th October 2002, 18:54
Wow, nice to see you work on it again :)

I really like the attempt to use something different for mpeg decoding, to have a choice is always a good idea! Thanks a million again for your great work Nic, I really appreciate it much - and I think plenty users here as well!

Best regards
Koepi

ffroms
28th October 2002, 21:07
I agree with you Koepi. Can't wait for new MPEGDecoder to test it and speed is allways big + for me (only Celeron800). Keep on with good work Nic and thanks for your time .

TheUnforgiven
28th October 2002, 21:31
good news nic
keep up the good work
i'll switch to it immediately when the seeking works.

Nic
29th October 2002, 10:31
Thanks for the support, but this project is showing my ignorance about simple things like 3:2 pulldown, etc. (MPEGDecoder.dll only allows me to have access to full frames, which makes splitting fields & weaving difficult).

The one thing about my new version is that its the only thing ive got that the Intel compiler completely ruins when compiling...(I think it almost has a problem with the static globals in libmpeg2 ?? ). Crashes each time when compiled with ICL, absolutely fine with VC6 (& no its not my code ;) its something in libmpeg2, but this time I dont want to change libmpeg2 at all).
(its still very fast though...no longer multithreaded, so no lengthy WaitForSingleObject syncing, etc)

-Nic

REIGN_
14th November 2002, 18:28
Nice work nic. I believe it's the most useful and fast thing i've used to speed up my encoding since i discovered avisynth. It still needs work for clening out bugs but it is great. Keep up the good work. When are you planning to release the (rewritten) new version; i can't wait for it.

Nic
15th November 2002, 00:32
Wow! someone else it worked for ;) The new version should be out soon, at present its kinda inside the rewrite im doing of d2a_nic. It works real well this time, still needs alot of testing before I release it (& YV12 support ;) )

-Nic

REIGN_
15th November 2002, 12:48
I'll be glad to be an alpha or beta tester. My e-mail is : gkalogeropoulos@yahoo.com so let me know if it is ok for you. I think i'll go YV12 now so it will be a great opportunity. And sth else i have a PIII 700Mhz so the speed up in my pc is very clear and that's why i downloaded MPEGdecoder the moment i read about it.

REIGN_
16th November 2002, 16:26
I took the decision and switched to YV12 and it is great. I am using MPEG2dec3 and i gain same fps as i did with MPEGdecoder. This means that when Mpegdecoder has YV12 support then i will gain about 20%. I think you have made a great tool.

WarpEnterprises
20th December 2002, 14:56
Any news?

REIGN_
28th December 2002, 12:17
what you mention in your site about surprises includes mpegdecoderYV12?

Nic
28th December 2002, 16:18
Well my knowledge of YV12 isn't great, but it should be easy, and I can always check how Marc's done it and compare...

The only thing stopping the new release is that I still havent found a good solution for dealing with repeat fields. the guys at mplayer are currently updating it to use the new libmpeg2 api & I want to see how they do it ;)

Ill keep you posted. Stil havent found a good way of getting the length of the film without parsing it all, but I have improved the dshow (method: -2) way so it should work on most computers.
(PTS values just arent reliable enough, even on DVD's).

All the new code is in my new dvd2avi, so i just need to extract it & put into mpegdecoder...

-Nic

WarpEnterprises
29th December 2002, 22:14
Would it be a possible solution to the frame-counting-job to to parse the whole file but not at full detail?
Don't know if this is possible, the whole parsing process seems quite slow - why?

Stabmaster-Arson
8th January 2003, 23:54
When(if) you have added forced film support, it will be interesting to see if it still is faster!

oyherwise this will need to be used mostly fomr ordinary mpeg conversions, not vobs.

Nic
9th January 2003, 15:22
Well the YV12 version of it is very very quick, havent compared to Marc FDs but it does appear very good, ill release it soon.

The new version works mainly on d2v's as there is no great way to find the number of frames in a mpeg file without parsing. the old parsing is slow because going through a whole mpeg file is intensive.

the new version uses a d2v if available to get its information. if a d2v is not available it creates one before starting (with a nice little progress bar popping up to tell you how long it takes).

(The dll however can be used as old, if you can trust its estimated guess)

Cheers,
-Nic

MaTTeR
9th January 2003, 15:37
That's good news Nic! I'm anxious to give it a nice test drive:) Thx for the effort.

Selur
9th January 2003, 21:26
Yeah,.. here's another one who's anxious to test it out,..
HAR HAR :)

Cu Selur

CruNcher
9th January 2003, 21:49
(The dll however can be used as old, if you can trust its estimated guess)

but PVA support was added right ?

Nic
9th January 2003, 22:18
Not yet, first ill have to get my hands on a pva stream. Ill get that all sorted in dvd2avi before put it in mpegdecoder. in the last mpegdecoder.dll I tried to do everything before anything was really ready....which turned out bad.
Anyway finally got to speed test. I just load the filter with a dvd clip into vdub, select fast recompress and then press F5 to preview and look at the fps.

normal mpeg2dec (yuy2) 51fps
MPEGDecoder (yuy2) 62fps
Mpeg2Dec3.dll (yv12) 65fps
MpegDecoder (yv12) 81fps (!)
(edit: please remember that these are just decoding speeds, you wont see such a huge jump in fps when encoding as well)

So things look quite good at present. It still has a problem with film that has been telecined to 29.97 frames per second (it doesnt obey the rff so its the same as decoding with force film on, which isn't a completely bad thing). Although, it does mean for most anime its not so great yet.

Cheers,
-Nic

Stabmaster-Arson
10th January 2003, 01:17
A (switch) to have it not force film?

CruNcher
10th January 2003, 08:43
Not yet, first ill have to get my hands on a pva stream. Ill get that all sorted in dvd2avi before put it in mpegdecoder.

You only have to say a word and 1000 PVA streams coming your way ;)

bb
10th January 2003, 11:31
I can provide some PVA data captured from DVB-C. I don't believe that the cable variant is different from DVB-S (satellite), but who knows?!

bb

pandv
10th January 2003, 18:28
Waiting for your release.

But, mpeg1 decoding is included in this new release?

pandv.

Nic
10th January 2003, 18:50
Yup I tested it last night...

-Nick

sh0dan
10th January 2003, 19:29
Rock on! Great work! Hope you get the last problems ironed out :)

Iznogoud
11th January 2003, 23:10
Can hardly wait for this one... Thanks in advance. It will rule.

Nic
11th January 2003, 23:37
I hope so :) I should really release it as im writing a quicktime transcoder at present and thats taking all my time....
Ill release a basic version tomorrow with source so all the dumb errors ive made can be spotted while im working on something else ;)

Cheers,
-Nic

Iznogoud
11th January 2003, 23:48
Great news :cool:

Iznogoud
12th January 2003, 17:43
New version is out at http://nic.dnsalias.com/ Cheers Nic!

Marc FD
12th January 2003, 19:28
great, nic !!

you know how much i wanted a new version based on a recent mpeg2dec (not dvd2avi's one, it's really crap)

you can count on me to check the code ^^

Cheers,
MarcFD

Kurosu
12th January 2003, 20:55
The binary is the exact same as MPEGDecoder 1.32 (fc /b Mpegdecoder.dll Mpegdecoder2.dll). That must explain why I get an error.

The avisyth.h in the source looks like a 2.0x version.

Therefore, I guess the files weren't updated on the website.

[edit]
Ok, gotcha. The link for AVS 2.0x and the one for AVS 2.5 is the same. Get this file (http://nic.dnsalias.com/MPEGDecoder/MPEGDecoder_YV12.zip)
There are no referer check... I hope a direct linking won't bother anyone.

Anyway, the source is rather strange: it doesn't use AvisynthPluginInit2 but AvisynthPluginInit for once, and no reference to YV_12 is present... As I don't have nasm, I can't check if replacing the avisynth.h by a 2.5 version fixes the problem.

[edit2]
I have other errors: the project has the /O3 switch, DSHOW.H generates errors,... See Build report here (http://kurosu.inforezo.org/errors.txt)

Marc FD
12th January 2003, 21:44
well, sources seems to be old MPEGDecoder ones.
files are 3 month old.

well, i'll see that in 2 weeks (when i'll have internet back ^^)

CruNcher
12th January 2003, 21:56
Excelent work it not only gets rid of the "repeating frame bug" it's also faster (only really a little faster 0.40 fps compared to Mpeg2dec3) with PP of Mpeg2dec3 it would be even better :)

well, i'll see that in 2 weeks (when i'll have internet back ^^)

oh i think i speak for everyone here if i say we'll miss you and your great additions in that 2 weeks have a nice internet free time :O)

Kurosu
12th January 2003, 22:13
Anyway, here are the first results on an Duron 1.3Ghz (SDRam CAS2, W2K SP3) in YV12 (DirectStream Copy in VD_Mod):

MPEGDecoder 2.00 : 69fps
MPEG2DEC3 0.94 : 47fps

(The old Dividee MPEGDEC2 achieves 40fps)

However, MPEGDdecoder reports 48504 frames while MPEGDEC3 says 39508 (with the original .d2v and the one built by MPEGDecoder2). Under AVS 2.07, MPEGDECODER 1.32 with TotalFramesofFile=-2 reports 39503 (exception occurs unless I trim, -1 is really slow).

When playing forward from a random position, the video just skips or can even sometimes start to play backward! This gets even worse when playing backward and then forward again. However, when playing from the start, it looks ok. But then, refreshing the display in VD_MOD shows a quite different frame.