Log in

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


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

Koepi
18th August 2002, 00:17
I'm really looking forward to that! :)

Even if there's no speed boost, I'd prefer it over mpeg2dec.dll as it opens the "native" mpeg2/vobs directly... well, it's just cosmetical, but I prefer that ;)

I hope everything works out fine there nic!

Off-topic: your email still gives me a connection time-out :-/

Best regards,
Cheers,
Koepi

Emp3r0r
19th August 2002, 06:49
bump, your MPEGDecoder.dll is exciting and I test it daily.
I too am looking forward to it's development.

Nic
19th August 2002, 12:29
version 1.11:

http://nic.dnsalias.com/MPEGDecoder.zip

Should now work on multiple passes,
the frame estimation still needs work....
(now works with Decomb as well...it crashed Telecide before)

-Nic

WarpEnterprises
19th August 2002, 13:34
yeah, now it's play time again :)
Speed is 50% faster than mpeg2dec !

:( Sorry, found a new bug: if the first frame called for the first time is not frame 0 then it hangs (but doesn't consume any cpu??).
So if you open in VD and move slider to the right (to frame1) it hangs, as VD doesn't display frame0 on opening.
If you press Preview before, then all is OK.

Nic
19th August 2002, 13:50
Oh yeah... Good point :) checking like that I normally take out. But its easy to solve (i.e. I check with each GetFrame to see if the decoder thread is running (WaitForSingleObject(hDecoderThread,0) but then again the filter doesnt support seeking.... :)

-Nic

WarpEnterprises
19th August 2002, 14:06
Sorry for not understanding you completely.
Does "then again" mean:
1- After the bug-correction there will be no seeking any more
or
2- telling us again: mpegsource does not support seeking

Nic
19th August 2002, 14:21
Number 2: :) MPEGDecoder.dll doesnt support seeking (as that would slow things down at present...) So although its bad that it crashes like that, it shouldn't ever happen with normal encoding use...

Cheers,
-Nic

Koepi
19th August 2002, 15:56
Nice Nic, thanks! :) Testing with the matrix again now :)

Best regards,
Koepi

Emp3r0r
19th August 2002, 16:43
Nic: could it be possible to enable or disable seeking based upon an argument in avisynth script? This way when you are cropping or searching for Credits start frame you can enable it and then when you encode just disable it. Just an idea for your amazing work, keep it up.

Nic
19th August 2002, 16:50
Definitely emperor thats the ideal solution, but thats probably a little way off yet...Do you remember that Japanese VFAPI Mpeg-2 codec? The later versions of that can be used as a AviSynth filter....that supports seeking...but it is ssssllllloooowwww :)

-Nic

unplugged
19th August 2002, 17:12
I may understand "sssssssssloooooowwwwwww" because NOT index based.
Do I think so? :rolleyes:

Or.... "Seeking slows sequential decoding" is the news of week!??!? :)

I don't intend to push, but further, you could insert the option (and of course, the code) to create a binary .IDX file named with the same VOBs' name, that contains the seek points. (source scan will just performed one time until the index file is made).

WarpEnterprises
19th August 2002, 19:15
When creating an index what's wrong on generating it in memory?

Koepi
19th August 2002, 19:37
You'd need to regenerate it with every close/reopen again, which is time consuming.

Regards,
Koepi

Danny
19th August 2002, 19:43
is it just me or is the "-1" option not working anymore?

Danny

unplugged
19th August 2002, 19:44
When creating an index what's wrong on generating it in memory?

ah! ... :D

Creating such like operation, as I'm pointing, require entire MPEG content scanning, just similar as creating D2V projets.
for eg. DVD2AVI takes on my K7-2100+/IBM-60GXP 2 mins 10 secs.
Couldn't repeat it for each avisynth session re-runned...
...so to save it you must simply dump memory to one file... movie.idx

[Edit]

...excuse me ... post storming!

Nic
19th August 2002, 20:26
@unplugged: ssllooww...because its slow. at everything.
Maybe its the language barrier unplugged...but I dislike your tone...

