Log in

View Full Version : DVD2AVIdg/MPEG2DEC3dg 1.1.0 Release Version


Pages : 1 [2] 3

zettai
22nd April 2004, 08:21
Yes. Gknot will need updating to use the new d2v files - unless replacing the mpeg2dec file in gknow with the new one will work (gordian knot will have its own mpeg2dec file somewhere in its directory). I can't be sure that will work but it's worth a try.

RB
22nd April 2004, 08:35
Originally posted by neuron2
12. DVD2AVI (AFAIK all versions) will crash if there is a "false"
SEQUENCE_HEADER_CODE (0x1B3) at the start of the VOB (i.e. for
some reason there's a 0x1B3 code but it's not followed by a valid
sequence header). I have just seen this with a menu VOB demuxed by
VobId. Fixed by adding a global VideoStream_Flag variable (global.h)
that gets set to true in Next_Packet() in getbit.c when we find a
VIDEO_ELEMENTARY_STREAM packet. Then modified switch statement in
Get_Hdr() in gethdr.c and mpeg2dec.c to decode sequence headers only
if VideoStream_Flag == true. [RB]
Fixed

Uh, it just occured to me that this fix will break support for MPEG2 elementary streams because there are no VIDEO_ELEMENTARY_STREAM (0x1E0) headers in a raw M2V file... Just tested with your latest beta 4, and yes, M2V files won't work anymore. Sorry :)

puschpull
22nd April 2004, 08:40
zettai: yes

I put MPEG2Dec3dg.dll in the GK directory
delete MPEG2Dec3.dll
and rename MPEG2Dec3dg.dll to MPEG2Dec3.dll

And now is this problem OK !
:-))

Thanks!

Guest
22nd April 2004, 12:35
Originally posted by RB
Uh, it just occured to me that this fix will break support for MPEG2 elementary streams because there are no VIDEO_ELEMENTARY_STREAM (0x1E0) headers in a raw M2V file... Just tested with your latest beta 4, and yes, M2V files won't work anymore. Sorry :) Ouch. Please let me know if you think of an alternate solution. Meanwhile, I'll back that out and start thinking about how to fix it properly. Thank you for bringing it to my attention.

EDIT: RB, can you possibly post a link to a small VOB that shows the original problem?

Guest
22nd April 2004, 12:37
Originally posted by DDogg
Yep, working fine. So much for "This one will take a day or two as I forgot how FF works." - FF must be like a bicycle? :) Glad to hear it is OK for you now.

I thought of a slick way to finesse the problem without having to know how FF actually works. :sly:

Guest
22nd April 2004, 12:39
Originally posted by puschpull
I put MPEG2Dec3dg.dll in the GK directory
delete MPEG2Dec3.dll
and rename MPEG2Dec3dg.dll to MPEG2Dec3.dll

And now is this problem OK !
Thanks puschpull for bringing this up and reporting your successful results. Thanks zettai for the suggestion.

In case anyone is curious... That extra '1' digit on some of the D2V flag bytes means "this frame can be decoded just by decoding the GOP that the frame is in, i.e., it is not necessary to decode the previous GOP." This is the extra information that enables faster random access.

RB
22nd April 2004, 13:02
Originally posted by neuron2
Ouch. Please let me know if you think of an alternate solution. Meanwhile, I'll back that out and start thinking about how to fix it properly. Thank you for bringing it to my attention.
I think it's best to simply determine whether the current file is MPEG2 ES rather than VOB and if so, just set VideoStream_Flag = true unconditionally.

MPEG2 ES files always appear to start with a SEQUENCE_HEADER_CODE (00 00 01 B3) right away whereas VOB files start with a PACK_START_CODE (00 00 01 BA). This could be used in addition to a check on the file extension (MPV/M2V vs. VOB).

Cyberia
22nd April 2004, 17:59
Gosh Neuron2, I'm sorry, I appear to have found a new bug :(

When you drag-and-drop multiple files they get loaded in random order, not ascending order.

You'd almost think I was a senior tech support guy and did this kind of stuff for a living. :)

Guest
22nd April 2004, 19:23
You think the order is real important, huh?

Cyberia
22nd April 2004, 20:22
Oh I see! It's a *feature*! Lets call it the 'Tarantino' Now you can watch any movie in randomly ordered sections, and *you* can figure out the timeline. Just like Quentin Tarantino filmed it himself. Nice.

WARNING: Do not attempt to use this feature on movies made by QT!

