Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > DVD2AVI / DGIndex
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th February 2009, 03:18   #1  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
DGMPGDec 1.5.4

* Added a File/Close menu option.

* Added a Video/Copy frame to clipboard option.

* Fixed a problem with video demultiplexing that caused frames to be lost at the start of
the stream.

* Added a Sequence field to the Info dialog. It shows the state of the progressive_sequence flag. Also modified the strings printed for Frame Type and Frame Struct. See the users manual for details.

http://neuron2.net/dgmpgdec/dgmpgdec.html

This is a full source code release.
Guest is offline   Reply With Quote
Old 10th February 2009, 03:44   #2  |  Link
nixo
Registered User
 
nixo's Avatar
 
Join Date: Dec 2002
Location: EUR
Posts: 159
Many thanks for the quick fix. And the other additions too.
nixo is offline   Reply With Quote
Old 11th February 2009, 00:41   #3  |  Link
GrofLuigi
Member of a Library
 
Join Date: Oct 2002
Posts: 463
GrofLuigi is offline   Reply With Quote
Old 14th February 2009, 16:00   #4  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Thanks for new build,
Quote:
* Added a Video/Copy frame to clipboard option.
is very usefull for HD resolution.

One problem though, are you sure that DGIndex cuts fragments from transport stream precisely?