@danny: Doh! I had to start from a earlier code base (I broke the increased speed somehow). So I may have broke that with the re-implementing...Ill fix it v.soon. :)

-Nic

Danny
19th August 2002, 20:47
no problem,
Maybe to help you: The maximum frame number you can put in does work.

Danny

jonas
19th August 2002, 23:04
As the discussion on frame seeking came up again, I thought I might poil the post with my thoughts again, even though it'll probabbly be a while until Nic has implemented the seeking.

anyways, I somehow don't really like the idea of going through the like creating a DVD2Avi like GOPList, since the usual amount of seeks people need of a file probbaly is not that hight (i think).

For small offsets of frames wouldn't it be acceptable to just read out the data until we're at the right frame?
For larger offsets a binary search should still require a ralativly small amount of seeks (as soon as you're close you can just read out again)
Although I'm not sure about how to know where we are in the file (at what frame) if calucating the framenumber from PTS doesn't ork propperly. (which I don't understand, but that would you said Nic, wasn't it)

While this is done a tiny List could be created storing framenumber &position every once in a while and a important positions (before and after seeks), so binary search start min&max values can be found by doing a bin search in the List first.
This way the second pass seeks would be accurate again, so no unnecessary seeking during second pass.

I feel I wrote some pointless stuff, but I'm not sure,
jonas

btw: just wanted to thank Nic for doing this great work

unplugged
20th August 2002, 03:27
Originally posted by Nic
@unplugged: ssllooww...because its slow. at everything.
Maybe its the language barrier unplugged...but I dislike your tone...
Not to be tedious (voice), excuse me :)
Just haven't understood the point in your past post
Originally posted by Nic
...Do you remember that Japanese VFAPI Mpeg-2 codec? The later versions of that can be used as a AviSynth filter....that supports seeking...but it is ssssllllloooowwww
Sorry again...

Diable
21st August 2002, 02:06
Originally posted by Danny
is it just me or is the "-1" option not working anymore?

Danny

I'm using 1.11 and it dosen't work for me either.

Nic
21st August 2002, 07:03
Before I go away for a week...

http://nic.dnsalias.com/MPEGDecoder.zip

Version 1.2

Now has basic seeking :D
(& using -1 works again)
Also, Koepi found a problem I think at VOB changes, this should now be fixed. (I hope!)

Cheers,
-Nic

GZZ
21st August 2002, 08:36
very nice Nic.

Its gets better and better every day. :D

The seeking works perfekt here. :D


GZZ

Koepi
21st August 2002, 10:30
Very nice work again, Nic.

I can't test it before tonight as now I'm in the middle of a 720x304-1CD-Matrix encode ;) (with evil convolution3d filtering...amazing to see all the details, no ghosting... and all the noise is gone!)

Best regards,
Koepi

P.S.: enjoy your week off Nic :)

Wimpy
21st August 2002, 10:32
Nic,

Is MPEGDecoder.dll being developed as a component part for your modified DVD2AVI?

BTW, is there a download URL for your DVD2AVI? I would like to give it whirl ;-)

In any case, thanks for all your hard work on this plug-in, it is most useful and super speedy :-D

GZZ
21st August 2002, 10:52
mpegdecoder has nothing to do with dvd2avi.

You can use it in your Avisynth script eks:

LoadPlugin("SimpleResize.dll")
LoadPlugin("MPEGDecoder.dll")
MPEGSource("E:\Test3\VTS_01_1.vob + E:\Test3\VTS_01_2.vob + E:\Test3\VTS_01_3.vob", 0)
SimpleResize(480,432)
AddBorders(0,72,0,72)
ResampleAudio(44000)


But read the html file which comes with mpegdecoder.dll.

GZZ

Wimpy
21st August 2002, 12:27
GZZ,

Yep, I know avisyth is seperate from DVD2AVI ;-) But I read some threads about Nic's version of DVD2AVI and he says that he has added Decomb and IVTC to DVD2AVI.

I was wondering if these features were added directly to DVD2AVI, or if he has integreated avisynth.dll (and some plug-ins) as a pre-processor for DVD2AVI.