(If you aren't a Quentin Tarantino fan, this post will be lost on you. Can you tell I just got Kill Bill v1?)

Guest
23rd April 2004, 04:12
I wonder if you detected my implicit sarcasm.

A straight alphanumeric sort would put vts_10.vob before vts_2.vob. Given that the general form is xxx_Nyyy.vob, where xxx and yyy are arbitrary (except that yyy does not contain a _) and N is a number, how would you define the sort order? Would you first do alphanumeric sort ignoring N, and then sort numerically by N?

zettai
23rd April 2004, 07:55
I'd order like this:

VOB_01_01 to VOB_01_99

then

VOB_02_01 to vob_02_99

so find the first vob, then all the parts of that and then find the next. Repeat until everything is in order.

Is that doable?

If the input isn't in the form VOB_xx_xx then I guess it will have to be ordinary alphanumerical.

Cyberia
23rd April 2004, 15:34
I detected the sarcasm, but thought it was a retorical question. Order is important, yes.

The current drag-and-drop loading is _useless_ for dragging multiple files.

I'd *really* prefer that they be ordered they way I dropped them, whatever that is. Thats all. You don't have to sort them at all just don't re-arrange them. Thats probably not as easy as it sounds. It's probably Windows itself handing them to you in random order.

If you have to sort, try this:
Assume the general form is VTS_xx_yy.vob
Assume the "VTS_" part will remain constant
Sort by xx, then by yy (force xx and yy to triple-digits before sorting, so VTS_2.VOB sorts as VTS_002.vob)

I don't know, do what you want. This is a low priority fix I guess, but it'd be nice.

Guest
24th April 2004, 15:23
OK, I drew the line for a formal release. Please beat up on this release candidate. Compared to the previous beta, it improves trackbar handling, fixes M2V (by backing out RB's changes -- see below), allows for a larger number of pictures per GOP, and adds the aspect ratio information to the D2V file.

RB, I'll need a VOB to address your crashing issue with "false" headers.

http://neuron2.net/fixd2v/decodefix110RC1.zip

Cyberia
24th April 2004, 17:48
@the trackbar issue:

I agree at loading that the trackbar/marker should be positioned at the first GOP, but should the last GOP be the where the end marker stops? Frames after that point (until EOF) should be decodeable shouldn't they?

Guest
24th April 2004, 18:09
I agree. I'll see if it is not too hard to do that. The last frames are in fact decoded and included, but the marker currently stops at the start of the GOP.

Cyberia
24th April 2004, 20:56
I guess the right way to say it is that the Start marker should be have GOP resolution, but the End marker should have frame resolution.

The trackbar should therefore also have frame resolution, and when you set the Start marker it jump to the previous GOP.

My best friend just told me she is going to have a baby! I can't even describe how I feel now, let alone concentrate. Wow, awesome.

(no not mine)

Dark-Cracker
24th April 2004, 21:44
hi,

nice work :)
it's me or the video button (in the menu) was grey even after opening a .vob file and it was un-greyed only when u put the mouse on ?

a little suggestion is to grey the options like dolby downmix or dynamic range control when u select demux mode, same for the track number when u select demux all.

and i have also a bug report.

in the command line u enter multiple path name (for the -IF option)
however the character "," is an alowed character for the pathname.
even if it's rarely used.

for exemple if i have a path like this : "c:\my,dvd\"

if i use the option : dvd2avi ... -IF [c:\my,dvd\vts_01_1.vob,c:\my,dvd\vts_01_2.vob]

this will failed. i think u must use a separator forbidden in the path name or use the double quote.

Bye.

Guest
24th April 2004, 22:43
I've fixed the ungreying of the Video menu item. That's irritated me for a while too. There was a missing DrawMenuBar() call after the item was enabled.

Regarding the comma, it would break applications that use the command line if I change it.

Cyberia
25th April 2004, 00:17
GUI Issues:

How about moving the Pause command from the Options/Process Priority menu to the File menu (where the Stop command is)

Does the Save BMP option work? Appears disabled. It would be nice to have this work. It should also be under the File menu.

Dark-Cracker
25th April 2004, 00:24
@neuron2

>Regarding the comma, it would break applications that use the command line if I change it.

sure but i think if u use the double quote ("") i think the modification to add in the applications who use the command line will be little. if u have start to fix dvd2avi bugs why not fix this bug in the command line ?

in any case do as u want :) and thank u for your work :) (and of course all the other people fixing dvd2avi).

PS : perhaps should u update the link and changelog in the first post.

Bye.

Guest
25th April 2004, 15:13
Originally posted by Cyberia
How about moving the Pause command from the Options/Process Priority menu to the File menu (where the Stop command is) Done.

Does the Save BMP option work? Appears disabled. It would be nice to have this work. It should also be under the File menu. It works but you had to set color space to RBG24. I changed it to do that automatically so that it is always enabled (it saves and restores the original color space). I also moved it to the file menu and made it do a file dialog popup to allow the user to specify the directory and filename.

Thank you for your suggestions.

Here is RC2:

http://neuron2.net/fixd2v/decodefix110RC2.zip

Cyberia
25th April 2004, 23:34
Good Work Neuron2! This looks very good.