I have the following scenario: I have m2ts stream, want to cut a segment (less than half of the video, starting from the middle), and then I save the project and demuxe video stream to .m2v. So I use the timeline and left/right keys to position the video to a blank frame which starts the segment (it's a fade-in sequence). Then I hit the "[" button and navigate to segment's end and close the selection there. Then I save the project (with .m2v demuxed).

Now here is thing: one would expect the starting frame to be blank, as previously selected. However it is not like that in the produced m2v. I believe that there are several frames saved from a GOP that precedes the blank frame that I originally selected. Funny thing that if I load that m2v into DGIndex it will show a blank frame in the beginning. But even if I save a new project (based on demuxed m2v) then I'll see several frames added in the begining on video playback.

Whilst researching this issue I've found another amusing thing : I cannot actually load that d2v back into DGIndex It only maxes one of the cores for a while and when the program becomes responsive still no video is shown. (Here I mean d2v produced when I cut the segment out of original transport stream).

I've checked that d2v and it looks normal to me (also I can parse it from the menu).
Code:
DGIndexProjectFile16
1
E:\@rb\01 (SUN).m2ts

Stream_Type=2
MPEG2_Transport_PID=100,110,1ff
Transport_Packet_Size=192
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=1920x1080
Field_Operation=0
Frame_Rate=29970 (30000/1001)
Location=0,acef7,0,e5bfc
Egh is offline   Reply With Quote
Old 14th February 2009, 16:11   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Egh View Post
Now here is thing: one would expect the starting frame to be blank, as previously selected. However it is not like that in the produced m2v. I believe that there are several frames saved from a GOP that precedes the blank frame that I originally selected.
If you cut at an open GOP, then the leading orphaned B frames will be from before the I picture that you see in DGIndex. When DGDecode serves that he will replace those frames with copies of the I frame. So it is all normal and your video encoded via DGDecode will not show the earlier frames. But if you want to do frame accurate M2V file cutting (which is not supported by DGIndex), you'll need an application like VideoRedo, Womble, etc.

I will look into the load project function that you say is hanging.
Guest is offline   Reply With Quote
Old 14th February 2009, 16:42   #6  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Quote:
Originally Posted by neuron2 View Post
If you cut at an open GOP, then the leading orphaned B frames will be from before the I picture that you see in DGIndex. When DGDecode serves that he will replace those frames with copies of the I frame. So it is all normal and your video encoded via DGDecode will not show the earlier frames. But if you want to do frame accurate M2V file cutting (which is not supported by DGIndex), you'll need an application like VideoRedo, Womble, etc.
How can I avoid cutting an open GOP? Also, what is the maximum leading B frames number and does it affect audio delay?

As per actual problem, what it seems it does this kind of substitution in DGIndex, however seems it doesn't do it in AVS (i.e. MPEG2Source("02.d2v") in my case, where d2v points to a selection in the original transport stream). I loaded AVS into vdub and identified two leading frames there, the second being actually transitional (a field from leading frame and a field from target frame). And as I told before, m2v demuxed video loaded into DGIndex doesn't have these two frames. Magic
Egh is offline   Reply With Quote
Old 14th February 2009, 18:22   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Egh View Post
How can I avoid cutting an open GOP?
If your streams have open GOPs, you cannot avoid it, unless you use an MPEG editor especially designed for that purpose.

Quote:
Also, what is the maximum leading B frames number and does it affect audio delay?
As per MPEG2 specs. DGMPGDec allows for leading B frames when reporting the delay.

Quote:
As per actual problem, what it seems it does this kind of substitution in DGIndex, however seems it doesn't do it in AVS (i.e. MPEG2Source("02.d2v") in my case, where d2v points to a selection in the original transport stream). I loaded AVS into vdub and identified two leading frames there, the second being actually transitional (a field from leading frame and a field from target frame). And as I told before, m2v demuxed video loaded into DGIndex doesn't have these two frames. Magic
If you can provide me with a stream that I can use to duplicate that, then I can investigate it.

I have fixed the Load Project function. If you redownload version 1.5.4 you will get the fix.
Guest is offline   Reply With Quote
Old 15th February 2009, 05:59   #8  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Thanks for the quick fix, the problem with hanging on "load project" is fixed.

However there are still several minor issues remaining with this (i.e. loading d2v representing a segment from a larger video):

a. Video&Window are not updated on project load. It does though if you load d2v representing entire video. Here you need to move the slider on the timeline for DGIndex to display video and to resize the window appropriately.
b. I reckon that might be explained by the fact that even though initially the slider is positioned at the segment start, if you use < > buttons it jumps to the beginning of the file.
c. If I recall correctly, older versions of DGIndex used to show selection on the timeline when you load such d2v project. It doesn't do this in the current build.

BTW did a bit more research, and I kind of got a feeling that Load Project function was incorrect even in the previous version, i.e. 153. Forgive me if I'm wrong


As per actual video to replicate the problem, I managed to narrow down a test video to show the bug to just over 100mb I'm uploading archives to mediafire and will later PM you a link to download. These archives include:
1. frag.d2v and relevant demuxed m2v file == cut from original m2ts.
2. frag2.d2v is a smaller file which actually displays a bug, it is a cut which used the demuxed video from item 1.. I.E. original m2ts file is not required to replicate the problem, a tiny 100mb would do (Note: original is 2.5 gb in size)
3. firstframes.avi is a Huff (of course ffdshow variant i.e. YV12) which contains first 5-6 frames served by DGDecode via AVS (Mpeg2source(frag2.d2v)).

PS. Links are up, check your pm
You can also load frag2.d2v (provided you adjust all the paths etc) to replicate remaining minor issues with "Load Project" functionality.

Last edited by Egh; 15th February 2009 at 11:33.
Egh is offline   Reply With Quote
Old 15th February 2009, 15:55   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@Egh

The stream has set the closed GOP flag even though the GOP is open. This has been seen before and that's why DGIndex has the option "Force Open GOPs in D2V File". If you set that before saving your project, then the leading B frames will be properly replaced as I described.

Looking at the remaining Load Project quirk...
Guest is offline   Reply With Quote
Old 15th February 2009, 17:26   #10  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
OK, I fixed the load project quirk and added the trackbar workaround for the Windows bug in showing trackbar selections with themed windows. Redownload 1.5.4.
Guest is offline   Reply With Quote
Old 15th February 2009, 17:44   #11  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,816
@neuron2
Will you be able to add progress in command line?
Atak_Snajpera is offline   Reply With Quote
Old 15th February 2009, 17:53   #12  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I need a more detailed specification of what you are asking for.
Guest is offline   Reply With Quote
Old 15th February 2009, 18:04   #13  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,816
It would be very nice if I could capture indexing/demuxing progress from command line and show everything in my GUI.

Last edited by Atak_Snajpera; 15th February 2009 at 18:07.
Atak_Snajpera is offline   Reply With Quote
Old 15th February 2009, 18:59   #14  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
As I said, you have to tell me how it's supposed to work. I don't know anything about your GUI.
Guest is offline   Reply With Quote
Old 15th February 2009, 19:15   #15  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,816
In the same way how every other cmd tool works. For example: When I use mp4box or mkvmerge I get percentage progress in console. Once I have this I can redirect those numbers to GUI.
Atak_Snajpera is offline   Reply With Quote
Old 16th February 2009, 03:43   #16  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Neuron2 cheers!

Now I don't have any problems with Load Project.

Just several suggestions which may be implemented:

a) New selection line is nice, however because it is not exactly same length as the timeline, cursor on selection has an offset in relation to slider, what is most confusing the offset is different depending on the slider position in the file (it is almost same in the beginning but very different at the end). I wonder if it is possible to make them same length.