GZZ
21st August 2002, 19:23
I tested mpegdecoder a little bit more and I got 2 vob file which mpegdecoder says have the wrong timecode.

I made a avs file with these two lines:

LoadPlugin("E:\Test3\MPEGDecoder.dll")
MPEGSource("E:\Test3\vts_01_1.vob", 0)

and loaded it into MS Media player and it says the time length was 03:59:02 (almost 4 hours).

I rippede the movie with Vstrip and its only file 1 and 2 (1 GB each) which have the time length wrong.

I also tryed other program like Smartripper. But some of the vobfiles just have a wrong timecode.

I can be anything from 2 hour for 11 hours. A normal vob file at 1 GB should be around 20-25 min long.

So when I my script with the hole movie into ms media player. The movie is about 20 hours long. I have tested a few movies and they all have the same problem. I also tried the -1 and it gives the same result as the 0.


GZZ

PS: The vobs have no error or anything. They play fine in DVD2AVI and other apps.

benf2
21st August 2002, 22:23
I tried importing a m2v .... no luck

tried vob files .. no luck


Just trying to do basic script...no filters.
Did the load thing and source but when i try to load the avs into link2 its not correct...shows wrong res. and movie lentgh. Have u tested this dll with link2?

Koepi
21st August 2002, 23:11
Should be a problem of link2 (always blame the commercial product first, before blamin a near-alpha-free-software piece ;) )

Regards,
Koepi

Emp3r0r
22nd August 2002, 06:30
also try opening the avs script in virtual dub too

[edit] OT: How do you programmatically get the length (in time) of a movie in a vob file?

public long Duration()
{
long dur = 0; int hr;
if (mediaSeek != null) hr = mediaSeek.GetDuration( out dur );
return dur;
}works (except with VOB sources) using DShowNET in C#

GZZ
22nd August 2002, 08:49
yea I get the same problem with the timecode even ind Vitrualdub.

and I know all that with directshow. Its the same kind of code you can use in Delphi. But before vob files works. You need to have a DS filter install. Like WinDVD DS filter.


GZZ

Koepi
22nd August 2002, 10:21
Originally posted by Emp3r0r

[edit] OT: How do you programmatically get the length (in time) of a movie in a vob file?

public long Duration()
{
long dur = 0; int hr;
if (mediaSeek != null) hr = mediaSeek.GetDuration( out dur );
return dur;
}works (except with VOB sources) using DShowNET in C#

Wua, c# is no programming language :-/

well, anyways, go to the developers forum and find a long thread about getting file times from vobs... It's active ATM so it's at the top of that forum, something like "getting SRC times".

Koepi

Emp3r0r
23rd August 2002, 06:30
thanks for pointing me to that thread... an interesting read indeed ;)

ok, back to mpegdecoder.dll, i can verify seeking is working. great job nic! is the frame search code using -1 the same as before?

ps: i have a UML and a C++ class this semester, soWua, c# is no programming language :-/ I may aggree with you by the end of the year :D

Moat
23rd August 2002, 16:55
Is it possible to call mpegdecoder.dll from VB or c++ and have it return video info(Height/Width/# Frames)?

-Moat

Nic
24th August 2002, 11:27
@Moat:
Ill try to add something in that does that soon :)

@emperor:
UML & C++ hey? :) Im sure youll like them :)

@gzz:
I can now work on getting this frame estimation right, I should be able to improve it quite a bit, the only other thing I want to do with MPEGDecoder.dll now is that & make it into a DirectShow filter...

@benf2:
Hmmm, I have tested with Link2 & it works fine for me....please keep trying.

@wimpy:
Yes, because my DVD2AVI uses AviSynth, it may also use MPEGDecoder.dll in the future... :)

Im away till tuesday, but then ill try to address the problems...

Cheers,
-Nic