I have one very minor irritation left. When you first open the program before loading a file, Video is still greyed. For consistency sake, either:
Grey out the audio menu also, until a file loads, or don't grey the Video before a file loads.

Thats it, very very good work Don.

Cyberia
26th April 2004, 00:19
Oh crap, I just redicovered a few more GUI issues I wanted to mention.

What is up with the SIMD Technology menu? I am baffeled as to how it works. I know what it is supposed to do, but not how it works. Let me explain:

That menu has 5 items:
MMX (checked, checkable)
SSE MMX (checked, checkable)
3DNOW! (checked, greyed)
SSE FPU (checked, greyed)
SSE2 (unchecked, uncheckable, ungreyed)

Now I have an Athlon 2200, so I would think SSE2 should be unchecked and greyed (Implying I CAN'T use it). But why are 3DNOW! and SSE FPU both greyed out? They can't be mandatory, what if I have a Pentium? Also, why are there bars between some of the items?

Am I misunderstanding how this works?

Also, move the SIMD (lose the 'Technology' part), DirectDraw and VFAPI options to the OPTIONS menu, where they belong.

If you wanted to add an item or two to the Help menu, like for the Readme, or for the changelog. Not that it needs much documentation, but what little is documented is quite old. The Help dialog even points to Jackei's original page. Anyway the HELP menu is VERY low priority, just wanted to put my thoughts on the record. (You should still move some of the item to Options)

Guest
26th April 2004, 01:26
If you guys keep making new requests for RC loads, we'll never have a release. :)

An RC release is to ensure that things are OK for the feature set in existence when the line is drawn. There will be future releases. Nevertheless, I have noted your requests for future releases.

Now, because I have the balls to ignore my own advice, I'll tell you of a new feature I am adding for the release. It always annoyed me that Preview only plays from the left mark position. I always wanted a way to just play from the current location. So we will have Preview (plays between the mark points, as before) and Play (plays from current position to the end).

jorel
26th April 2004, 02:52
neuron2

few seconds after your first post i was reading your thread.
i don't want to came here interpose after each new version.
then, this is my present and future grace for what you do in this job!

thank you for that great work!
:cool:

RB
26th April 2004, 09:16
Originally posted by neuron2
RB, I'll need a VOB to address your crashing issue with "false" headers.
I'll try to come up with one again.

But really, it's a general problem that's IMHO really obvious when looking at the source. In brief, the problem is that at least the initializing code in mpeg2dec.c just blindly scans the input file for a SEQUENCE_HEADER_CODE. That's fine if it's MPEG2 ES or in case of a VOB file, the VOB file starts with a video packet. But if the VOB starts with audio/subs/nav packs, it is not only theoretically possible that one of these packs contains a 0x000001B3 byte sequence somewhere, just as part of the data in the packets. In this case DVD2AVI will obviously crash.

Guest
26th April 2004, 12:36
@RB

I wasn't doubting you; rather, just saying I'll need a VOB to fix it and test the fix. If you can provide one, it will be appreciated. Thank you for your interest in making the program better.

EDIT: How about if I look for a valid sequence header start code by ensuring that it is followed by a sequence extension start code? This is mandatory for MPEG2, and we don't support MPEG1. We could revisit it if and when MPEG1 support is added (probably never).

Cyberia
26th April 2004, 18:08
Clarification:

Upon further review, I believe the Video menu should never be greyed out. It should be OK to set these options before opening a file.

The File menu already greys the required items.

@neuron2 - [innocent voice] I never said any of these had to be added immediately :) [/innocent voice]

Guest
26th April 2004, 19:37
@jorel

You're most welcome and thank you.

@Cyberia

OK, I'll not grey it out then. Your other suggestions have been noted and added to my current worklist.

Guest
27th April 2004, 00:51
OK, let's get this sucker released!

Here is RC3. It has the Play feature and a link to my website.

http://neuron2.net/fixd2v/decodefix110RC3.zip

Please report only problems with features I've added or claimed to have fixed (see changes file).

After this is released, we'll plan the next release.

RB
27th April 2004, 08:31
Will the new Mpeg2Dec3DG.dll still work with D2V files generated by DVD2AVIdg 1.0.0?

Guest
27th April 2004, 12:42
Originally posted by RB
Will the new Mpeg2Dec3DG.dll still work with D2V files generated by DVD2AVIdg 1.0.0? If the D2V file is 1.76-style, yes. If new-style, no.

This aspect hadn't occurred to me. I'll give it some thought. Thanks for pointing it out. At a minimum, a warning in the documentation is called for, as well as a version ID in the D2V file.

The thing is, I anticipate continued evolution of the D2V file and I don't want to have exploding code for backward compatibility. What do you think?

