View Full Version : MPEGDecoder.dll (Direct VOB/M2v -> AviSynth)
Nic
13th August 2002, 13:13
http://nic.dnsalias.com/MPEGDecoder.zip
This is a beta I wrote for direct MPEG-2 into AviSynth...
sample script looks like:
LoadPlugin("MPEGDecoder.dll")
MPEGSource("d:\mp2transcode\mya.m2v")
It decodes quicker than MPEG2Source (MPEG2DEC.DLL) & therefore speeds up encoding...also you dont need to make a d2v file.
It can also read MPEG-2 Transport Streams :)
Ill be modifiying over the next few days, but I thought people could try it out... :)
Cheers,
-Nic
ps
Read the Readme.txt b4 use!
kyousuke
13th August 2002, 13:23
i'll try this right now!
thanks you ! :D
Koepi
13th August 2002, 13:41
Ahoy Nic,
how _dare_ you...?
Now I'm busy somehow extracting the m2v from my matrix VOBs which are unencrypted on HD (the DVD is gone somehow *whistle*), which is a major pain in the a..iroplane.
Would something like
s1=MPEGSource("vob_01_01.m2v")
s2=MPEGSource("vob_01_02.m2v")
s3=MPEGSource("vob_01_03.m2v")
Source=s1+s2+s3
work?
Another idea is
MPEGSource("D:\Video_TS\TheMatrix\vob_01_01.m2v"+
"D:\Video_TS\TheMatrix\vob_01_02.m2v"+
"D:\Video_TS\TheMatrix\vob_01_03.m2v"...)
Unsure if this works either...
(I can't simply join all MPEGs as FAT32 has a well known 4GB barrier :-/ )
I'm not sure as new vobs usually can start with a p-frame...
Anyways, great work, and hope fully I can report some success about the speed impact :)
Thanks,
best regards,
Koepi
EDIT:
ARGS! Dumb I am! Read the readme. Should do that before I start creating a plain MPEG2 file *lol*
Nic
13th August 2002, 13:48
s1=MPEGSource("vob_01_01.m2v")
s2=MPEGSource("vob_01_02.m2v")
s3=MPEGSource("vob_01_03.m2v")
Source=s1+s2+s3
doesnt seem to work (grrrr...) ill fix that now :)
Cheers,
-Nic
Koepi
13th August 2002, 13:52
Damn. I didn't want to cause more work...
Btw., nice credits in the readme ;)
I'm looking forward to the seeking support!
Best regards,
Koepi
ACClarke
13th August 2002, 14:01
A real speed improvement, very good work !!!
But I can just load 1 vob file....
This script crashes in virtualdub
LoadPlugin("C:\DIVX\avisynth\MPEGDecoder.dll")
mpegsource("F:\VTS_01_PGC_04_1.VOB")+mpegsource("F:\VTS_01_PGC_04_2.VOB")
But it's really a very great job.
Koepi
13th August 2002, 14:05
That script is technically the same as that one which Nic said it doesn't work and that he's fixing it ATM.
Regards,
Koepi
ACClarke
13th August 2002, 14:09
I didn't refresh the page before posting :)
so i don't see his answer.......
I'm sorry
Koepi
13th August 2002, 14:13
No need to be sorry, I just wanted to clear that up, some people don't know weather it's different or not. It wasn't meant offensive or anything in that direction.
Best regards,
Koepi
Nic
13th August 2002, 14:23
Hmmm, ive fixed it, ill edit this post & say when the latest version is up in a minute (im just testing at present)
Thinking about it though, using multiple vob files could cause problems because if the code guesses slightly wrongly about how many frames there are, you could miss a couple at the end of each vob, thats something that needs to be worked on...
Cheers,
-Nic
Dreassica
13th August 2002, 14:57
Originally posted by ACClarke
A real speed improvement, very good work !!!
But I can just load 1 vob file....
This script crashes in virtualdub
LoadPlugin("C:\DIVX\avisynth\MPEGDecoder.dll")
mpegsource("F:\VTS_01_PGC_04_1.VOB")+mpegsource("F:\VTS_01_PGC_04_2.VOB")
But it's really a very great job.
If im not mistaken u can merge the VOB's when riping them with Smartripper!! Would that work or is there some hidden prob with it?
I tried it and although it seemed slightly faster!
hakko504
13th August 2002, 15:00
If I recall correctly, one of the problems with using DirectShowSource on vobs are that unless you start each vob with a (I-)key-frame there would be problems with dropped frames when changing vob. I suspect it is the same problem you experience here. I think you should try to create something like SegmentedAVISource, where you give the filename as "filename.avi" but in reality loads filename.00.avi + filename.01.avi + ... Then you could have SegmentedMPEGSource("filename.vob") that automatically loads filename00.vob + filename01.vob + ...
ACClarke
13th August 2002, 15:01
If im not mistaken u can merge the VOB's when riping them with Smartripper!! Would that work or is there some hidden prob with it?
I have some problems with files bigger than 4GB
and i already have the vobs files on my hard disk
WarpEnterprises
13th August 2002, 15:08
1. Looks VERY VERY GOOD!!!
2. What's the reason (beside not having some time) that such a plugin doesn't already exist? (Was it difficult to make, or some drawbacks not clearly visible or mentioned?)
Dreassica
13th August 2002, 15:08
Originally posted by ACClarke
I have some problems with files bigger than 4GB
and i already have the vobs files on my hard disk
That only applies to AVI files, not MPEG
ACClarke
13th August 2002, 15:15
That only applies to AVI files, not MPEG
There is no limit for the file size under w98 ????
I'm sure that FAT32 file size limit is 4GB....
Koepi
13th August 2002, 15:17
I like the idea of SegmentedMPEGSource(). It should work a little different as usual though, because else we'd need to rename our vobs ;)
It wouldn't make a big differnce to do that, but while we're at it, it would be nice if that algo searches for "vts_02_X.vob", so the last number before the suffix should be incremented. This would make the frame-number problem less painfully I think, as that way you could treat the vobs as a virtual, huge single vob ;) (dunno if that's possible, but this is the idea that came to my mind).
Best regards,
Koepi
Nic
13th August 2002, 15:27
Hmmm...That does sound the right idea. If I treat it as one vob (i.e. make the read commands span over all the vobs, that could solve easily :) )
"I'm sure that FAT32 file size limit is 4GB" that is correct, (BTW standard (not DML) AVI files tend to have problems over 2GB (in size))
Ill work on that tonight :)
Cheers,
-Nic
easyfab
13th August 2002, 15:29
First at all, thanks Nic for this great work. For me, it give 5% acceleration.
I've a little question about iDCT, in the readme you say it's the same as in dvd2avi but 32 bit, 64 bit or IEEE-1180 reference ?
Nic
13th August 2002, 15:31
Its the SSE MMX idct (i.e. the 32-bit one)...Do you want others? (for me its always been the fastest (apart from SSE2 ones) & the accuracy very good)
-Nic
Koepi
13th August 2002, 15:34
Hehehe...
work on the 4GB limit of FAT32? ;)
Damn. Then I've now the time to fix OggMux, and I just looked at my sources and they're in such a mess that I really dislike doing that ;) Nic, c'mon, code now ;)
Btw., could you try and compile the filter with the intel compiler and with the options
-Ot -G6 -Qunroll -Qvec_report1 -QxiM -Qip -Gf -Qopenmp -openmp_report1
(removing other /O2 and /G* references)? This could give another speed boost I think :) (well, and it doesn't run on k6/k6-2 anymore... maybe we need two versions of that dll ;) )
Hm.
Thanks for your work Nic, I really appreciate it!
Best regards,
Koepi
Nic
13th August 2002, 15:39
Yep ill try with those Params...I normally just use /O3. Doesn't that use full optimisation?
There is too much SSE code in MPEGDecoder.dll so no k6-2/k6-3 support anyway :)
(I could use 3D-Now Motion Compensation for Athlon's etc, but im unsure that it would be better/quicker than SSE MMX.... )
Cant code now :) will later :)
-Nic
easyfab
13th August 2002, 15:49
Nic says :
Its the SSE MMX idct (i.e. the 32-bit one)...Do you want others? (for me its always been the fastest (apart from SSE2 ones) & the accuracy very good)
For me SSE MMX idct is good, actually just wanted to know if some speed optimisation could be done with using it.
CruNcher
13th August 2002, 18:22
Nic could u intergrate Dmitry and Frankensteins SSE2 Code Optimizations to get a little more speed on P4 systems that would be fine :)
Nic
13th August 2002, 18:25
Ive already thought about that :) I will do...
Do you have a link to Frankenstein's source? I know it must be in the DVD2AVI forum somewhere... :)
-Nic
trbarry
13th August 2002, 18:38
Nic -
Great work!
Much of DmitryR & Dr. Frankensteins source is already in the save-oe project, but not the GetBytes or color conversion code. But I have all of it from a few months ago. Email me if you need it.
But the performance important parts are probaby SSE2 motion estimation and IDCT, and they are already in there.
Thinking about it though, using multiple vob files could cause problems because if the code guesses slightly wrongly about how many frames there are, you could miss a couple at the end of each vob, thats something that needs to be worked on...
A wild idea ... have you considered taking your best shot and then sticking to it. ;)
That is, estimate the number of frames as good as you can and then returning exactly that many. Stop if long or pad black frames if needed.
Otherwise there may sometimes be Vdub like problems (used to be) where when you used DirectShowSource it would cause an error at the end of the file.
Maybe even stopping isn't necessary but I'll bet padding is. If you report 10000 frames then maybe you should return that many, even if they are not really there. ???
I don't know what the effect of all this would be on audio sync.
- Tom
dividee
13th August 2002, 19:19
Very nice Nic ! :)
I'm curious: Wouldn't it be difficult to implement random access without a d2v ?
What's going to be next? Azid-based AC3 decoding ? :p
Nic
13th August 2002, 19:48
:) Yup very difficult without a d2v file (well not difficult, but Id have to make an educated guess, seek to there in the file, scan for the correct frame, etc etc :) )
No random access with this filter, because for encoding, we dont use it :)
What's going to be next? Azid-based AC3 decoding ?
:) Now thats not a bad idea :) lol
-Nic
Koepi
13th August 2002, 19:51
Niiiiic!
Stop posting, add the multisegment reading, I want to do a testrun for the matrix! ;)
Best regards,
Koepi
dvman
13th August 2002, 21:33
I've used your sample script and only modified it to reflect my local paths. And guess what! I have no speed increase over the "old" dvd2avi(1.76)+avisynth(2.04)+mpeg2dec.dll. But thanks for your work anyway... :)
My core specs: AthlonTB 1400, 1Gig of Ram...
Nic
13th August 2002, 22:38
Strange ? Well it was definitely faster for me...but ive now added a MMX version of memcpy & restructured the decoding (I directly decode into AviSynth's frame buffer)
Dont expect a big increase though, its just that little bit quicker :)
(best to look at the estimated end time in VDub & compare)
@Koepi: LoL :) Ive just finished it (not yet for transport streams though), testing it now...
It now works so a sample script would look like:
LoadPlugin("MPEGDecoder.dll")
MPEGSource("e:\video_ts\vts_05_01.vob + e:\video_ts\vts_05_02.vob")
You can add upto 30 file names like that...does anyone know if there is a limit on the string size of AVISynth parameters??
Cheers,
-Nic
Koepi
13th August 2002, 23:25
Heh :)
Nice Nic!
If I remember correctly, a statement can only have 255 characters (somewhere deep hidden in the original aviysnth documentation).
Maybe it helps if you rename your files to something short and put the avisynth script into the same dir, then it shouldn't be a problem.
For now, it's beta, so such limitations are still very comfortable to live with, I think :)
Best regards,
Cheers *hicks*, :)
Koepi
Nic
13th August 2002, 23:57
Hmmm... 255 Thats even less than MAX_PATH. I guess I could also add support for .lst files then :)
-Nic
dividee
14th August 2002, 00:00
By looking at the source, I think there isn't any length limitation on strings. If there is one, it should be more than 4096 chars.
But it would be nice to have a SegmentedMPEG2Source anyway :p
For memcpy, you might want to use the env->BitBlt function provided by avisynth. For now it uses the stock C lib memcpy, but soon it will be replaced by highly optimized processor-dependent code.
Moat
14th August 2002, 04:28
Hmm, It doesn't seem to like my .m2v files. Mine are created from my tivo using extraction methods.
-Moat
Nic
14th August 2002, 08:31
@dividee:
Thats good news, ill add a segmented mpeg source too :)
(The memcpy im using at present is the mmx one supplied by AMD, Ive tried to cut the number of memcpy's now as well :) )
@moat:
Could you upload a sample somewhere of one of your small m2v files?
-Nic
jonas
14th August 2002, 12:48
sadly vdub crashes when I try to load my test.avs:
LoadPlugin("C:\...\MPEGDecoder.dll")
MPEGSource("C:\...\test.mpg")
Am I doing something wrong?
I'll add vdubs crashinfo as attachment.
The test.mpg is an mpeg2 file, 4.5 Mb in size, created with power vcrIII and works fine with .dv2+mpeg2dec.dll.
jonas
Edit:
Forgot to mention. I'm using the 2.04 avisynth at the moment. so might be that?
Nic
14th August 2002, 13:16
Hi Jonas,
is there anyway you can upload/send me a bit of that file.
I have a feeling it might be a raw mpeg2 file (ES stream). My new version has support for that....(i.e. you type "raw" in the PID field to set the decoder in raw mode)
I should release it soon :)
-Nic
ps
Whoever, came up with state sequence codes & program end codes for MPEG-2 should be taken outside & shot :)
jonas
14th August 2002, 13:25
Hi Nic,
I don't have much time at the momet, so I'll just add the mpeg2 file as attachment.
Would be great if it's allready solved.
jonas
jonas
14th August 2002, 13:34
the hurry made me forget to add the addachment
Koepi
14th August 2002, 13:51
Originally posted by Nic
I should release it soon :)
I'm sure plenty people will appreciate that! :)
Regards,
Koepi
sh0dan
14th August 2002, 15:25
Originally posted by jonas
sadly vdub crashes when I try to load my test.avs:
LoadPlugin("C:\...\MPEGDecoder.dll")
MPEGSource("C:\...\test.mpg")
[...]
The filter seems to require integer SSE - If you haven't got a P3, P4 or K7 this will happend.
Maybe there should be fallback to slower (pure MMX?) code?
(it's an illegal instruction with a pshufw)
Nic
14th August 2002, 15:33
Well spotted sh0dan, I just assumed that he had read the thread & seen & understood that it needs SSE...I should have made it more clear.
The original C code is still quite quick, so Ill add that back in later, but most probably have a SSE computer (even this ancient Celeron im using does) :)
Just added a new function called NicCrop...same as AviSynth's Crop but takes more obvious parameters...
i.e.
NicCrop(8,10,64,68)
will crop 8 off the left handside
10 off the right handside
64 off the top &
68 off the button
(well, it will be useful for me at least...just testing to do now :) )
-Nic
Koepi
14th August 2002, 15:37
Nic,
you certainly rule! I like that crop version, it's easier to take over the values you found in vdub, thus more intuitive (no more switching around between the filter chain view and the cropping window! YES!).
Thanks for your nice work!
Btw., could you upload a current snapshot? I'm still waiting to encode the matrix again ;)
Best regards,
Koepi
Nic
14th August 2002, 16:05
Well just to please Koepi: :D
http://nic.dnsalias.com/MPEGDecoder.zip
version 1.0 beta (beta because I havent tested thoroughly yet)
The documentation has been hurriedly updated so please re-read for new features, ill update it properly soon :)
This version is definitely faster, supports multiple files, list files, NicCrop & more stable (hopefully)
Cheers,
-Nic
hakko504
14th August 2002, 16:18
Just nitpicking a little, but how would NicCrop(8,10,64,68) differ from the regular (A2.03+) Crop(8,10,-64,-68) ?
WarpEnterprises
14th August 2002, 16:24
It seems not at all.
We will have to mark the new functions very clearly in the docs.
(There isn't only this example!)
Nic
14th August 2002, 16:25
:D LoL Didn't know you could do that with the negative numbers....oh well, its there anyway for people to use :)
Cheers,
-Nic
ps
Oh I didnt realise its a recent addition (Avisynth 2.03+), Im glad I did it then, because im still using beta 5 :)
hakko504
14th August 2002, 17:24
Originally posted by Nic
Oh I didnt realise its a recent addition (Avisynth 2.03+), Im glad I did it then, because im still using beta 5 :)
I thought so. :D
Keep up the good work: I haven't had time to test the new decoder properly yet, but I will do so in the near future. It looks very promising, to say the least. Just adding a few fps will be very useful :)
ACClarke
14th August 2002, 17:45
multi vobs is OK
but there is a problem with frames estimation
for exemple
Lord of the ring (the anime not the movie)
real frame number(dvd2avi) -> 192008 frames
when I use a lst file -> 221898 frames
with vob1 + vob2 + ...... -> 285598 frames
for me it's the last bad point
The Link
14th August 2002, 18:03
I made a little test: Encoding one VOB-file and looking at "Time remaining" in VirtualDub after 3 minutes. AVS2.04, Win2000, P3 667, 256 SDRAM
With Nicīs plugin the estimated remaining time was ~1 minute shorter than with mpeg2dec.
But when I insert "SetMemoryMax(40)" in my script, the behaviour is upside down: 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. mpeg2decīs behaviour is more stable.
I know that this is not very specific. Sorry!
Regards,
The Link
jonas
14th August 2002, 18:18
oop sorry, forot that this crappy thinkpad I'm using while I'm not at home (for the next to weeks) is a P2.
Well, I'll borrow one with SSE to do some testing. Thanks for the hint sh0dan.
jonas
Nic
14th August 2002, 18:20
@TheLink:
But is MPEG2DEC.DLL with SetMemoryMax(40) as quick as my decoder without SetMemoryMax(40)?
-Nic
ps
Ill work on that frame accuracy :)
ACClarke
14th August 2002, 18:23
Originally posted by Nic
Ill work on that frame accuracy :)
cool !
The Link
14th August 2002, 18:23
@Nic
Iīll repeat the test with "SetMemoryMax(40)" to be absolutely sure!
Will be back soon...
The Link
14th August 2002, 18:44
Same test arrangement as above (with "SetMemoryMax(40)"):
Mpeg2dec: remaining time ~19:30 min; relatively stable fps
Nicīs plugin: temaining time ~19:40 min; heavy peaks (falling down to 1 fps very often and rising up to 17 fps)
In this test you can see no significant difference in speed. But this has nothing to say because of the unstable behaviour of Nicīs plugin regarding fps (Iīve waited one minute more and the remaining time was 20:40 mins). To make a significant test Iīll have to encode the whole VOB-file. This will need some more time!
Regards,
The Link
edit: I didnīt read Nicīs answer as well as I should so forget this post! Iīll do it in the right way now.
The Link
14th August 2002, 19:18
ad 1: Donīt drink and post! :D
ad 2: "remaining time" = "Total time (estimated)"
ad 3: Mpeg2dec with "SetMemoryMax(40)" ---> 20:45 mins
Nicīs plugin without "SetMemoryMax(40)" ---> 19:30 mins
ad 4: This is my last post for today! Just a measurement to hold this forum "clean"!
Regards,
The Link
int 21h
14th August 2002, 21:39
Tested with the latest version of MPEGDecoder.dll available via Nic's site. Target clip was Chapter 37 of LotR, Region 1, Retail. Both scripts shared the following:
crop(0,59,720,357)
Decimate(cycle=5)
BicubicResize(640,272,0,0.65)
and only differed in relation to plugin load, and obvious source declarations. Target compressor was XviD, the 06/28 build from Nic's page, with a search precision of 5 and MPEG quants.
Mpeg2dec.dll
Returned 9588 frames
Slowest rate: 16 fps
Fastest rate: 20 fps
Mpeg2dec2.dll (Tom's 'special' P4 Loving version, and with
edited .d2v file to use idct=5 (i.e. sse2))
Returned 9588 frames
Slowest rate: 18 fps
Fastest rate: 22 fps
MPEGDecoder.dll
Returned 9580 frames
Slowest rate: 24 fps
Fastest rate: 27 fps
This shows some definite promise once the frame issue is resolved. Some random access-ness would be nice too, and once the SSE2 optimizations are in, idct, etc. I imagine it will be quite fast :) (Correct me if I'm wrong, but the random access-ness is required for CCE to function correctly?)
All benchmarks gathered from P4 1.5ghz, 256mb RDRAM, running Windows 2000 SP3.
WarpEnterprises
14th August 2002, 21:45
CCE to function correctly
I suppose it is necessary for ALL multi-pass encoding (TMPG 2pass,...) ?!
int 21h
14th August 2002, 21:47
Originally posted by WarpEnterprises
I suppose it is necessary for ALL multi-pass encoding (TMPG 2pass,...) ?!
Anything that doesn't specifically close the handle to the file and reopen it will screw up I think. So two pass XviD via VDub will work if you use the Job Control, however, CCE, et al, I don't think will work correctly, but I haven't tried it yet...
trbarry
14th August 2002, 22:20
Actually, except for great leaps forward in the file you could rely on building an internal d2v file on the fly as you read forward (slowly and sequentially) but allow yourself to teleport rapidly to anywhere you had already been, using logic pilphered from DVD2AVI.
But it would still take forever if you opened it in vdub and dragged the pointer over to the right.
- Tom
int 21h
14th August 2002, 22:43
Come to think of it, I've never really seen anything that handles non-sequential access on the fly in MPEG-2 very gracefully.
WarpEnterprises
14th August 2002, 23:30
The bad news:
* TMPG definitely can't do 2pass with mpegsource
VERY SAD. Maybe a workaround is
mpegsource("clip.mpg + clip.mpg")
then TMPG "sees" the same clip twice ?
[EDIT]: Sorry, doesn't work. It sticks to the last real frame :(
* there seems to be a minimum clip length (~35secs) below the frame count gets completely wrong / negativ
The good news:
* It's really fast (~25% faster than mpeg2dec) and handy (you have to count the time for DVD2AVI-save_project)
Koepi
15th August 2002, 02:33
Hm. I'm not sure yet if I fell over a bug or what that is what I experienced...
using the
MPEGSource("file-a + file-b +file-c..") version, the first von gets decoded _fast_.
But after ~1h30mins the rate dropped from 11-16fps down to 7-8 fps and stayed at that level.
I restarted the computer and try again now, maybe avisynth got somehow swapped out into the swapfile or something.
Another note, using that opening option from above, if you provide a frame-number, the avs crashes vdub.
Hmmm. Did I notice anything else? Well, not really. Just want to help the development here :)
Best regards,
Koepi
Koepi
15th August 2002, 05:27
Hm, too bad. it's getting slower and slower.
It consumes more and more memory - maybe there's a leak in it?
Regards,
Koepi
EDIT: I'm using the avisynth cvs snapshot from yesterday btw., might there be a problem?
jonas
15th August 2002, 11:45
Hi Nic,
is there any way of getting the source code?
I just played a little with the mpeg2dec.dll to make it save the audio on the fly to disc. Still having one tiny problem, but anyway.
My aim is to make the decoder buffer the audio until it is requested by getaudio. Although it might still be of interesst to keep the posibillity to save certain tracks to disc...
Its just demuxing and not decoding, as later on, when comressed auido streaming may be possible with avisynth people might want to keep the mpa or ac3. So I thought its best if it just gives back the raw data, which would that have to interpreted by an audio plugin (I think someone allready metioned a Besweet plugin earlier in this post).
Anyway, I'd basicly like to do the same to your .dll
sorry for this long post
jonas
Nic
15th August 2002, 12:13
Im at a clients so ill be quick :)
1) Ill add random access, it doesnt take too long to flick thru the file & keep a table of appropriate points in the file...but this will take some time
2) Ahh yes, the two pass problem, didnt think of that. Ill make it so when asked for frame 0, it will reset itself to the start, that will hack it enough for now :)
There shouldn't be any memory leak in it ?? Ive kept memory utiliasation to a minimum...(have you tried AviSynth beta 5?)...I look for a leak tonight though)
Cheers,
-Nic
ps
Sounds unbelievable I know, but does MPEG2DEC.DLL report the correct number of frames, I was manually going throu each PTS, SCR & GOP with a bit of code last night, & still wasnt getting exactly what MPEG2DEC.DLL reports....I might have to ask for mpucoders help on this...
Koepi
15th August 2002, 12:23
I'll try again with 2.02 avisynth version, worked best for me until now :)
MPEG2DEC delivers the right framecount, at least here... matrix has the 196155 frames that are corresponding with the real data ;)
Regards,
Koepi
Nic
15th August 2002, 12:29
How do you exactly how many frames there are in the film?
-Nic
Koepi
15th August 2002, 12:47
Virtualdub reports them to you, just move the slider to the last frame. VDub also shows it when encoding, frame no. X/Y.
My "chained vobs" get reported as ~1193000 frames btw when using mpegdecode ;)
Hope this helps,
regards,
Koepi
Nic
15th August 2002, 12:52
Mmmm..Yep thats what MPEG2DEC.DLL reports, but I think its very slightly out (you can also just go File->Information to get the frame length)
Thats way out! Ooops, must have made a real mistake there with the estimation :D
Ill fix it to be more accuate either tonight or tomorrow...
Cheers,
-Nic
Koepi
15th August 2002, 15:22
Just rechecked with mpeg2dec.dll, it reports 196155 frames, which is correct for the matrix... (or maybe it's wrong? ;) )
Best regards,
Koepi
Nic
15th August 2002, 15:31
LoL.
@WarpEnterprises: do you have a clip around ~30secs you could upload? That would help alot (the smallest I have is a 1minute transport stream one)
maven
15th August 2002, 19:08
Not that I want to lessen Nic's work, but saving the time to create the DVD2AVI project does not really count as a "pro"-argument... (although speed does ;))
just create the .d2v while ripping (as you have to read / copy / decrypt the data anyway...)
Nic
15th August 2002, 19:19
:D lol, that would require folks to use VStrip though wouldn't it :)
You're right it's not really a pro argument, but not everyone does dvd ripping when encoding from MPEG-2 & if I can get the frame estimation accurate then it might make life a little easier for some folk...
Take Care,
-Nic
WarpEnterprises
15th August 2002, 22:33
I attach a 16secs mpeg2-clip, that doesnt't work. The same when longer than ~35secs works fine.
@maven: It's not only the time creating a d2v which I see as a con but the dependence on a 3rd program with all versioning conflicts just for creating an index that is not ALWAYS needed. I will take whatever best suites, both ways have their place (in analogy to Avisynth and VD - both do the same but nevertheless you also need both.)
...waiting for the 2pass fix :D
jonas
15th August 2002, 22:38
A solution to get an accurate frame count would be to determine the VideoPTS at start and beginning of each 'chained mpeg2' file and calculate the number of frames.
If the VideoPTS at the start of the second (or third...) file is not set to 0 (the files are not seperatly encoded) the framenumber of the end of the 1st file would just be -1 that framenumber.
For the last file in the sequance one would have to seek near the end and read until the last frame is decoded and get that PTS.
This would also make seeking to certain frame easier, as it would be approx. at (frame/(start_file_frame-end_file_frame)*filesize) , wouldn't it?
This would of course require up to 2*number_of_files seeks to get the frame number at worst case, and a min. number_of_files +1 seeks.
just a thought
jonas
Nic
15th August 2002, 23:27
A solution to get an accurate frame count would be to determine the VideoPTS at start and beginning of each 'chained mpeg2' file and calculate the number of frames.
Thats exactly what it is doing now! :) (although a bit buggy :) )
This would also make seeking to certain frame easier, as it would be approx. at (frame/(start_file_frame-end_file_frame)*filesize) , wouldn't it?
Its not quite as simple as that...but I get what you mean :)
@Warp:
Thanks for the file, Ill try that out tomorrow :)
Cheers,
-Nic
Moat
16th August 2002, 00:14
Okay the new verison with the 0,"raw" option works on my Tivo .m2v files now. Sweet. Thanks
-Moat
Nic
16th August 2002, 15:50
http://nic.dnsalias.com/MPEGDecoder.zip
version 1.1
Should now work with multipass (not tested, but it should do :) )
(When asked for Frame 0 it will reset to start)
No more memory leak...was due to the way I was giving the frame to avisynth.
new option of -1 for frames, this should calculate the number of frames more accuratly (& slowly).
Will work with real small mpeg files now (thanks WarpEnterprise)
(was due to doing a seek from SEEK_END that was bigger then the file length)
Documentation in HTML
Cheers,
-Nic
jonas
16th August 2002, 16:22
Hi Nic,
just making sure:
without the -1 option: is the incuracy as large as described by koepi or up to about 10 frames, as you described in theGetting SCR values from a program stream (http://forum.doom9.org/showthread.php?s=&threadid=29262&pagenumber=2) thread?
I guess it's the second....but anyway
jonas
Nic
16th August 2002, 16:27
I dont understand how Koepi got such an inaccuracy, ive never got that. Best bet is to give it a try & tell me how you get, I dont have a large complement of vobs to try it with....
Thanks,
-Nic
ps
version 1.1 out at http://nic.dnsalias.com/MPEGDecoder.zip
WarpEnterprises
16th August 2002, 21:42
* Sorry, but 2pass doesn't work.
In TMPG it crashes in the 2nd pass (as if it tries to read over the border).
In VD there is sometimes a jump to 0 but not always (I couldn't reproduce the behaviour). It seems as if there is a delay from calling frame 0 and the actual reset.
* Short clips are OK.
* There is a crash when the file is not found.
* The -1 framecount option is reasonable fast/slow (1000fps), but there is an error when the stream is mpg2-svcd. Then you get a false count by a constant factor of about 0.1%.
* m2v works 100% accurate.
Please, continue your good work!!!
Nic
16th August 2002, 23:06
Thanks for the feedback...back to the old drawing board then...
Time to download TMPG i guess.... :)
There is a crash when the file is not found
Cant believe I havent fixed that yet :)
The -1 framecount option is reasonable fast/slow (1000fps), but there is an error when the stream is mpg2-svcd. Then you get a false count by a constant factor of about 0.1%
Hmmm, how was it with 0 framecount on SVCDs? I only ask becaus I tried today with a 3 CD SVCD (LOTR btw) & the frame count was exactly right with framecount = 0;
m2v works 100% accurate
cool :)
Well ill keep trying :)
Cheers,
-Nic
WarpEnterprises
16th August 2002, 23:15
- with the frames "0" setting the number are 100% ok on SVCD.
- I think the "request 0" thingy should work in VirtualDub in the first place, at least in Preview mode (F5), there it is clearly visible what happens (don't waste time with TMPG).
Koepi
17th August 2002, 01:10
Hi,
ok, downloaded the latest version and tried again, following avs:
SetMemoryMax(40)
LoadPlugin("D:\Video_TS\sbc-ripping\avisynth\mpegdecoder.dll")
mpegsource("D:\Video_TS\TheMatrix\vts_02_1.vob + D:\Video_TS\TheMatrix\vts_02_2.vob + D:\Video_TS\TheMatrix\vts_02_3.vob + D:\Video_TS\TheMatrix\vts_02_4.vob + D:\Video_TS\TheMatrix\vts_02_5.vob + D:\Video_TS\TheMatrix\vts_02_6.vob")
Crop(0,78,720,420)
BicubicResize(640,272,0,0.5)
I'm using avisynth 2.0.2 again ATM.
Find attached the vdub fileinfo screenshot (hurry up mods, make it visible ;) )
Koepi
17th August 2002, 02:35
Ok, 1h20mins of the encoding first pass done, time for some results:
The speed remains constant now (yay!).
The frame sizes differ from a usual mpeg2dec.dll encoding (unsure yet if it's a yay!, but it's a difference :) )
Heh, just wanted to report my experiences until now :)
Btw., I use a range within vdub now, set to 196874 (just did a -1000000 on the value returned by vdub for total frames) which is relatively close to 196155 reported via mpeg2dec.dll.
Time for me to get some rest, I'll report more tomorrow!
Nice work Nic!
Best regards,
Koepi
unplugged
17th August 2002, 03:20
Originally posted by Koepi
Crop(0,78,720,420)
BicubicResize(640,272,0,0.5)
Just only curious,
Is this setup targeted for 2 700Mb CDs ?
Koepi
17th August 2002, 03:24
Nope, that's for 1CD. Exactly the same setup that doom9 uses for codec comparisons.
regards,
koepi
unplugged
17th August 2002, 03:41
Nic,
MPEG2 content is often coded in YV12 (2x2 chroma), some time ago trbarry has said that (normally) Avisynth when grabbing the MPEG2 frame (think it was referring mpeg2dec.dll) interpolates the chroma when passing from 2x2 field scheme to 2x1 (YUY).
Of course this would create undesirable, "guessed" stuff.
Could you avoid that interpolation in MPEGsource?
(this also to favour and maximize macroblock-to-macroblock matching in my "lucky" flasking encodes at aligned strategic crop offsets (8,72) and resolutions (704,432) ;) ... allowing me, with mpeg2avi yet, very low 1st-pass sizes!!)
trbarry
17th August 2002, 05:57
MPEG2 content is often coded in YV12 (2x2 chroma), some time ago trbarry has said that (normally) Avisynth when grabbing the MPEG2 frame (think it was referring mpeg2dec.dll) interpolates the chroma when passing from 2x2 field scheme to 2x1 (YUY).
Of course this would create undesirable, "guessed" stuff.
unplugged -
That actually happens in MPEG2DEC.dll. DVD's are stored with only one row of color info between 2 rows of luma info, so all the YUY2 color info is guessed at, since none of it represents sample points that were actually stored in the DVD.
A similar process happens again if it gets converted up even further to RGB, say by going to Virtualdub not in Fast Recompress mode.
So by the time you have gone from YV12->YUY2->RGB you have created 4 points of color info from only one and that one did not even represent any pixel location in the RGB image.
Luckily our eyes can't see color as good as brightness. ;)
- Tom
Nic
17th August 2002, 09:15
Well,
(I was up until 3am last night trying to fix this....so im very bleary eyed at present :) )
I have to do a YV12->YUY2 conversion...Im hoping one of the plans for the new AVISynth is to have YV12 support (& therefore have some YV12 filters)...That would be great (& even quicker :) )
So im not sure what I can do different to MPEG2DEC.DLL
At present I can get CCE & Nandub to do multipass encodes (so thats good :) ) (havent tried tmpg yet)
More code to write ;)
-Nic
Emp3r0r
17th August 2002, 12:12
Great Job Nic!
I tested and with the -1 option i got 186340 frames. Yet it took way long time. With d2v file there was 186446. So you are very close to having the frame count correct. Good luck! BTW, this was multiple VOBs like koepi's setup.
Koepi
17th August 2002, 13:42
Hi again,
I tried the -1 parameter now, it took nearly 7 minutes to scan the files (so about the time dvd2avi needs to scan them... ;) ), the result is:
196556 frames. That's much closer, but since I tried to set a range of 196874 yesterday, I could see that the movie _really_ has 196290 frames, since at frame 196291 vdub crashed.
So DVD2AVI reports too few frames - and mpegdecoder slightly too much ;)
is there something you could do to prevent such chrashes, Nic? How about padding black frames when the mpeg2stream ends? shouldn't cost many bits in encoding, and it would make an automatic 2pass possible ;)
Best regards,
Koepi
unplugged
17th August 2002, 13:42
Originally posted by trbarry
...since none of it represents sample points that were actually stored in the DVD.
This is sure.
What I meant is
Why do not perform a specular projection?
I point this because "later" the frame will be re-treated as YV12
Originally posted by trbarry
Luckily our eyes can't see color as good as brightness. ;)
I always talk from the encoder's point of view (eye) :)
More accurate is data (especially when not further filtered/resized), more near to transcoding is the re-encoding process.
Although, I may be too purist... but I think that don't cost much such modification to allow pix-to-pix projection (of course, doubling 2x2 data to 2 twin 2x1)
Koepi
17th August 2002, 14:40
Hi,
another suggestion:
If you read the frame count via -1, can you write out a file which stores these informations, so you can access the files faster the next time? something like "inputfile.fc" would be appropiate. if file_exists("<inputfile.rc>") {gain info there} else {scan the input files} ?
Best regards,
Koepi
Koepi
17th August 2002, 15:35
I'm starting feeling bad because I post so much here...
I tried a "short twopass" to check a feature for xvid which was suggested by syskIn (btw., I'm going to release a new binary very soon, just have to recompile the sources again and do some cleanups like setting "better" default values for alt CC...).
There I fell over following:
The first pass (2000 frames) went well
The second pass, started immediatly after that, wasn't returning the frames starting at 0, which you can clearly see watching the debug output - scaled size and reached size didn't correspond in any way.
Reloading the AVS script and then doing the second pass, the AVS returned the first few seconds correctly, reset itself to zero - and there the damage was done again.
That happened tonight with a full matrix 2pass as well, and I started wondering where the curve distribution derived from (I was asleep so I couldn't watch the debugview output).
The distribution looked like having a near perfect gaussian statistical spectrum within uants 2-7.... and that distributed nearly perfectly repeated from 8-16...
I'm sorry to always cause troubles with that fine dll, I really like the attempt and that's why I guess! :)
Great respect for that work Nic!
Best regards,
Koepi
EDIT: I'm trying again now with rebooting the computer. maybe the system is f***ed up somehow due to different dll versions etc over the time, so this could help it. I'll do so before the second pass as well, and will do the same procedure (fetching "file information" before starting the second pass to ensure the result is the same).
Nic
17th August 2002, 17:24
All feed back is welcome (I feel bad for posting here too much too, I dont want people to think im bumping this thread up....(if im irritating anyone with this monstrous thread let me know & ill move comments,feedback etc to my site)
CCE (id never used before until about midnight last night :) ) tells me if the frames im returning on the second pass are the same as those on the first pass (it does a checksum)...That was very useful. Ive fixed the bug & two pass seems to be fine (as long as mpegsource doesnt overestimate the number of frames...i still need to work on that)
still needs work though, ive lost a little of the speed, so I need to rectify that before the next release :)
Cheers,
-Nic
Emp3r0r
17th August 2002, 23:41
AVS returned the first few seconds correctly, reset itself to zero - and there the damage was done again. I'm getting the same exact error. If you open in a player and hit play you can see it happen within a few seconds.
Nic
18th August 2002, 00:12
It should be fixed in the next release, part of the problem was the decoder wasn't being reset correctly on a frame 0, the other problem was that it was possible for me to return the frame & then my thread start fiddling with its memory... :)
I have better thread sync'ing now ;)
(at least I hope it will work better now, I can at least do CCE two pass fine :) )
Cheers,
-Nic
ps
I broke the speed of the version I was working on & couldnt get it back up so I had to go back to an early version & reimplement everything again slowly...hence the delay :)
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.
Wilbert
28th August 2002, 14:50
How many lines remain (of the 8900) in your reg-file if you uninstall windvd?
Guest
30th August 2002, 03:19
This plugin isn't working for me. It just hangs VirtualDub when I serve to it. I have an AMD Palamino 1900+. Should it work? Thank you.
Guest
30th August 2002, 03:47
OK, I discovered it crashes when you don't give a full path to the file. Being in the current directory is not enough. :(
Then I found that the first few pictures are not decoded properly and have macroblocks that aren't there when decoded with DVD2AVI. Then I found that the file reports the wrong size and doesn't play all the way through to the end. Then it crashes VirtualDub at the "end". Not ready for prime time, IMHO.
Koepi
30th August 2002, 03:48
Do you mean mpeg2decoder.dll?
Give it some time, depending on the mode for frame-counting you choose it'll take up to ~5 minutes to index the files.
After that, you can work normally again (just fire up debugview, when your files show up there [in case you chose multiple files], it should list them there).
Regards,
Koepi
EDIT: it's nowhere mentioned that it's ready. You have to set the range manually in vdub. the MBs you observe I can't reproduce, it works correctly for me...
Guest
30th August 2002, 03:59
It's a short VOB, 300+ frames. It shows instantly in DebugView.
It's simply unusable for me. But if it works for you...
Nic
30th August 2002, 08:14
Im sorry you had no luck with neuron2 :( Ill try to make it more stable (classically every file I try it on it works almost perfect with :( )
Ive added a different method of getting the number of frames & decss for encrypted vobs....
& now ill work on those points you mentioned,
Cheers,
-Nic
ps
Ill get there in the end...i hope....:rolleyes:
Nic
30th August 2002, 11:58
Ok, version 1.3
http://nic.dnsalias.com/MPEGDecoder.zip
(please read documentaion carefully)
This version has support for frame estimation via DirectShow...
you use the parameter -2 in the frames field.
i.e.
MPEGSource("d:\a.mpg", -2)
This then relies on the splitter to give accurate information...which is probably more accurate than mine. (also, if it overestimates, it will no longer crash the decoder ;) )
It also has DeCSS support so DVDs can be read directly...
also has preliminary MPEG-1 support...
Cheers,
-Nic
ps
if anyone has any little clips that cause failure or transport clips they cant get to work, then please just send them to:
nic <at> nic.dnsalias.com
or PM if they are too big. Thanks.
Guest
30th August 2002, 16:01
@Nic
Thank you for the reply. I will post an URL this evening for a problematic small VOB.
GZZ
30th August 2002, 20:37
The new version are really getting better. The -2 works great. No more wrong timecodes and its FAST. :)
But I have problems with Stremlist.lst files.
My streamlist looks like this:
E:\DVDfilm\Harry Potter\VTS_01_1.vob
E:\DVDfilm\Harry Potter\VTS_01_2.vob
E:\DVDfilm\Harry Potter\VTS_01_3.vob
E:\DVDfilm\Harry Potter\VTS_01_4.vob
E:\DVDfilm\Harry Potter\VTS_01_5.vob
E:\DVDfilm\Harry Potter\VTS_01_6.vob
E:\DVDfilm\Harry Potter\VTS_01_7.vob
E:\DVDfilm\Harry Potter\VTS_01_8.vob
and the AVS script is like this (just for testing):
LoadPlugin("E:\DVDfilm\Harry Potter\MPEGDecoder.dll")
MPEGSource("E:\DVDfilm\Harry Potter\Streamlist.lst", -2)
When I load the AVS in Media player I get a AVS script error in line 2. Which is the streamlist. But I have tested each 'link' in the Streamlist.lst file and they work. So I see this as a bug, please confirm this.
Thanks.
GZZ
Nic
30th August 2002, 21:26
Sounds like a bug to me...Ill fix it ASAP, thanks for testing & reporting back ! :)
Cheers,
-Nic
GZZ
30th August 2002, 21:32
Got another error.
If you rip a DVD with Vstrip and it makes 1024 mb files. But not all the DVDs files are 1024 mb, but the first 3 files are 1024 mb and then you get a file which is only 400 mb and then 3 files which i 1024 mb.
When you then use Vstrip on this it mux all the files and splits them in 1024 mb files. The problem comes when you try to load the files which was 400 mb, but is now 1024 mb, because it have been muxed into Mpegdecoder with the parameter '-2'. Then it says Avisynth have an error in line X (the line where you load the vob file).
But If I use Smartripper which keeps the files like on the DVD, it works fine. Don't know if this is something you can fix.
Thanks
GZZ
Nic
30th August 2002, 21:39
Thanks again :) I need to clear some space on my HD so I can try DVDs...
-Nic
benf2
30th August 2002, 23:33
trying to load vob files and i am terrible writing avs files.
I just want the basic(no filters) so i can load it into link2 then cce.
I tried this but it doesnt load into link2. any help would be great!!
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\AVISynth_Spatial.dll")
MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_1.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_2.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_3.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_4.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_5.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_6.VOB")
Blight
30th August 2002, 23:52
Quality?
You always see comparisons between PowerDVD/WinDVD/CineMaster.
I think these decoders may be using some post-processing to "improve" visible quality. Not quite sure there. But still, it would be nice to have this filter ported into 3 direct show filters (splitter/audio decoder/video decoder). With CSS support, this could become a fully fledged DVD decoder filter (at which point, I advise nic to "duck and cover" from the wrath of the DVD Consortium).
Guest
31st August 2002, 00:21
@Nic
I've moved over here from the other thread. :)
OK, it's clear that you are not honoring the repeat_field flag in the MPEG2 syntax. These are used to do 3:2 pulldown during display. I have proved it by decoding a 3:2 pulldown VOB and seeing this: 1) The count of frames is correct but the number of displayed frames is 4/5 of that (thanks, trbarry!). 2) When using DVD2AVI with Forced Film off, I can see the interlaced frames created by pulldown; when I use MPEGDecoder the interlaced frames are not seen. Your decoder acts as if it is DVD2AVI with Forced Film on all the time.
Would it be possible to properly handle the MPEG2 flags so that 3:2 pulldown material is decoded properly? IIRC, there is a flag to say repeat a field, and a flag to say which of the two fields to repeat. I suggest that you have an option equivalent to Forced Film in DVD2AVI.
If you still want a VOB, please let me know.
Nic
31st August 2002, 09:35
@neuron2:
Thanks alot, Id never noticed it! (dont know how I missed it)...If you could give me that 300 frame vob that would be great (then Ill be able to see exactly what you've seen). Im going to have to go read up on 3:2 pulldown now...
(thanks again for your help in this)
@benf2: you cant have more than one instance of MPEGSource (as it says in the documentation). What you need to do is have:
MPEGSource("d:\vts_01_01.vob+d:\vts_01_02.vob+d:\vts_01_03.vob)
(etc)
@blight:
Yup it should be cool :)
Cheers,
-Nic
Blight
31st August 2002, 10:21
Actually, you do want force-film on most content. But you need to account for frame counts when you ignore the rff flags.
Guest
31st August 2002, 12:51
@Blight
Isn't it more than that? For example, I work with MPEG2 decoders in DirecTV boxes and the video drivers that work with them. For a 3:2 stream, the stream does not contain the extra fields, just flags that say when to repeat some fields. That means a software decoder has to actually create the new fields and properly assemble frames. This is much more than simply adjusting a frame count. Am I off-base?
EDIT: OK. I get your point now. We're both right. In Forced Film mode, the flags are ignored and the frame counting must take that into account. In non-Forced Film mode, the correct fields/frames have to be created in accordance with the flags.
My web site server is refusing my password so until that is straightened out I cannot upload the VOB. Maybe manono would allow me to use his server? :)
Nic
31st August 2002, 14:08
Thanks for the insight you two :)
@neuron2:
Have you checked out Swedes post in mod chat? Might help with uploading?
-Nic
GZZ
31st August 2002, 14:13
Don't know if this has something to do with the decoder you use to estimate the time of the selected vobfiles. I tryed it on Starwars EP1 R2 DVD and it reported the movie to be 02:28:20. But if I use Vstrip on the ifo file, it says the movie is 02:10:43 long. So it still estimates the time wrong.
I use the -2 parameter in my AVS script. 0 and -1 gives me timecodes which are way of like. 26:44:53 and so on.
I hope you can fix this.
Thanks
GZZ
Guest
31st August 2002, 15:01
@Nic
The VOB (originally from manono) is here (right click and Save As):
http://shelob.mordor.net/dgraft/bitch.vob
Sorry about the filename, but this was the first torture file for Decomb, and believe me, it was a bitch! :)
benf2
31st August 2002, 22:11
Thanks Nic....will give it a try again
dattrax
1st September 2002, 09:11
Hi,
Just as a totally stupid idea, can't you skip to the end of the movie and get the last PTS for the last frame. This will tell you the maximum amount of frames you will need.
As rff flags can be altered dynamically during the cause of the film, the only way you could count the exact number would be to scan over the mpeg headers (which wouldn't be exactly fast). My experience with this plugin is that it has underestimated and chopped off some of the video, if it overestimated then at least we could all add a Trim() to the end of the filter chain.
Jim
benf2
1st September 2002, 14:44
I tried the changes u mention Nic, but no luck so i tried importing the m2v file created with smartripper.
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\AVISynth_Spatial.dll")
MPEGSOURCE("C:\Documents and Settings\Administrator\Desktop\the rookie\vts_01_([0xE0]_Video_NTSC_720x480)_1.m2v")
It loads into link2 ok, but shows 0 for nrFrames and 0 on timelength, now what am i doing wrong? Any anyother suggs. why it still wont load the vobs?
Koepi
1st September 2002, 16:04
for d2v you need another dll (mpeg2dec.dll), I don't think has added support for that (or has he and I just didn't notice?).
Btw, your syntax is wrong, you should READ the documentation that ships with the dll:
MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_1.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_2.VOB")+MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_3.VOB")+...
is wrong.
MPEGSource("C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_1.VOB" + "C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_2.VOB" + "C:\Documents and Settings\Administrator\Desktop\we\video_ts\VTS_04_3.VOB" + ...)
is correct.
The spaces around the + are important.
Regards,
Koepi
int 21h
1st September 2002, 16:37
He's importing m2v not d2v. The latter isn't supported afaik, but the former is. (or is supposed to be)
Koepi
1st September 2002, 16:47
sorry, my bad, I read it wrong.
still his syntac is wrong in the abovementioned case.
Nic
1st September 2002, 23:26
@ben:
Weird places to keep your files :) try putting them in a less complex directory structure & try loading the avs file into Windows Media Player & tell me what execption (if any?) is thrown...
-Nic
Koepi
2nd September 2002, 04:46
Hm, it seems I fell over another bug again:
I was trying to 2pass encode the matrix.
Scaled down the curve correctly, etc.
But on second pass, the pictures weren't the same as in the first pass (you can easily tell when first pass quant 2 was 16kb and now the frame at quant 2 has only 4kb :-/ )
That gave me a strange quantizer distribution... ;)
I don't know why this happens, and I don't know how to solve such a problem. Sorry!
Best regards,
and thanks for all your work!
Koepi
trbarry
2nd September 2002, 19:12
Hi Nic -
This morning I received the following PM from junooni, over on the AVS forum:
Nic's mpegdecoder plugin for avisynth.
Have you tried Nic's with a transport stream?
Sorry i had never posted on doom9 so never registered now that i have to it won't let me post a message for at-least five days (long time i thought) anyway. I tired his homepage but there is no email or anything to contact him. If you can answer this or post a reply on his thread at doom9 about this i would appreciate it.
According to him it supports Transport files directly but i tested it with several different files with differe video pids (different stations) none work. I get an access violation in VDub.
avisynth ver 2.05 and mpegdecoder ver 1.03 (both latest i think)
Script:
LoadPlugin("C:\avisynth\MPEGDecoder.dll")
MPEGSource("C:\temp\ItsAllhere.trp", -1, "0x0011")
I tried all the seek methods: -1, 0, and mannually giving number of frames.
Error:
"Error fetching frame 0: Avisynth read error: Avisynth: caught an access violation at 0x015b206f, attempting to read from 0x0000"
any help is appreciated.
I haven't tried MPEGdecoder with ATSC streams, but am going to go check it out now. Are they supported? Any known gotchas I should watch for? And should he also be specifying an audio PID? Usually it is 0x11 & 0x14. (video & audio, respectively)
- Tom
Nic
2nd September 2002, 22:58
Hi Tom,
It should work fine, the only transport streams ive used it with are hardware created (video: 0x1023 mp2 audio: 0x1022). A guy on this forum had some sort of film capturing device and the output from them was on 0x810 (that worked fine too)
Could I get a mini clip from him? I could test it out & hopefully fix it if theres bugs in the ts demux code...
(ive delayed the development of mpegdecoder just for a bit as im working on a mpeg1/2 encoder with koepi... infact I might ask for some advice on some assembly coding :D
(its just porting code from a linux project, but its getting....overly complex :) )
Theres definitely a bug in MPEGDecoder.dll right now when it goes to run from frame 0 again, as well as the errors it makes when estimating the number of frames...I will look at them soon. :)
Cheers,
-Nic
ps
Wow! this is quite a conherent post considering the amount of alochol ive just consumed :)
trbarry
3rd September 2002, 05:22
Nic -
If you have a userid on AVS you can PM junooni there (tomorrow when the blood alchohol drains a bit). Or if you want I can pass on one of your email addresses but I don't think he can PM you on this forum yet.
I used to think I got some of my best ideas when drinking. But anymore it just makes me tired and grumpy at the time and sick the next day. And I've never really been very good at it. :(
Let me know if there is something particularly assembler that you need help on, though I'm sort of thinking about attacking that H26L thingy.
Coffee is your friend. ;)
- Tom
Nic
3rd September 2002, 09:07
@trbarry: Drinking is not good for me either :)
if he gets the latest version of my decoder (normal link) my email address is at the very bottom of the help document (which is just nic <at> nic.dnsalias.com )
Ive been trying to expand my knowledge of mmx/sse, so I might try that h.26l 4x4 transform thing too (although I feel what would take you an hour, might well take me the whole week & then some :) )
have you ever come across some of the more peculiar syntax's of coding assembler (ive only ever used masm/tasm/vc inline), but these linux ones are kind of peculiar. e.g.
__asm__ ( "movl %0, %%eax\n"
"movd %%eax, %%mm6\n"
: :"g" (1) : "eax" );
?! is that just a mov eax, 1 then a movd mm6, eax ??
but ill PM with you with more I think,
Thanks,
-Nic
trbarry
3rd September 2002, 14:49
Nic -
Sorry. While occasionlly M$ annoys me enough that I resolve to switch, I still don't speak Linux. ;)
So I really have no idea what all that means, or even which assembler is being used. The big uncertainty is if the % signs are macro or preprocessor related. I do know that some assemblers put the l or d on the opcode instead of the operand to specify the operand types.
- Tom
benf2
6th September 2002, 16:11
i used it and loaded 6 vobs from a movie...link2 recognized it but the time shows 9+hours instead of appx 2hrs.
It was just the basic script....load plugin and mpgesourc....no filters or any other stuff...any ideas....i am getting closer;)
Koepi
6th September 2002, 16:19
read the posts about the frame counting again please :) it#s all already explained :)
(btw., trim (0, <endframe>) ist your friend here! :) )
Regards,
Koepi
benf2
6th September 2002, 16:30
thanks:)
Nic
6th September 2002, 16:50
Read the docs carefully....& hopefully it will do the best it can at present.
There are bugs in it that need to be addressed, ill get some time in about a week (I think :) )
Cheers,
-Nic
ps
I thought this monstrous thread was finally going to fall off the first page today...lol no luck.
benf2
6th September 2002, 17:55
I know i read it somewhere on one of the threads, but the search function is not specific enough(or its the way i asked). I ask, no i beg for the line of script i use so no audio is served. I just want the video from the vobs...i will use the audio file i got from smartripper later when i author it.
Everything i find on audio is changing it, not stopping it entirely.
This is possible right? I would think it would speed things up like when i used mpeg2dec2...i just did the video.
Here is the script i am working with...it loads into link2..still cant get the time to be correct...tried the trim as listed but link2 didnt like it.
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\AVISynth_Spatial.dll")
MPEGSource("C:\Documents and Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_1.VOB + C:\Documents and
Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_1.VOB + C:\Documents and
Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_2.VOB + C:\Documents and
Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_3.VOB + C:\Documents and
Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_4.VOB + C:\Documents and
Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_5.VOB + C:\Documents and
Settings\Administrator\Desktop\the rookie\video_ts\VTS_01_6.VOB")
unplugged
7th September 2002, 14:38
Originally posted by trbarry
So I really have no idea what all that means, or even which assembler is being used. The big uncertainty is if the % signs are macro or preprocessor related. I do know that some assemblers put the l or d on the opcode instead of the operand to specify the operand types.
I think this kind of syntax is used because GNU gcc is made to compile for different target CPUs, certainly on the other side it's the most flexible compiler!
However for who is interested to use gcc there is a simple switch to support Intel syntax like NASM/TASM/MSASM instead (and without tons of symbols $,%%... :)).
Taken from gcc (as) doc:
AT&T Syntax versus Intel Syntax
as now supports assembly using Intel assembler syntax. .intel_syntax selects Intel mode, and .att_syntax switches back to the usual AT&T mode for compatibility with the output of gcc. Either of these directives may have an optional argument, prefix, or noprefix specifying whether registers require a % prefix. AT&T System V/386 assembler syntax is quite different from Intel syntax. We mention these differences because almost all 80386 documents use Intel syntax. Notable differences between the two syntaxes are:
* AT&T immediate operands are preceded by $; Intel immediate operands are undelimited (Intel push 4 is AT&T pushl $4). AT&T register operands are preceded by %; Intel register operands are undelimited. AT&T absolute (as opposed to PC relative) jump/call operands are prefixed by *; they are undelimited in Intel syntax.
* AT&T and Intel syntax use the opposite order for source and destination operands. Intel add eax, 4 is addl $4, %eax. The source, dest convention is maintained for compatibility with previous Unix assemblers. Note that instructions with more than one source operand, such as the enter instruction, do not have reversed order. i386-Bugs.
* In AT&T syntax the size of memory operands is determined from the last character of the instruction mnemonic. Mnemonic suffixes of b, w, l and q specify byte (8-bit), word (16-bit), long (32-bit) and quadruple word (64-bit) memory references. Intel syntax accomplishes this by prefixing memory operands (not the instruction mnemonics) with byte ptr, word ptr, dword ptr and qword ptr. Thus, Intel mov al, byte ptr foo is movb foo, %al in AT&T syntax.
* Immediate form long jumps and calls are lcall/ljmp $section, $offset in AT&T syntax; the Intel syntax is call/jmp far section: offset. Also, the far return instruction is lret $stack-adjust in AT&T syntax; Intel syntax is ret far stack-adjust.
* The AT&T assembler does not provide support for multiple section programs. Unix style systems expect all programs to be single sections.
This AT&T syntax is very difficult and cryptic, those Spock-like Linux programmers are really mad with their deep script-like methodical... :D
About syntax, this maybe one of the reasons because some source packages for gcc win32 (MinGW) need Netwide Assembler (NASM) to compile asm files :). (for ex. MAME emulator)
WarpEnterprises
7th September 2002, 22:29
Where can I download the latest version?
The link in the thread (http://nic.dnsalias.com/MPEGDecoder.zip) is dead. Or is it only a temporary effect?
Guest
7th September 2002, 22:31
Nic,
Any determiniation on the RFF/TFF support issue? Thank you.
matrix
8th September 2002, 15:59
@ benf2
I ask, no i beg for the line of script i use so no audio is served. I just want the video from the vobs...
Wouldn't KillAudio() do it?
benf2
8th September 2002, 17:03
thanks for the reply...will tryit!!
i tried a google search for avs syntax and didnt find alot of info...
Is there a site(webpage) that has most of the syntax for most options listed so all I (we) would have to do is plug in our info?
primitive
8th September 2002, 17:35
nic.dnsalias.com is down for me. Anyone have a mirror of v1.3?
-p
Swede
8th September 2002, 20:09
nic.dnsalias.com is down for me. Anyone have a mirror of v1.3? Sorry for this, my provider had trouble. But it's online again.
jdobbs
9th September 2002, 00:10
I'd like to add my request to neuron2 -- RFF/TFF support would really be appreciated.
Thanks,
jdobbs
REIGN_
10th September 2002, 12:44
First time using MPEGDECODER and i had a problem. In vdub it shows the wrong time (2:51:02) but with the d2v file it is correct (2:51:03) The 1 second is not so big but i have a problem with the sound.
Tomatschek
12th September 2002, 08:20
hi Nic, hi mpegdecoder-user,
============================
First I want to say: very good
work. I wait a long time for
a deccs encoder usable in vdub.
I don't like to copy my DVD
material to HD because my
converting is realtinme (22-37fps)
so it does not stress the hardware
more than normal playback would do.
But I've a little problem. When I
use Ver.1.3 and vobs from HD-every-
thing is o.k. But when I use the
follow command (from your helpfile)...
<<<<<<<<<<<Encrypted Vobs>>>>>>>>>>
You can now read encrypted vobs straight from the DVD using the "decss" command in the transport
PID parameter.
e.g.
MPEGSource("g:\video_ts\VTS_02_01.vob", -2, "decss")
>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<
...I reseive the aviscript error:
"decss" is not a known command (or simmilar)
Is this a bug, or is it possible that I have the
helpfile V.1.3 but the mpegdecoder V.1.0 (timestamp
30.Aug.2002)?????
please help me - i think your proggi will
have a great future!!!
thanx
Thomas
(sorry for the bad english - I'm an alien in germany {;-))
Nic
12th September 2002, 09:24
Hmm how odd, maybe I did upload the wrong version....
try using just "dec" instead.
Hope it works out...Im doing too much at present so im going to have to give up some of the things ive been working on (XviD, MPEG2Enc, DVD2AVI a la Nic ;) , MPEGDecoder, etc) So im taking a little timeout. But ill finish it soon :)
(hmmm, my version of DVD2AVI can rip straight from the DVD alot easier :) (although without ifo parsing :( )
Cheers,
-Nic
ookzDVD
12th September 2002, 10:35
@Nic,
I just try to use the .lst file :
MPEGSource("c:\Film.lst")
which contains all the .vob files per line.
but it doesn't work. :(
Tomatschek
12th September 2002, 10:57
Hi nic,
=======
thanx for fast reply. I understand you
and respect that you would like to do
a little break. I only would like to know
if the error will be a result of a wrong
version - please could you upload the right
one. You wrote that you finished 1.3 so you
would not have much to do.
thanx (again)
Thomas
one stupid threat i red in an overclocker forum:
"i could'nt test my system for stability because
it crashes before"
Nic
12th September 2002, 12:15
Hmmm...Try this version 1.31:
http://nic.dnsalias.com/MPEGDecoder.zip
.lst should work now...so should "decss".
Cheers,
-Nic
Tomatschek
12th September 2002, 12:30
hi nic,
thanx for the new link + version,
will try it today evening. Now I
have to experiment a little with
the string 0x0ID's to get the main-
movie. I'll post you my results,
I hope this is o.k. for you?
Thomas
an user says about a stable software
- wow very stable
a developer says about the same software
- what it is stable?-so it has not enougth features yet!
Defiler
12th September 2002, 16:28
If I want this input plugin to give me audio as well, do I need to know the exact stream ids? If so, is there a good tool for enumerating the stream ids in an MPEG-1 or MPEG-2 file? (Not a VOB.)
Nic
12th September 2002, 16:36
This plugin is just for MPEG video! :)
I may try & write a AC3Source AviSynth filter, but apart from that, it will never support full MPEG audio...
-Nic
Suzahara
12th September 2002, 16:55
@Defiler
TMPGEnc can give you stream IDs in its MPEG tools. But as Nic says, this tools doesn't support MPEG audio. But you could always demux it with TMPGEnc and use it other ways.
Defiler
12th September 2002, 18:46
Thanks. That was my first impression, but some of the replies in the thread turned my head. Heh.
I was hoping it could do both video and audio.. I'm always happy to condense more of my toolset into Avisynth. No big deal, though.
Guest
12th September 2002, 19:03
@jdobbs
It appears we don't deserve the courtesy of a response from the author. :(
Stabmaster-Arson
12th September 2002, 23:13
NTFS for win9x will let you use NTFS partitions on win98/ME. So if you want to chekc it out goto www.sysinternals.com , they have a free read only version, or registered full read/write version.
Then your files can have any size.
As for avi file limit, all I know is ive captured avi files 30-40 gigs with no problem.
Nic
13th September 2002, 00:43
It appears we don't deserve the courtesy of a response from the author.
Now what inspires you to say that? Why write that particular statement in such a way?
Of course you deserve the courtesy of an answer, but looking thru this thread now I see:
"Any determiniation on the RFF/TFF support issue? Thank you."
Sorry Donald, I honestly had not seen that post, If I had I would have answered immediately (as I always do, when I can, no matter the question)
The Answer is: Unfortunatly not, As I fear the way I am extracted the frames is at fault, or I have simply made an incorrect setting, but unfortunatly due to work commitments & everything else I havent had time to debug it yet fully. :( Thank you very much for your vob (quite an interesting section of Anime :) ) that displays this problem very cleary.
All I had time to do today was re-add .lst support & remove a seeking bug during my lunch break. I hope to get chance to look into the problem more thoroughly this weekend.
Im sorry I did not answer your question, Id seen jdobbs' post & believed he was just giving his support & desire for the issue to be fixed. But to write: "It appears we don't deserve the courtesy of a response from the author.", I find quite rude & I cant imagine myself ever writing such a thing, just because it appeared my question had been ignored...
But to summarise: I Apologise for not replying, I honestly didn't see your post, thank you for your support & the problem will be resolved as quickly as I can.
Anyway I hope this misunderstanding can be put behind us,
-Nic
Guest
13th September 2002, 04:32
Sorry didn't mean to be rude. It was just that you were quickly answering other people's posts and I had taken a good deal of time to diagnose the problem and jdobbs echoed my question and still you didn't respond. It's all right, don't worry about it. I can get by with DVD2AVI/mpeg2dec.
Tomatschek
13th September 2002, 08:39
hi nic...
like I promised I tested your 1.31
and the "deccs" option. But no,luck.
1.30 +1.31 "decss"
1.30 +1.31 "dec"
Always the error accure: invalid command.
But I'm not worry because I tested the
mpegdecoder.dll with my files from HD.
(of course without "decss" - smartripper
did it before). I have now a +22% speed
improvement over mpeg2dec2.dll. Now I use
the saved time to copy the material to disc.
=;-)
Thomas
Nic
13th September 2002, 09:06
@Tomatschek:
Thats really weird? Works fine here...I cant think what the problem would be. Hmmm, could your post your avs file that you tried?
@neuron2:
Sorry if it seemed I had ignored your help & I thank you for your time spent diagnosing the problem.
-Nic
benf2
13th September 2002, 11:01
Well i finally got it to show correctly in link2, but when i hit encode in cce i get unable to open source...is this a link2 problem?
script is very basic:
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
MPEGSource("C:\Documents and Settings\Administrator\Desktop\count of monte cristo\vts_01_([0xE0]_Video_NTSC_720x480)_1.m2v",-2)
If i want to kill the audio with the (killaudio) command do i need to put a zero in brackets(killaudio(0)? or just put kill audio?
Tomatschek
13th September 2002, 11:03
hi nic...
first I would like to say somthing. You wrote in the past
that the "decss" option works like your opendvdplugin.dll
for dvd2avi. I opened my movie (Heat 164min, 7,7Gb) with
this plugin and i seames to be crypted. Green macroblock
everywhere. (But I initialised the movie with WinDVD4 before)
Is there a problem what could also influence the "deccs"
option and cause the error?
now my script...
LoadPlugIn("C:\xxx\xxx\mpegdecoder.dll")
Mpegsource("F:\xxx\video_ts\vts_01_1.vob", -2, "decss")
Crop(0,74,720,408) (german PAL)
BicibicResize(640,272)
...the error "unknown command/argument mpegsource line 2" accure
In other tests i reseive another strange error.
When i change the line above to the following line...
Mpegsource("F:\xxx\video_ts\vts_01_1.vob", "decss")
...then the message "you may not use the command "crop" for
upscaling or stretching the video crop line3"
this sounds spanish for me...
hope somebody hase an idea
bye
Thomas
Wilbert
13th September 2002, 11:18
@benf2,
If i want to kill the audio with the (killaudio) command do i need to put a zero in brackets(killaudio(0)? or just put kill
Just put killaudio. But I thought that MPEGDecoder has no audio support yet, so it doesn't pass the audio.
benf2
13th September 2002, 11:29
That answers the audio question, anybody no why cce says source not found when i hit enocode...could it be a link2 problem?
ookzDVD
13th September 2002, 13:08
@Nic,
Thank you for the update,
now the .lst is working ;)
_but_ I still having trouble, when I try to encode the short
trailer, both with .vob and .lst, the AviSynth seems never stop
to finish. :( and I have to _abort_ to finish it. :(
benf2
13th September 2002, 22:52
Nic said he had success using this dll with link2. Is there something special for this combo to work? I posted my very basic script and i can now get link2 to show correct info and wrap the file, and cce lets me import it, but when i try to encode it i get unable to open source. I tried both m2v files and vob... Has anyone besides Nic gotten it to work? IF so, do u see anything in the script i missed that would cause cce to say unable to open source? :mad:
Again, this is the script:
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
MPEGSource("C:\Documents and Settings\Administrator\Desktop\count of monte cristo\vts_01_([0xE0]_Video_NTSC_720x480)_1.m2v",-2)
:confused: :confused: :confused: :confused: :confused: :confused:
benf2
18th September 2002, 11:22
Is there nobody out there thats is using this dll with link2?
No matter what i do, CCE says cant open source when i try to load the link2 wraper made using the mpegdecoder.dll. I am using the latest version of the dll. It's not like i have a lot of items in the script.
Any ideas? Anybody??
Nic
18th September 2002, 11:30
@ben:
Ben try helping yourself out here. Try lots of different things as I suggested & report back.
i.e.
1) Does the AVS file load ok in VirtualDub. Try playing with it in VDub to make sure it plays, seeks etc without error
2) Get a copy of DebugView. (sysinternals.com) run that at the same time & give me the messages/errors that come out of it
3) remove all other filters other than my source filter before trying
etc. etc.
4) Tell me what your source is. Is it multiple files
5) Post your EXACT avs script.
6) Do not use really long filenames/directories.
7) Tell me what the source is. Is it DVD vob files? Is it multiple files or just one file.
Link2 has worked fine when Ive tried & Ive tried it quite a bit. So something else is causing the problem. Quite probably MPEGDecoder.dll is just causing an error (have you downloaded the latest version (I think 1.31). Ill look into it more later.
(Im redoing my website & the source code to everything ive ever done will be up there so maybe that will encourage others to help out too)
Cheers,
-Nic
benf2
18th September 2002, 11:51
Thanks Nic for the quick reply...Yes i am using the latest dll.
Script is very basic...no filters!!
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
MPEGSource("C:\Documents and Settings\Administrator\Desktop\count of monte cristo\vts_01_([0xE0]_Video_NTSC_720x480)_1.m2v",-2)
I have also tried moving the dll and the video to C:\ to cut down on the path length, but still same result... I did resolve the wrong time and frame length issue by using the -2. But now i get the stubborn unable to open source in cce.... It loads into cce ok...can make my changes, but when try to start the ecoding proc..it says unable to open source. I aslo tried doing one vob file...same result. I tried reinstalling link2, but prob is still there....I still think it might be a link2 issue, but not sure...u say urs works ok.
benf2
18th September 2002, 12:05
For the hell of it i loaded a movie the old way using mpeg2dec and wrapped using link2 and cce produced same error, but when i used a d2v...and vfapi wrapper into cce it worked.
SILICON
20th September 2002, 12:44
I silly idea fo NIC:
I know very little abour MPEG2DEC. But I know that the imagen is codec in macroblocks.
Often we decoded the MPEG2 and after crop the frame. (i.e the black borders in 2.35:1 aspectratio)
If send the crop values to mpegdecoder, then the mpegdecoder don't need decode the blocks in the crop parts. If less decodec block them less procees time need. ŋok?
I sugess that test the macroblock place before decode it. If the position is out of the visible window (plus the highest estimation motion vectors) then donīt decode it and send a black frame.
ŋIs this a stupid idea?
Note: Sorry by my bad english.
int 21h
20th September 2002, 13:11
Originally posted by benf2
Thanks Nic for the quick reply...Yes i am using the latest dll.
Script is very basic...no filters!!
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\avs gen\bin\MPEGDecoder.dll")
MPEGSource("C:\Documents and Settings\Administrator\Desktop\count of monte cristo\vts_01_([0xE0]_Video_NTSC_720x480)_1.m2v",-2)
I have also tried moving the dll and the video to C:\ to cut down on the path length, but still same result... I did resolve the wrong time and frame length issue by using the -2. But now i get the stubborn unable to open source in cce.... It loads into cce ok...can make my changes, but when try to start the ecoding proc..it says unable to open source. I aslo tried doing one vob file...same result. I tried reinstalling link2, but prob is still there....I still think it might be a link2 issue, but not sure...u say urs works ok.
I think you forgot the Resample Audio line.
benf2
20th September 2002, 13:40
Somebody else sent me a reply stating this dll doesnt support audio.
Does it? I dont know since i cant get it to work :(
Actually, the m2v file is video only, but the vob i tried was a combo(video/audio)... but nothing. I actually just want to pass video along to CCE and mux the audio in Maestro later.
I have to believe that the problem is with Link2, cause i see on videotools.net forum others have had similar problem and not using this dll. Unfortunately i cant get a reply back from Edwin who designed link2.
The reason i believe its link2 is that if i use the old method of mpg2dec it still wont work with link2, but if i do mpg2dec with vfapi it works fine. The only thing different is the link2. So, now i am reinstalling the OS and will try again tonight. Oh yeah, i did the obvious by cking to make sure the wrapper codec was installed and it was. Maybe link2 doesnt like win2k, but i tried using the compatibiliaty mode of nt and win98 and still no luck. I will see how win2k server does...i had win2k prof. before.
sh0dan
20th September 2002, 15:29
You can add audio like this:
LoadPlugin("MPEGDecoder.dll")
MPEGSource("*.m2v",-2)
bc=BlankClip()
audiodub(bc)
resampleaudio(44100)
vidiot
20th September 2002, 15:37
@ benf:
I think int 21h mean you should add the "resample audio" line to
your script.
CCE sometimes need that (especially on older athlons/durons).;)
benf2
20th September 2002, 16:15
Not sure why i would need to add resample audio if the stream is a m2v file(which is video only). And if i was doing a vob file i was told i could add killaudio, is this correct? Is there any special syntax for killaudio(on a line by itself?)?
Are any of you using link2?
int 21h
20th September 2002, 16:22
Yea in CCE 2.5 you definitely need resampleaudio(44100), even if you dont have any audio in the file, you still have to put that.
Just add that to the last line in your avs and try it.
sh0dan
20th September 2002, 16:23
killaudio() on a line for itself:
killaudio()
Sorry - couldn't resist! :sly:
Anyway - you have to use audio at 44100hz for CCE 2.50 to work (or at least I have).
benf2
20th September 2002, 16:28
why do i need the empty brackets after killaudio?
ps i am frameserving to 2.64cce
MaTTeR
20th September 2002, 16:30
AFAIK the empty brackets are needed or you will see a speed decrease during the encode. Try it with or without and you'll see;)
sh0dan
20th September 2002, 16:45
I think the bracething is just a rumor - I always use them anyway.
Belgabor
20th September 2002, 21:39
Originally posted by sh0dan
I think the bracething is just a rumor - I always use them anyway.
Iirc neuron2 broght this up and i trust him enough to think it isn't a rumor (or at least wasn't at that time). Perhaps someone of the core developers should have a look at this issue?
Cheers
Belgabor
MaTTeR
20th September 2002, 21:53
hrm..I thought I even remember reading about the () in documentation. No?
Acaila
20th September 2002, 22:24
That's because it's in Decomb's documentation :)
mmgrover
20th September 2002, 22:44
Where can one get the Source Code?
mike
bugs7
21st September 2002, 00:23
I try MPEGDecoder.
It's crash or i had this avisynth message "avisynth caught acces violation at 0x0102245f".
I try with:
- avisynth 2.04 and 2.05
- MPEGDecoder 1.3 and 1.31
my simple script:
Loadplugin("D:\avsPlug\MPEGDecoder1.3\MPEGDecoder.dll")
Loadplugin("D:\avsPlug\SimpleResize.dll")
MPEGSource("F:\TS2\VTS_04_PGC_01_1.M2V",-2)
and i'try too:
- MPEGSource("F:\TS2\VTS_04_PGC_01_1.M2V",300) (only the first 300 frame for test)
- MPEGSource("F:\TS2\VTS_04_PGC_01_1.M2V",0)
- MPEGSource("F:\TS2\VTS_04_PGC_01_1.M2V")
Nothing work :(
UGAthecat
21st September 2002, 01:27
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.
bugs7
21st September 2002, 10:01
Originally posted by UGAthecat
..
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 have athlon TB 1.4Hhz, with no SEE too.
other infos: w2k sp3
Nic
21st September 2002, 13:01
I have a feeling this is caused by my weird optimisations in the Intel Compiler....hmmm. Ill look into it on Monday :)
Cheers,
-Nic
gizmau
21st September 2002, 13:50
@nic
very nice work! mpegdecoder IS fast, giving up to 20% more speed. :-)
unfortunatelly, the increase is partly a result of using 'only' 32bit-idct and therefore getting a drop in quality. i would like to get ieee-1180 as well, even if the quality improvements are only very seldom to see. on dvd there is enough room to fill up, so why not use it for maximum theoretical quality?
would you implement a idct-selection, please?
next is the inacuracy in frame parsing. there are allways problems when trying to encode over the 'dvd2avi-reported-frames'-boundary with cc, tmpg or vd. as a workaround i simply set the encoding range by hand. simple but effective.
it would be nice to use a .d2v as input-argument, because the framecount seems to work quiet good for years. and there would be no need to edit the path of the vobs in the .avs anymore, too. what do you think about?
Nic
21st September 2002, 15:54
You think you can notice a difference between Peter's iDCT & the reference? Id be very surprised if thats the case, I can put in reference DCT quality too if you want, but I think you'd be wasting your time.
I know, I was hoping not to have to put in d2v parsing in, but I will do :)
(got to get round the tff/rff problems first though)
-Nic
ps
& the speed increase isn't due to the iDCT as it uses the same iDCT as most people use with DVD2AVI
benf2
21st September 2002, 15:59
Hi,
you mention earlier u tested with success...mpegdecoder.dll with link2. What os are u running. I just reformatted my win2k prof and installed a fresh copy of win2k server and still get error in cce unable to open source. I have been waiting a week for Edwin..(videotools.net) to reply..but nothing. What is another option besides link2 to server to cce 2.64?
Thanks
Ben
gizmau
21st September 2002, 16:32
sure, i can - everybody can, even easily, see the difference! its just a matter of material used...
in many films are scenes with a plain background (i.e. a roomwall) with a very slight colorprocess as brown to a lighter/darker brown.
on 'bad and/or cheap produced or encoed film' (as i call them) is allways such a scene, where the 'dither- levels' are visible as barks with noisy overlapping (sorry for the bad description!). with 32bit this noise is more visible than with 1180. 'the pledge' is a good example for this, when i remember right. i will make a screenshot of the next film with this behaviour, when i not forget it.
thanks in advance for implementing the features!
MaTTeR
21st September 2002, 16:41
@gizmau
I've never been able to see the difference between 32 & 64bit iDCT, well except the speed but nothing visual.
If you could provide a screenshot it would be most helpful to know what your seeing. Maybe a before and after shot? Thx
bugs7
21st September 2002, 17:54
Originally posted by Nic
I have a feeling this is caused by my weird optimisations in the Intel Compiler....hmmm. Ill look into it on Monday :)
Cheers,
-Nic
Thanks ;)
UGAthecat
21st September 2002, 21:00
@nic
I think you may be right about the optimisations, I tried your latest build of xvid on your site (10/9/02) earlier today and it crashes virtualdub when I use it, and if it was made with the same optimisations that would give more proof to your theory.
I switched to an earlier build and that one worked ok, so did 2 recent builds from koepi.
I'll try them both on my Celeron (the PII based version) and see how that goes to give you more info.
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-
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.
Nic
12th January 2003, 22:45
Sorry about the lack of source, id uploaded the file as MPEGDecoder_Src.zip rather than MPEGDecoder_src.zip. Doh! Source is now up, please dont make changes to it and re-release it yet unless you do it through me. There are so many things I want to add (and have just to turn on really) that I dont want different versions to get out of sync...(IMHO there are too many versions of mpeg2decgoing around as it is :) )
(also I put a link to mpegdecoder.zip twice, duh! how dumb am I (I dont want an answer to the BTW ;) )
The seeking seemed to work ok on the files I had. Must have made a dumb mistake somewhere ill fix that now.
Expect alot more to come, ill add post-processing as well.
@kurosu:
Could you send me the d2v file of that (the original one rather than the one MPEGDecoder made). email addr is at the bottom of the help.
Cheers,
-Nic
spyder
12th January 2003, 22:55
Why do I get a "Unrecognized Exception" at the line of my script that opens a D2V file? I know it is the correct path and the files have not been moved. It opens fine if I switch the MPEGSource to an MPEG2Source and use MPEG2DEC3. If I open the VOBs I still get the error but after D2V creation...
If you need more info just ask.
Kurosu
12th January 2003, 23:02
@spyder
My ideas on your problem:
1) Are you sure you got Nic's package from my direct link?
2) If yes, are you using Avisynth 2.5, the only one to support YV12 ? :D
3) If yes, maybe you could try to use trim
Strangely, MPEGDecoder 1.32 under AVS 2.07 produces such an exception, but it's gone if I trim the video)
Nic
12th January 2003, 23:11
@spyder:
Hmmm, the code should work on any mmx PC. What type of CPU do you have. Check that your running the correct version of avisynth for the correct version of MPEGDecoder (the YV12 version will only run on avisynth2.5 and the normal version will only run on AviSynth 1.x & < 2.5
(actually, I dont have version 2.x on my computer, maybe thats the problem...ill check that now also (only checked with 1.05)
Comparing MPEGDecoder 1.32 and 2.0 is not a good idea, because the code is so different, I had MPEGDecoder 2.0 running on a K6-2 400. Hopefully the new links on my web page are working
( http://nic.dnsalias.com )
Cheers,
-Nic
seewen
12th January 2003, 23:15
I've got a litle question :
I don't understand exactly how it's possible that MpedDecoder-YV12 is able to open MPEG-1 througth D2v...
If I try to open this MPEG-1 ( it's in fact a VCD) with DVD2AVI, it freeze... But with MpegDecoder-2.0a, it works very well.
And I find this even stranger, beccause MpegDecoder-1.32 ( for Avisynth 2.0x ) don't use D2v when opening MPEG-1/VCD.
Someone know, in 2 words, where's the trick ?
( btw, MpegDecoder-YV12-2.0 works very well with VCD's. It seems like it opens files faster than 1.32, and it seek faster in Vdub too. )
Nic
12th January 2003, 23:20
MPEG-1 = subset of MPEG-2
of more precisely
MPEG-2 is a superset of MPEG-1
Thats as few words as I could do? ;) I.e. the d2v file is just used for finding the number of frames. the startcodes to signify GOPs etc are the same for both. So I can get the same info.
Also in two words: I rule ;) (just kidding :) )
Cheers,
-Nic
FuPP
12th January 2003, 23:57
I've done a few/quick tests between mpegdecoder (thx Nic !) and mpeg2dec3 :
mpegdecoder command line : mpegsource("F:\tests\vts_01.d2v")
mpeg2dec3 command line : mpeg2source("F:\tests\vts_01.d2v",cpu=0,idct=2)
(MPEG2 ENCODE)
mpegdecoder speed gain : + 12,5 % :)
mpegdecoder compressibility : - 5 % :(
Any ideas / comments ?
Regards,
FuPP
Edit : Oops, just realized that both encodes did not start from the same frame : I'm afraid there's a bug in mpegdecoder -> wrong frame counting. But the good news is that it could explain the compressibility loss !
cult
13th January 2003, 00:15
@Nic
same here.Original film is 154646 frames,while mpegdecoder claims that is 231970 frames(wrong)
seewen
13th January 2003, 00:22
yes exactly the same here. I didn't noticed it at once ( just realized when I saw that the DivX were really to small ;-)
First VCD 67'499 frames : Detected by MpegDecoder=40'579
Second VCD 64'659 frames : Detected by MpegDecoder=48'314.
I tried to specify the number of frame in the AVScript, and to use the "0" parameter ( and of course, try to with none params ;) ).
And it's everytime the same result.
@Nic
Thank for the short explanation ;)
spyder
13th January 2003, 00:29
Originally posted by Kurosu
@spyder
My ideas on your problem:
1) Are you sure you got Nic's package from my direct link?
2) If yes, are you using Avisynth 2.5, the only one to support YV12 ? :D
3) If yes, maybe you could try to use trim
Strangely, MPEGDecoder 1.32 under AVS 2.07 produces such an exception, but it's gone if I trim the video)
1) I got the YV12 version from nic's site. Is there another link?
2) Yes I use AVISynth 2.5 as I also develop a filter for it.
3) I can't try right now because of a rip in progress(I left the loadplugin for this dll...doh)
@Nic: i use an Athlon XP 1700+ I doubt it's a compatibility issue.
Nic
13th January 2003, 11:35
Force film was being dealt with wrong. Please try the new version, the documentation has been changed to include a "ff" function which causes the MPEGDecoder to read the d2v as a forced film one when creating the d2v automatically.
If you have any problems try loading debugview (you can get it from www.sysinternals.com ) and viewing the output to see if any peculiarities occur.
If you have the same frame counting problems, please send me the d2v stating how many frames should be reported and how many frames there actually are.
Cheers,
-Nic
Guest
13th January 2003, 14:53
Here's a little utility I wrote to parse a D2V to determine the number of frames there should be in the output, to associate the D2V flags with the *displayed* frame numbers (not the encoded ones), and to show 3:2 pattern breaks. Usage is "parsed2v filename >parsefile" from a command prompt.
If you run it on a PAL or nonprogressive D2V you'll get lots of pattern breaks! You can ignore them. Maybe I'll enhance the tool if people find it useful.
cult
13th January 2003, 17:03
@nic
no luck,still the same mistake
Nic
13th January 2003, 17:16
@cult: could you send me the d2v file (created by dvd2avi) that shows correctly in mpeg2dec but wrongly in mpegdecoder. could you also send the number of frames supposed to be reported. my email address is at the bottom of the help html file.
-Nic
Kurosu
13th January 2003, 17:23
@Nic
Sorry for not replying earlier, your post wasn't (weird !?) showing before first Spyder post.
I believe it's not due to the d2v file: using the original .d2v (though the vob is just a plain 1GB extracted from the DVD by SmartRipper, hence maybe having an incorrect end) produces the same error.
I'll send you a mail with the 2 .d2v, but they look identical, except that the IDCT method chosen by your plugin is 1, while 2 was the original (DVD2AVI, i.e. SSEMMX)
[EDIT]
That also happens with 2.01a, and with deleting the .d2v generated by that version.
spyder
13th January 2003, 21:19
I too get incorrect frame numbers. BTW, this version fixed my trouble.
FuPP
13th January 2003, 22:12
same problem with 2.01a
frames requested by encoder : 10000 to 13000, frames returned : 9660 to 12260 (about)
attached d2v
Cheers,
FuPP.
Selur
13th January 2003, 22:27
10% Speed increase (on my dual Athlon MP 1.8+), but too much frames ;)
Cu Selur
Ps.: d2v file created by DVD2AVI and MpegDecoder don't differ,..
bugs7
13th January 2003, 23:06
@nic
It's seem to work good for Pal (some french men try it) ;)
Thx for your good job again :)
FuPP
13th January 2003, 23:13
mine is pal too, but doesn't work :confused:
Selur
13th January 2003, 23:47
Strange,.. just tested a PAL myself and for me the frame count with is okay, but the sometimes stream got some ugly clitches,.. Something is really wicked out there, when I hit the Refresh (F5) button in VirtualDubmod the Frame that looked broken looks fine again, but another one is broken,...
(works fine if I use mped2dec3)
Cu Selur
Ps.: Attached a shot of a broken frame
Nic
14th January 2003, 00:10
Doh, found the bug. I honestly had never seen a trf (rff & tff flag combined) with value 0 in a d2v. So, I just completely forgot about. Doh! With that changed it counts fine.
@selur: do those frame glitches occur when encoding or while decoding a long stream. or do they occur while seeking about the frame. if its seeking inside VDub that causes it then thats ok (thats my basic cr***y seek code), if its during encoding or preview mode (without seeking first), then its a problem I dont know about.
2.02 with correct frame counting will be up tomorrow, im off to bed now. Thanks very much to cult & Kurosu for the d2v files :) (but why you guys didn't zip 'em up I dont know ;) lol ) & thanks to everyone for testing.
Cheers,
-Nic
FuPP
14th January 2003, 00:17
Then, will have a look tomorrow, good night nic ! ;)
Selur
14th January 2003, 00:22
"or do they occur while seeking about the frame."
while seeking, haven't encoded, because I thought it looked to ugly :)
"if its seeking inside VDub that causes it then thats ok"
puh,.. that's good to hear :)
"if its during encoding or preview mode (without seeking first), then its a problem I dont know about."
I'll try that tomorrow and report :)
"2.02 with correct frame counting will be up tomorrow, im off to bed now."
n8,.. going to bed now too, and maybe I'll dream about 2.02 :)
Cu Selur
Kurosu
14th January 2003, 00:36
Doh, found the bug. I honestly had never seen a trf (rff & tff flag combined) with value 0 in a d2v.
I tested that modification: "if ( trf == 2 || trf == 0 ) m_nFrameCount += 2;"
It gives the right count, but now, when playing for a long time (right key in Vdub) and then refreshing, the video was in advance by almost 2s... (haven't tested the ratio, though). I don't know what it affects.
Thanks very much to cult & Kurosu for the d2v files :) (but why you guys didn't zip 'em up I dont know ;) lol )
Next time (if there's one), I'll rar them, it'll be even smaller :p
Nic
14th January 2003, 00:37
Cool, im seeking into an arbitrary point and then im supposed to be decoding until I hit a keyframe, but maybe ive turned that off (or maybe its just not working). but yes it will be a seeking problem. Easily fixed ) hopefully ;) ). But for encoding it should all be cool.
Thanks loads for the testing all :)
-Nic
Kurosu
14th January 2003, 00:43
Erm... For that one, I'll let you debug and give us all the binary+code :)
ARDA
14th January 2003, 00:58
But for encoding it should all be cool.
Yes, I've finished a whole clip , in spite of the seeking problem;
final clip is ok.
Thanks for this great work
Arda
bugs7
14th January 2003, 09:02
Originally posted by FuPP
mine is pal too, but doesn't work :confused:
With CCE 2.5 it's crash.
With CCE 2.66 it's OK.
Strange ?
( With CCE 2.64.xx I' don't know. )
LoadPlugin("MPEGDecoder.dll")
MPEGSource("D:\trans\trans_Letterboxed.M2V")
ConvertToYUY2()
resampleaudio(44100) <- for CCE 2.5
ompg
14th January 2003, 09:23
Originally posted by bugs7
With CCE 2.5 it's crash.
With CCE 2.66 it's OK.
Strange ?
( With CCE 2.64.xx I' don't know. )
No problem with CCE 2.64.01.10.
Very Good Job Nic.
Ompg.
Nic
14th January 2003, 10:24
New build up, with counting frame bug fixed :)
ive got versions of CCE at home for testing, ill take a look, see if theres anything that can be done (CCE is such a tempramental beast).
Seeking is a problem, but not something we use in encoding. Is it accurate enough for now? Or would you prefer I fixed that first before adding DeCSS, TS Support or quick frame length detection?
(How people getting on with the MPEG-1 support?)
Cheers,
-Nic
HarryM
14th January 2003, 11:39
Originally posted by Nic
New build up, with counting frame bug fixed :)
ive got versions of CCE at home for testing, ill take a look, see if theres anything that can be done (CCE is such a tempramental beast).
Seeking is a problem, but not something we use in encoding. Is it accurate enough for now? Or would you prefer I fixed that first before adding DeCSS, TS Support or quick frame length detection?
(How people getting on with the MPEG-1 support?)
Cheers,
-Nic
Hi Nic!
You mpegdecoder_YV12 is nice fast! Overall speedup (mpeg2_decoding+resizing+xvid_encoding) is few procents!
But what result of mpegdecoder isn't the same as from mpeg2dec3?
I test it by encoding at quant2 and final size of my video isn't same.
Difference is about 1-2%.
bugs7
14th January 2003, 12:06
@nic
In previous version (1.3?), there is a feature to use mpegdecoder in an external program. This feature style exist ?
If yes, have sample vc++ project will be very cool ;)
Perhaps i will use it in a future program..
Nic
14th January 2003, 12:30
@bugs: not yet, im starting off slow this time, last time I tried to implement everything at once, and ended up not implementing anything perfectly at all. The version im putting out isn't even Intel Compiler compiled yet just to make sure that doesn't cause any bugs (ICL speeds up libmpeg2 quite alot). So expect lots of little improvements :)
-Nic
seewen
14th January 2003, 16:21
I tried MMPEGDecoder-v2.02a ( for 2.5 alpha).
And the framecount is wrong for MPEG-1 ( VCD). I tried with :
- MpegSource(".mpg")
- MpegSource(".mpg",0)
- MpegSource(".mpg",-1)
- MpegSource(".mpg",-2)
- MpegSource(".mpg", 'Correct_frame_count') ( for example 667499).
Every time, I've deleted the "*.d2v" before trying new params.
Every time I have a wrong frameCount:
Movie 1; Correct FrameCount=67499 ; Detected_by_MpegDecoder=33652
Movie 2; Correct FrameCount=64659 ; Detected_by_MpegDecoder=32209
----------
But it works very good with Ripped/Demuxed "*.m2v".
Nic
14th January 2003, 16:32
Yup, there is a problem in the way d2v files are created for mpeg-1 files. Ill fix it asap :)
Cheers,
-Nic
MaTTeR
14th January 2003, 17:58
Would someone be so kind as to attach the latest build to this thread? I'm unable to reach any dnsalis.com pages (uManiac & Nics) for the past few days:rolleyes: TIA!
Wilbert
14th January 2003, 18:02
I attached the latest:
Selur
14th January 2003, 18:03
attached the 2.02 Yv12 Version
Okay, too late,.. so I'll delete my attachment ;)
Cu Selur
Wilbert
14th January 2003, 18:05
hehe :)
FuPP
14th January 2003, 22:12
I've downloaded 2.02 from nic.dnsalias (dll dated 14/01/2003 9:17)
Still have the same problem !
does anybody else notice some problems with this new version ? :confused: :confused: :confused:
Regards,
FuPP
seewen
14th January 2003, 22:27
Originally posted by Nic
Yup, there is a problem in the way d2v files are created for mpeg-1 files. Ill fix it asap :)
Cheers,
-Nic
Cool ;)
The only reason I keep a copy of Avisynth 2.0x somewhere, is beccause their's not "MPegdecoder-yv12" yet ;).
As soon as it will be working, I could definitively erease Avs2.0x+plugins from my comp ;)
A+
MaTTeR
14th January 2003, 22:30
Many thx for the attachment guys.
I've been running tests with the YV12 and YUY versions so far and no problems noticed on progressive sources. Indeed the speed increase is very nice too!
Nic,
Is it safe to say were using the 32bit MMX iDCT by default?
Nic
14th January 2003, 23:44
Yes, it works out what chip you have and adjusts accordingly (colorspace, motion, dct). Although I dont think theres any P4 support. Hmmm, ill get on that (I finally have a p4 to test on now too)
Ill make it so that mpegdecoder produces will output a correct value for iDCT, at present it always outputs 1. (MPEGDecoder.dll pays no attention to the iDCT value in the d2v...
Cheers,
-Nic
de66ka
15th January 2003, 09:56
hi nic,
at first i'd to say that i'm respecting your work on mpegdecoder. The speed increase is great and i would use this program in future,
BUT
i reencode my stuff with CCE(2.5 sp). To test the compressibility I encode 1% of a clip (Zeit der Unschuld, PAL-DVD, 720x576) with fixed quantizer 30 (bitrate 0-8000), quality 5.
With avisynth 2.07 and mpegdec2.dll the resulting mpv-file is 30795 kb.
Using your mpegdecoder.dll (Ver2.02) the mpv-file grows up to 41565 kb by identical settings in CCE.
So I think the speed increase is a result of poor compressability and less quality.
Is there the possibility to fix this (speed increase and better compressability)??
MFG
AXEL
Nic
15th January 2003, 10:52
"is a result of poor compressability and less quality"
if anything id assume libmpeg2 to be the better quality decoder, alot more time has been spent on libmpeg2's quality than on mpeg2dec's (which hasn't been looked at properly since dvd2avi 1.76 was first released). The higher quality output could be causing a sharper picture thats harder to compress? maybe, maybe not. im only hypothesising, ill look into it.
-Nic
ps
@fupp:
Is your problem then if you ask to encode from frame x to frame y, it doesn't seek correctly? seeking isn't working quite as nicely as Id like yet, ill add that in next...
(it didnt occur to me people would encode like that)
gizmau
15th January 2003, 13:14
@de66ka
are you sure that mpegdecoder uses the same idct accuracy as your mpeg2dec.avs did?
FuPP
15th January 2003, 14:27
Originally posted by Nic
@fupp:
Is your problem then if you ask to encode from frame x to frame y, it doesn't seek correctly? seeking isn't working quite as nicely as Id like yet, ill add that in next...
(it didnt occur to me people would encode like that)
It could be related to seeking as first frame is not the good one (9660 instead of 10660), but length is ok (3000 frames).
If I don't select a range but the total length, total of frames displayed by using the script in virtualdub seems ok (it is the same than using mpeg2dec3 or mpeg2decyv12)
"(it didnt occur to me people would encode like that)" : I encode like that only for... testing purpose ! :D :D :D
Cheers,
FuPP.
de66ka
15th January 2003, 15:09
Originally posted by gizmau
@de66ka
are you sure that mpegdecoder uses the same idct accuracy as your mpeg2dec.avs did?
yes thats the question, i've no idea which idct mpegdecoder in standard-settings use!!
Nic
15th January 2003, 15:17
It uses pretty much the same one, Peter Gubanov from elecard wrote the SSEMMX iDCT algo based on the intel release which is used in almost everything...
-Nic
stevenxu
16th January 2003, 12:41
Originally posted by Nic
Yup, there is a problem in the way d2v files are created for mpeg-1 files. Ill fix it asap :)
Cheers,
-Nic
A workaround for MPEG-1 file:
MPEGSource("C:\A.MPG + C:\A.MPG",-2)
Nic
16th January 2003, 12:53
Ill fix everything I can and add new code over the weekend. :)
BTW if its not listed in the html file then the parameter doesnt currently do anything.lol. -2 doesn't effect anything.
(in fact im going to change the params to a DeComb way of: frames=2000, forcefilm=true ,etc etc) it will be alot neater that way
Cheers,
-Nic
seewen
16th January 2003, 16:36
Originally posted by stevenxu
A workaround for MPEG-1 file:
MPEGSource("C:\A.MPG + C:\A.MPG",-2)
Check the number of frames....
stevenxu
17th January 2003, 05:27
Originally posted by seewen
Check the number of frames....
Sorry it does not read full file, some frames lost. Waiting for Nic's new release.
3S Doc
17th January 2003, 20:01
Question from a beginner.
Can I use this dll for this?
I have some svcd's and they have none subs, I would made there subs in hardcoded (permanent).
I thougt when I copy the mpeg2 file to my hd.
Can I use this to do this.
example:
LoadPlugin("MPEGDecoder.dll")
MPEGSource("d:\SVCD\my_file.")
LoadPlugin("textsub.vdf")
TextSub("d:\SVCD\my_file.ssa")
this file save as a my_file.avs
Can I then load this file in CCE SP 2.5 ??
tnx.
3S.
Nic
17th January 2003, 21:49
You should be able to :) (sorry I know nothing about subs so cant say for sure)
Best bet is to try it :)
-Nic
WarpEnterprises
17th January 2003, 22:30
Maybe you have to remove the riff header if you only file-copy the mpg to disk (use vcdeasy tool CDXA2MPEG)
mikeathome
25th January 2003, 19:23
@NIC:
Just downloaded Alpha 2.02 and tested it. Changelog says framecount bug solved, hmm...
I guess you use the DVD2AVI decoder unit (sorry did not fully read all the posts), since your tool encounters exactly the same issue as the DVD2AVI 1.76 CLI Version does. It simply forgets 1-5 frames at the end of nearly every VOB it creates a project from. Well, 1-5 frames doesen't sound much, BUT it creates a big problem for the rebuild of MultiPGC/Multiangle Titles with Scenarist e.g. What happens:
- you split a Titleset by VobID (e.g. Matrix gives you 40 VobIDs) with 116 Cells
- in Matrix it is jumping back and forth all the time, different cell from different VobIDs are combined
- you start with only 2 frames missing and you end up with up-to 10 (!) this is already 400ms in PAL and you can clearly hear the jump
Can you fix the missing frames ? It must be possible, in the mo I do it manually (editing the .d2v). I split everything by VobID and create DVD2AVI projects and corresponding AviSynthScripts. Then I open them in the special VirtualDub Version. This Version is able to open and decode VOB/MPEG-2Video directly AND IT DOES THE FRAME COUNT RIGHT !!! The special VirtualDub version is available in source code as well. Can you have a look what is different in the MPEG decode section and why it counts frames right where DVD2AVI/MPEGSource fails ?
Could you pls. send me your last version w/o the .d2v project generation, you know the version where you introduced the '-2' parameter for framecount correction. I would like to give it a try. I don't really like the extra .d2v generation from MPEGSource.
Thx. for MPEGSource !!!
mike, mailto:mikeathome@gmx.de
frank
26th January 2003, 19:43
There was a thread "DVDAVI missing frames" in 11/2001 where Jackei explained that there is no VFAPI bug. (Thread isn't there anymore)
Jackei:
The design of DVDAVI VFAPI Plug-in must drop last 1~2 frames in order to prevent from illegal access at the end of file....
The typical structure of MPEG GOP is IBBPBBPBBPBB IBBPBBPBBPBB I...
MPEG invokes backward reference pictures. The display sequence is different from stored sequence for sequential reading.I have no clue how VirtualDubmod solved that problem.
When you split at VOB Id then the following GOP after last frame (needed for right decoding) is missed. Normally the GOPs are not closed.
Nic
27th January 2003, 00:01
Hmmm, Well I do it exactly as DVD2AVI creates it, my original code did it my own way & that didnt produce exactly the same output so I thought people would complain....
Seeing everyone uses dvd2avi to create their d2v's I didnt feel that producing the same output was a "bug" ;)
Ill add a function that allows adjustment of the frame count as well as the -2 param again soon...
-Nic
mikeathome
27th January 2003, 10:49
Originally posted by frank
There was a thread "DVDAVI missing frames" in 11/2001 where Jackei explained that there is no VFAPI bug. (Thread isn't there anymore)
I have no clue how VirtualDubmod solved that problem.
When you split at VOB Id then the following GOP after last frame (needed for right decoding) is missed. Normally the GOPs are not closed.
Hi,
I don't agree on your last two sentences (SORRY). When you set the right chapters (e.g. in CCESP) the Encoder will close the GOPs at chapter point. That's why titles like Matrix work at all. Have you seen how it jumps from Cell to Cell where the cell are members of different VobIDs. Look at PGC-7 and PGC-8. Those one are impossible to rebuild w/o rigth frame count !
@NIC: Thx. for taken my point. Here is the link to the special VirtualDub Version: http://forum.doom9.org/showthread.php?s=&threadid=42808 . Dext has even released the CPP code from the MPEG Decoder he is using.
mike
stax76
28th January 2003, 23:37
Hi,
does anybody cut with VirtualDub and encode with LameACM, seem to go async, I did two tests, MPEG2DEC was always sync (like 1000 times before), MPEGDecoder was always async. Maybe I should try to save wave and use BeSweet, but this seem even with MPEG2DEC.dll to go async, at least in my experience.
I hope I'm not the only one that captures, everybody seem to be into DVD copying here
Regards,
Dolemite
scmccarthy
29th January 2003, 00:04
Hi,
I'm a ripper myself, but bitrates below 128 causes async, you didn't mention the bitrates you used.
Stephen
stax76
29th January 2003, 00:16
I use 160 KBit/s MP3 CBR usually for AVI container
scmccarthy
29th January 2003, 00:26
Well that's absolutely perfect, ideal, couldn't fault that by any standard.
Stephen
frank
29th January 2003, 10:38
@mikeathome
Right, CCE encodes closed GOPs at chapter points.
But we spoke about decoding.
The cell borders, chapter points, are encoded as closed GOPs. Mostly there are one ore more I frames inserted. That's why it works in Matrix.
May be DVD2AVI doesn't handle closed GOPs in the right way?
I don't know.
My way that ever worked is to make one .d2v project from all VOBs together and then splitting with Avisynth Trim().
mikeathome
29th January 2003, 14:44
Originally posted by frank
(...)
My way that ever worked is to make one .d2v project from all VOBs together and then splitting with Avisynth Trim().
Hi,
very interesting !!!
The new IfoUpdate could give you now the cell-frame-count for your
split, choose export chapterfile for adjusted method. This will give
you ALL scene/chapterpoints of a Titleset. You would need to run this
on the raw TitleSetVobs (not a PGC rip !).
Make an Image, mount with DaemonTools, get the Cell-Chapter-Points
with IfoUpdate, create a DVD2AVI project on the mounted image
titleset, create one .avs per chapterpoint, demux audio & subpics
per CellID (as long as you don't need DTS you can do with
VStrip/VobSub, otherwise with DVDDecrypter/VobSub). Everything listet
till here can be automated with a DOS Batch Script, I need to give
that a try.
Short batch script to parse a CCESP-Chapter file:
@FOR %%x in (CCE-VOBID_??.TXT) do @FOR /F "eol=: tokens=2 delims==:" %%i in (%%x) do @echo %%i
thx. mike
iks
2nd February 2003, 12:57
Hi,
I have got another problem with MPEGdecoder and mpeg 1 files. I only get half the frames of the source stream with this input filter. If I use this to recode it to DivX, the movie stops right in the middle. Has anyone tried this with mpeg 1 files?
Ingo
cody
8th February 2003, 02:38
Yeh it seems mpeg-1's are still behaving weirdly ...when i load a clip it loads from begining to end but drops 1/4 of the frames :confused: for some reason it drops 29.9 fps mpeg-1 to 7.** fps
:eek:
tiennou
8th February 2003, 17:02
Let's hope this :devil:annoying :devil: bug will be corrected ;)
Tiennou
Keep up the good work & thanks to the developers !
stevenxu
9th February 2003, 17:12
A workaround for MPEG-1 file:
for example C:\A1.MPG 100000 frames
LoadPlugin("C:\Avisynth\plugins\MPEGDecoder.dll")
MPEGSource("C:\A1.MPG+C:\A1.MPG+C:\A1.MPG")
Trim(0,99999)
seewen
10th February 2003, 14:58
Sorry, but where is the "workaround" ?
The script that you use give you 100'000 frames.. ok.
But it doesn't give you correctly A1.MPG.. it gives you some frames of A1.MPG + some frames of A1.MPG + some frames of A1.MPG .
Nic
10th February 2003, 17:08
I havent much time recently, but the version that will be released tomorrow, will allow you to force the number of frames. It will also have automatic transport stream support (i.e. it detects its a transport stream and finds the PIDs accordingly).
Also its ICL7 compiled and is compiled using the latest libmpeg2 library. People mentioned in this thread that mpegdecoder.dll was creating AVIs bigger than MPEG2Dec.dll. From my tests its now the opposite way round so hopefully quality/uncompressability problems will be gone too.
See ya tomorrow,
-Nic
stevenxu
10th February 2003, 18:29
Originally posted by seewen
Sorry, but where is the "workaround" ?
The script that you use give you 100'000 frames.. ok.
But it doesn't give you correctly A1.MPG.. it gives you some frames of A1.MPG + some frames of A1.MPG + some frames of A1.MPG .
My script works well. With it I have compressed more than 10 VCDs.
Nic
17th February 2003, 15:53
New version up ( http://nic.dnsalias.com ).
You can now specify:
MPEGSource("e:\rip\mpeg1.mpg", 2000)
to get MPEGSource to return 2000 frames or
MPEGSource("e:\rip\mpeg1.mpg", -2)
to get directshow to guess the number of frames
Also transport streams should work automatically with this version. I.e. you can specify a d2v or mpg and if its a transport stream it will be handled without any further parameters (automatically finds the PIDs)
Cheers,
-Nic
Wilbert
17th February 2003, 16:02
Nic, did you already implement
1) support for audio ?
2) support for pva streams ?
Thx,
Nic
17th February 2003, 16:18
Nope neither of them yet...dont have any pva streams, but demuxing is easy. Audio can be done by other filters I think, MPASource & AC3Source just need to be able to take MPEG PS/SS input.
-Nic
WarpEnterprises
17th February 2003, 16:35
Is there source code for a generic mpg demuxer available?
Nic
17th February 2003, 17:04
Try the CDemux class in MPEGDecoder's source, it could be used to wrap the audio filters to take MPEG files.
-Nic
kitsaros2000
17th February 2003, 17:13
the ac3source dosent work to me. I'm pretty sure that the filter is buggy because i can hear only a part of the 5.1 channels . (either the 2 background channels either the left channel only). :( :( :(
Nic can you put directly into MPEGSource ac3 support? :rolleyes:
Thanks anyway :)
bye !
unplugged
8th March 2003, 01:42
Nic, MPEGDecoder DLL for Avisynth 2.0x doesn't seem to consider interlaced streams during final YUY2 conversion (after YV12 decoding step), so interlaced lines receive chroma lines in a progressive way when put in YUY2 buffer, I have done this little test between AVS 2.5 and 2.0x version (using MPEGDecoder 2.03a)
AVS 2.5 script
...
LoadPlugin("c:\App\Media\Avisynth\MPEG2Dec3.DLL")
LoadPlugin("c:\App\Media\Avisynth\MPEGDecoderYV12.DLL")
mpegsource("movie.d2v")
YV12toYUY2(interlaced=true)
...
(right and combed result as original stream, MarcFD's conversion routine does the job ;))
AVS 2.08 script
...
LoadPlugin("c:\App\Media\Avisynth\MPEGDecoder.DLL")
mpegsource("movie.d2v")
...
(wrong result: not combed, chroma values doubled instead)
However good work, I am using your MPEGDecoderYV12 for 2.5 and it works pretty fast and well!
Maybe you could consider useful to implement directly MarcFD's YV12toYUY2(interlaced=true) code to perform YUY2 upsampling for AVS 2.0x version of your plugin... ATM it seems that neither AVS 2.5 internal ConvertToYUY2(interlaced=true) treats interlaced frames as it should :D
bond
9th March 2003, 12:43
I just encoded a small clip with the following script:
LoadPlugin("C:\...\mpegdecoder.dll")
mpegsource("C:\...\movie.d2v")
trim(140153,147269)
crop(2,80,716,418)
BicubicResize(640,256,0,0.5)
but not the specified framerange [7116 frames with trim()] was encoded but some other 7116 frames a little bit later in the movie.
i used
mpegdecoder 2.03
dvd2avi 1.76
EDIT: i got the same results with the .d2v created by mpegdecoder.dll
i guess the failure is caused because i used trim()!?
btw isnt there a possibility to load .lst files anymore?
seewen
9th March 2003, 15:55
I really don't understand why you need to make politic in this forum.
unplugged
9th March 2003, 16:09
@bond, seeking is a known problem, if you want it and its speed you have to encode from 1st frame, of course.
bond
9th March 2003, 16:51
@seewen
i think that everybodies life is influenced by politics, so why not showing your opinions?
I dont want to start a discussion in this forum although i wouldnt say 'no' to one ;)
@unplugged
thanks for clearing things up
jrmann1999
11th March 2003, 04:33
I wanted to post this here for completeness(I cross posted, sorry :( ) The new build of mpegdecoder is awesome! It finally loads Transport Streams produced by the MyHD card. However, this being said it has a bit of a bug I think. The automatic pid detection is great, but streams that contain two video streams are not working. I've tried:
mpegsource("g:\bleh.tp", 0, "0x14")
to force the stream 0x14 to be detected(verified with hdtv2mpeg that this stream is correct) and the resulting d2v detects 0x24(a lovely weather radar). Unless I'm doing the parameter wrong now?
Nic
11th March 2003, 17:14
Two video streams! not a combination I accounted for. The parameter override may not be working because the new PID detection overrides it.
Ill fix it soon :)
-Nic
trbarry
12th March 2003, 04:45
Be careful that's really the video PID. Usually those are x11,21,31, ... and the audio PID's are x14,24,34 ...
- Tom
Nic
12th March 2003, 09:53
http://nic.dnsalias.com/mpgtx.exe
run that as: mpgtx -i d:\dump.ts
where d:\dump.ts is your transport stream. That will get all the PIDs for you.
At present MPEGDecoder doesnt pay any attention to the PID number you put in. :( Ill release a new version very soon to let you enter it.
Cheers,
-Nic
jrmann1999
12th March 2003, 19:53
@trbarry:
My video/audio pids are totally reversed. 0x11,0x14 are one stream, 0x21,0x24 are another w/ the 0x#4 pids being video....
@nic:
Thanks! I was quite happy when your decoder opened the stream without me having to decode it externally.
Nic
13th March 2003, 10:09
There also seems to be a bug in the way I read in transport stream D2V files (i.e. if the streamtype == 2 I forgot to read the PIDs text line...doh)
Ill fix both these things soon :)
-Nic
bond
16th March 2003, 14:32
Originally posted by myself
I just encoded a small clip with the following script:
LoadPlugin("C:\...\mpegdecoder.dll")
mpegsource("C:\...\movie.d2v")
trim(140153,147269)
crop(2,80,716,418)
BicubicResize(640,256,0,0.5)
but not the specified framerange [140153-147269 (7116 frames)] was encoded but some other 7116 frames a little bit later in the movie.
i used
mpegdecoder 2.03
dvd2avi 1.76
btw i got the same results with the .d2v created by mpegdecoder.dllHi now i found out that this failure only accures if i use "mpegsource" in my .avs-script!
if i use "mpeg2source" the right framerange is encoded!
Nic
16th March 2003, 15:04
Thats because Seeking doesn't work I think. It doesn't have frame accurate seeking, seeing its so popular perhaps I should think about adding it ;)
(I only made the plugin for encoding so I didn't really think to add seeking)
Cheers,
-Nic
bond
16th March 2003, 15:21
ok thanks for clarifing!
FuPP
16th March 2003, 23:04
Originally posted by Nic
Thats because Seeking doesn't work I think. It doesn't have frame accurate seeking, seeing its so popular perhaps I should think about adding it ;)
It would be really great, Nic !
Regards,
FuPP.
jrmann1999
18th March 2003, 04:33
Just curious whether or not you could include the dvd2avi routines to demux the embedded AC3 stream? It would save the time needed to do it manually with trbarry's version.
scmccarthy
18th March 2003, 15:38
Did Tom Barry make an AC3 stream demuxer?
Stephen
jrmann1999
18th March 2003, 16:08
No, he did however make a version of dvd2avi that can read transport streams. I find it has the best luck with demuxing of the embedded AC3 within the stream.
Nic
18th March 2003, 17:48
Im already demuxing the video stream with my code, demuxing the ac3 stream would be just as easy. But I don't think an avisynth filter is really the place for demuxing, your better off using trbarry's dvd2avi.
(I'd add more to trbarry's DVD2AVI but the Transport Streams it creates arent compatible with the ones I use (made by hardware encoders and my own ps->ts converter). It'd be better for me to get my a*s in gear and release my rewrite version of dvd2avi, which handles all of them)
-Nic
jrmann1999
18th March 2003, 18:12
My thoughts on this are, since your dll spends the time to create a d2v file, it wouldn't be that much more odd to demux the ac3 at the exact same time. Audio processing would be done externally but just to have a nice all-in-one tool that can deal with TS effectively would be a godsend.
DDogg
18th March 2003, 23:32
I am going to be a little lazy and ask if anybody has been able to use MPEGDecoder.dll, multipass vbr CCE, and pulldown to get a muxed mpg with the sound in sync. I have not been able to do so to this point, but it sure is fast :-) This is the script I am using:
LoadPlugin("MPEGDecoder.dll")
LoadPlugin("deen.dll")
mpegsource("D:\sweetest\DVD2AV~1.D2V")
#deen("a3d",4,6,8,9)
BicubicResize(480,360,0.0,0.6)
AddBorders(0,60,0,60)
ConvertToYUY2()
addaudio()
Frankly I am not up to doing the 15 pages of this thread--old eyes and all that. If somebody tells me they have had no problem then I will track down my problem and kill it.
BTW : CCE 2.50, Avs 2.51, latest MPEGDecoder from nic's
mmebane
9th April 2003, 01:21
OK, I haven't read through all the pages of this thread, so maybe I missed something, but I thought that all the number-of-frame detection problems were fixed?
Well, not for me!
I'm trying to encode the following clip:
LotR: Two Towers preview (Easter Egg on Disc 2 of Fellowship of the Ring Extended Edition)
VTS_02, PGC 1, Chapter 1
Extracted via DVD Decrypter
The proper length _should_ be 5561 frames. The plugin is apparently detecting it as 6960 frames. (I get the number of frames via VDubMod's file info box, the proper number comes from when I open it with VDubMod/no AviSynth).
I tried to force the proper number of frames, like so:
MPEGSource("C:\FELLOWSHIP_EXT_D2\VIDEO_TS\VTS_02_1.vob",5561)
It didn't seem to fix the problem.
Is there any way to fix this? Or any other way to open VOBs in AviSynth, in YV12? The other MPEG opener plugins only seem to handle YUY2.
REIGN_
16th April 2003, 10:53
Hi Nic!
I have been having this problem for a while now and i believe i should mention it. MpegDecoder never shows the correct number of frames in a video. It is always 1-5 frames below normal (where normal is the number of frames shown in Smart Ripper)
It's been a while since the last update and i hope that it takes so long because of the many bugfixes ;)
Anyway thanks!
Valky
17th July 2003, 15:00
Originally posted by bond
btw isnt there a possibility to load .lst files anymore?
I didn't get that option to work. This thread is too huge, but still couldn't find anything on it why it doesn't work anymore. Also nic's documentation doesn't mention anything about it :/
There is also a little spelling bug in the documentation:
MPEGSource("e:\rip\VTs_01_1.vob+e:\rip\VTs_01_2.vob+e:\rip\VTs_01_3.vob)
I guess this line is missing one " from the end?
Well..I tried now this filter for the first time mainly because first time in my life my friend has now dvd movie that any encoder haven't been able to read vob's. They can be played from HD with PowerDVD, but not handled with avisynth. I'm gonna try this filter with those xxx-vobs.
I just tried this first with my own vobs and noticed that lst-function doesnt work anymore.
Also this script:
LoadPlugin("C:\avs25\MPEGdecoder.dll")
#MPEGsource("E:\robin\robin.lst")
MPEGsource("E:\robin\1.vob+E:\robin\2.vob")
AutoCrop(0,wMultOf=4, hMultOf=4)
bilinearresize(512,384)
..without resizing and cropping gives following error in VDmod when seeking about 30 minutes of this 50 minutes clip:
"avisynth caught an access violation at 0x04594604 attempting to write to 0x045528000"
When I cropped and resized the script looks fine.
sh0dan
12th September 2003, 12:04
(Thread split - new thread about development can be found here (http://forum.doom9.org/showthread.php?s=&threadid=61310)).
bond
12th September 2003, 12:31
why that :confused:
Wilbert
12th September 2003, 14:11
Because it's about development (compiling plugins, etc.). So, it's more suited in the dev. forum.
bond
12th September 2003, 14:21
i am more one of the guys who likes it when there is one big thread about a filter where all the discussion goes in...
and if jrest really releases a new version of mpegdecoder i am sure all the discussion will go into the new thread in the dev forum...
but let's wait what comes :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.