pankov
24th August 2002, 18:52
In the documentation I read that MMX and SSE are required but I have Duron@1000MHz which only has MMX and 3DNow!. Despite this I tried mpegdecode.dll and it worked with .vob files but not with .m2v files. I also tried using
mpegsource("work.m2v,0,"raw")
but it doesn't too. I got this .m2v file from work.vob which opens fine. I used De-mulitplex tool of TMPGEnc and the file should be OK because it opens just fine in Windows Media Player and WinDVD and DVD2AVI.

Can someone tell me what's wrong?

In this thread there was a discussion about the audio in the file that's loaded. What's the current state? Is the audio decoded? Can I use this plugin to demux my .vobs to .m2v and .ac3(.dts) so I can stop using DVD2AVI? In the last question I try to emphasise on .dts.

vlad59
24th August 2002, 19:03
I can only answer to one of your questions :
Your duron has Integer SSE (wich is called extended 3Dnow by AMD) that explain that MpegSource worked on your computer.

sh0dan
24th August 2002, 19:03
@pankov: Your Duron has INTEGER SSE, as does all Athlon processors. This is the part of SSE, that doesn't deal with float-numbers.

@vlad: damn, you beat me to it :)

pankov
24th August 2002, 19:26
:)
I know that Duron processors has Integer SSE but I didn't know that MPEGDecoder.dll needed only this.

10x to both of you for clearing this to me. Now I have to search elsewhere for a reason for my problem

Marc FD
24th August 2002, 23:56
@Nic
hi. i really don't need more speed because for me,
MPEG2DEC.dll work @ 60 fps in full res. (and i've only 1.4 Gzs...)

but, damn, im a so curious guy that i wanted to take a look of on it.
after all, 80 fps could be even better than 60 fps, right :D

so i install, add it to my lib.avs import library,
and make a little test with a .m2v on my HD.

1st attempt ) MPEGDecode("c:/dvd/dvd.m2v")
2nd attempt ) MPEGDecode("c:/dvd/dvd.m2v",0)
3rd attempt ) MPEGDecode("c:/dvd/dvd.m2v",-1)
4th attempt ) MPEGDecode("c:/dvd/dvd.m2v",1000)
5th attempt ) MPEGDecode("c:/dvd/dvd.m2v",1000,"raw")

for all these, (the only ones i tested)
VDub crashes. a very strange crash. not the habitual access violation.
(not from avs but from my filters ;) ) nor the rare suddenly-vanish-in-air (my favorite)
no. it does nothing : it seems to wait for something (0% cpu load).
maybe MPEGDecoder need 5 min to a look in the file?
but i don't think so since it's designed to avoid this step needed with MPEG2Dec.
i think it's a PEBCAK (problem lies between chair and keyboard)
my .m2v file be muxed and i need to type something else than "raw" (but i don't know what...)

2 little features requests (doable)
- could you add friendly error boxes ??
- any way to autodetect the main video stream (the biggest of all ;) )

a big feature request.
- ac3 demuxing & ac3 playback. The dream would become true. :) :D :cool:
i think this feature is asked by all. but i wont complain if it's never implemented. (by you, trbarry or ony other _good_ coder (so i'm excluded ;) )
but if a day someone do it, it would be... i think you simply can't put it in words.
I'm already very happy because dividee added acm audio in AVIsource.