b) The minorest bug possible -- if you have a selection in the file and then load another file then cancel -- selection from previous file remain in the window

I've checked segment extraction with Open GOP fix enabled (now I at least know what this option is for ) and it works as you described. Still it consistently in my case adds just two leading frames (same as the I-frame selected now). I wonder if this can be avoided at all by choosing a different I-frame? I'm not so advanced with MPEG2 internals, but iirc the problem is caused only by several I-frames in a same GOP? So theoretically if an I-frame is choosen which starts GOP then no leading frames are added, am I correct?
Egh is offline   Reply With Quote
Old 16th February 2009, 04:01   #17  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Egh View Post
a) New selection line is nice, however because it is not exactly same length as the timeline, cursor on selection has an offset in relation to slider, what is most confusing the offset is different depending on the slider position in the file (it is almost same in the beginning but very different at the end). I wonder if it is possible to make them same length.
It's just cosmetics. I don't have time for it. Sorry. You'll get used to it. Think of the timeline as the new select line, not the old trackbar.

Quote:
b) The minorest bug possible -- if you have a selection in the file and then load another file then cancel -- selection from previous file remain in the window
Ha ha. Poor you.

Quote:
I've checked segment extraction with Open GOP fix enabled (now I at least know what this option is for ) and it works as you described. Still it consistently in my case adds just two leading frames (same as the I-frame selected now). I wonder if this can be avoided at all by choosing a different I-frame? I'm not so advanced with MPEG2 internals, but iirc the problem is caused only by several I-frames in a same GOP? So theoretically if an I-frame is choosen which starts GOP then no leading frames are added, am I correct?
No, you're wrong. All the GOPs are open. If you don't want those frames, trim them in your script.
Guest is offline   Reply With Quote
Old 16th February 2009, 05:35   #18  |  Link
Egh
Registered User
 
Join Date: Jun 2005
Posts: 630
Quote:
Originally Posted by neuron2 View Post
No, you're wrong. All the GOPs are open. If you don't want those frames, trim them in your script.
I guess that is best option, however if I understand correctly, I need to adjust audio delay for that segment appropriately, am I wrong?

As I cut on the scene change most of the times two additional frames do not matter much. However if DGIndex adds more of them, that could be the problem.
Egh is offline   Reply With Quote
Old 16th February 2009, 14:41   #19  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Egh View Post
I guess that is best option, however if I understand correctly, I need to adjust audio delay for that segment appropriately, am I wrong?
You can adjust the delay or trim the audio.

Quote:
As I cut on the scene change most of the times two additional frames do not matter much. However if DGIndex adds more of them, that could be the problem.
DGIndex does not add any frames. It cuts on GOP boundaries and then fixes up orphaned B frames. The number of those will depend upon how the stream was encoded.

I could consider adding an option to suppress them entirely but as you are the only person ever to ask for it, it's hard to get motivated about it.
Guest is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.