EDIT: Actually, testing and stepping in the debugger shows that 1.0.0 D2V files do work. The issue is how the missing Aspect_Ratio line is dealt with. It seems that fscanf() just fails to find it and subsequent fscanf()'s do work. I'm not sure why, given the definition of fscanf(), but that is what I see.

RB
27th April 2004, 13:32
Actually I was asking because of the new "12" codes in the D2V :) The new Mpeg2Dec3DG.dll doesn't absolutely require these, I suppose.

However I agree, don't bother with backward compatibility. But you may want to stay in contact with jdobbs as he's generating his own, uh, tweaked D2V files for DVD-Rebuilder. You guys may want to make sure the new DLL doesn't choke on them :)

Guest
27th April 2004, 13:57
The extra 0x10 flags OR'ed into the flag bytes will be missing with the 1.0.0 format. The result will simply be that random access will be as slow as the 1.0.0 release. Believe it or not, I carefully chose the bit polarity for just this reason. :sly:

How tweaked?

RB
27th April 2004, 15:51
Originally posted by neuron2
How tweaked?

D2V is written in 1.76 style but no skipping of initial B-Frames
RFF and BFF flags are never written to the D2V, regardless whether or not the source is like that, always writes "2" to the D2V
for NTSC, Force Film is always activated (yes, even if there are no RFF flags)
This way he only gets the "real" frames at 23.976 fps (25 for PAL), undisturbed by mixed telecined/interlaced content. RFF/TFF flags and original frame rate codes are then rebuilt during remuxing of the newly encoded stream into original VOBs. Very clever :)

Maybe I should point jdobbs at this thread.

Guest
28th April 2004, 03:24
I put out one more (and hopefully last) RC for version 1.1.0.

This version rewrites all the GUI object enabling and disabling stuff. It is now centralised and easy to maintain. The thing is, though, you guys have to check whether what I did is reasonable. I hope that the venerable Cyberia will have a good look at it.

Speaking of which, Cyberia, you need an avatar.

And oh, I also rearranged the menus to be more rational and organized, at least as I see it. :p

Your feedback will be appreciated as we approach closure on 1.1.0.

http://neuron2.net/fixd2v/decodefix110RC4.zip

Cyberia
28th April 2004, 03:54
Yes, I need an Avatar. How the heck do I get one?

Guest
28th April 2004, 04:50
Originally posted by Cyberia
Yes, I need an Avatar. How the heck do I get one? Edit Options in the Control Panel. Want me to pick one and send it to you? :)

Cyberia
28th April 2004, 05:28
tada

Guest
28th April 2004, 05:51
Awesome, dude. :eek:

Cyberia
28th April 2004, 14:20
The Colorspace option does not default to any value, nor does it remember it's check if you re-open the program.

Guest
28th April 2004, 18:40
Originally posted by Cyberia
The Colorspace option does not default to any value, nor does it remember it's check if you re-open the program. Good catch! It does get set after a VOB is loaded, when the DirectDraw overlay can be checked and initialized if possible. I'll default it to YUV in the resources so it at least doesn't appear unchecked. This item is not currently stored in the INI file so it will be forgotten. I'd rather not break INI file backward compatibility just for this.

Cyberia
28th April 2004, 19:54
I'm not sure if this is a new issue or not, but I can't check (or uncheck) ANY of the 'options' under Help.

VFAPI can't uncheck
DirectDraw can't check
SIMD can't check or uncheck anything.

I checked and RC2 also does this, so now I'm confused. Are these supposed to be Options? or indicators only?

Cyberia
28th April 2004, 19:58
Why would it break backwards compatibility? You'd be adding a new parameter to the existing format. If ANY of the parameters are missing they should revert to the default anyway. Right?

Guest
28th April 2004, 21:26
Originally posted by Cyberia
Are these supposed to be Options? or indicators only? They're indications only. That is why they are not in the Option menu. ;)

Guest
28th April 2004, 22:03
Originally posted by Cyberia
Why would it break backwards compatibility? You'd be adding a new parameter to the existing format. If ANY of the parameters are missing they should revert to the default anyway. Right? Actually, the Color Space setting affects only "Save AVI", "Play", and "Preview". Now that "Save AVI" is gone, this arguably should not even be configurable, and should be set automatically according to the DirectDraw overlay capability.

Does anyone object to my doing just that?

Cyberia
28th April 2004, 22:56
Lose everything not needed.

Is SaveAVI gone forever, or just disabled for the forseeable future? If gone forever, remove SaveAVI from the file menu too.

DDogg
28th April 2004, 22:58
If I understand your post completely, I don't see how anybody could object. Certainly none on this end. LIke Cyberia
said, you might as well pull the save avi for now too.

Guest
29th April 2004, 00:57
Version 1.1.0 has been released! See the top of the thread for links and the final change log.

Planning for the next release now begins. Please revert to Cyberia's development thread for that and use this thread for any residual bugs found in version 1.1.0.

Thank you to all who participated. :)