after this prayer, an idea : (don't laugh please :D )
could it be possible to adapt the postprocessing of your XviD DShow filter to the MPEG-2 decoder ?? I think for bad masterized DVDs, you could use it to do a very subtle fully motion compensated filtering. It would simply be outstanding.

i don't think making feature requests is a very valuable action. it's why i offer here my to help on any devellopement i proposed
(because with my knowledge in this :( i can only help :) )

Regards,
Marc

Blight
25th August 2002, 00:20
Nic,
Nice work there mate, if you're planning on porting this into a DirectShow decoder, you may also want to write an MPEG2 splitter filter. Currently, by default, the microsoft filter is used, and ... it doesn't recognized DTS audio tracks, or multiple audio tracks...

So, when porting to DirectShow, please make sure DTS streams are supported and use the IAMStreamSelect DirectShow interface to allow us to select which audio stream to use (when there's more than one).

P.S.
By DTS stream supported, I do not mean decoded (not sure if there is DTS decoding code around), the splitter should only split the stream, WinDVD's audio decoder can handle DTS...

pankov
25th August 2002, 11:36
@Blight
What do you mean exactly by "WinDVD's audio decoder can handle DTS"?
Do you mean that you can make WinDVD audio decoder to decode the .dts files? Are you saying that I can mux a .dts file into avi and then make a .grf file that with WinDVD's filters and get the audio playing?
Or you simply say that if I reencode everything to .vob I can play it with WinDVD?

Blight
25th August 2002, 18:55
The WinDVD Audio Decoder (DTS version of it, not all versions) can decode DVD-DTS films.

And yes, I mean decode to speakers and not pass-through. As far as from that to decoding AVI with DTS audio, I don't really know. May need another filter in the middle like AC3 currently has.

bbq@KL
26th August 2002, 19:04
Actually all WinDVD Audio Decoder can decode DTS.

http://groups.google.com/groups?selm=145e9110.0208250754.1c469837%40posting.google.com&output=gplain

Right now Zoom Player is using iviaudio.ax from WinDVD 4.0.11.83 trial. DTS decoding is still working after I installed/uninstalled WinDVD 3.1 DTS.

They changed my registry and kinda "activated" DTS decoding during WinDVD 3.1 DTS installation.

The registry changes will stay there and iviaudio.ax will have 2/4/6-channel options available.

MaTTeR gave me this idea and we will need a registry tracker to figure out how to "activate" DTS decoding without installing WinDVD 3.1 DTS.

easyfab
26th August 2002, 21:05
Perhaps a stupid question but how do you mux dts in avi?
i try with graphedit but no way to do it.Mux i use a special filter (dtsparser?)like the ac3parser?
I you had the solution it would be cool. it think if the dts can be mux and recognize by the windvd audio filter the spdif output can work also ?

Acaila
26th August 2002, 21:33
AFAIK there doesn't exist any way to mux a DTS audio stream into an AVI. Would be cool if there was :)

Zarxrax
26th August 2002, 21:55
Im curious if it would be possible to add hardware accelleration to the dll? I know a lot of video cards these days feature hardware accelleration for mpeg-2, so couldn't that be used to boost the speed even more?

trbarry
27th August 2002, 15:51
Yes, cards like the Radeon have pretty extensive IDCT and motion comp support. But I remember one of the guys from Elecard saying that it is very hard to get the needed support info out of ATI.

But it would be really nifty if someone could do it. For instance that would also make a hardware supported Xvid player possible.

Maybe Directx 9 with VMR support will help this, but I'm not that optimistic about it.

- Tom

Wilbert
27th August 2002, 16:56
@bbq@KL,

They changed my registry and kinda "activated" DTS decoding during WinDVD 3.1 DTS installation.

The registry changes will stay there and iviaudio.ax will have 2/4/6-channel options available.

MaTTeR gave me this idea and we will need a registry tracker to figure out how to "activate" DTS decoding without installing WinDVD 3.1 DTS.

Get Winalysis 2.90 (look on the web, it's shareware). Uninstall powerdvd from your computer (including those iviaudio filters), take a snapshort of the registry, install powerdvd, and monitor the changes. Please post the results here.

If this is not according to the forum rules, please delete this message.

bbq@KL
27th August 2002, 18:27
Originally posted by Wilbert
bbq@KL,

Get Winalysis 2.90 (look on the web, it's shareware). Uninstall powerdvd from your computer (including those iviaudio filters), take a snapshort of the registry, install powerdvd, and monitor the changes. Please post the results here.

If this is not according to the forum rules, please delete this message.
I tried Regmon 4.34 (http://www.sysinternals.com/ntw2k/source/regmon.shtml) but there were way too many changes. The log file is 8900 lines. All of the changes were done by IKernel.exe and Setup.exe.

I downloaded Winalysis 3.00 (www.tucows.com/system/preview/195902.html) and I may need to try it somewhere else. My computer is already "activated" by WinDVD 3.1 DTS so a different PC would be better.