Log in

View Full Version : PgcEdit v9.3 released! (March 22, 2010)


Pages : [1] 2 3 4

r0lZ
22nd March 2010, 20:03
[EDIT]
See this post (https://forum.doom9.org/showthread.php?p=2011894#post2011894) for v9.4.
See this post (https://forum.doom9.org/showthread.php?p=2024017#post2024017) for v9.5.


PgcEdit v9.3 (March 22, 2010)
A. = Added feature
E. = Enhancement
F. = Fixed bug

Main window and commands list:

A. The Dead commands that cannot be executed due to unconditional jumps or gotos are now highlighted in purple in the commands pane (if the Highlight Gotos and Errors option is enabled.)
E. A GOTO was not renumbered when its target was deleted. Now, it is renumbered so that it points to the first command following the group of deleted commands.
F. Backward GOTO targets were often wrong after a copy/paste operation, and when GOTO commands were appended to a scratchbook section.
E. Right-clicking on the Copy button in the main window does a Copy As Text.

Search box and its result window:

E. Added a new Tab in the Search results window, to see only the commands. Useful for example to check which value a GPRM can have. You can double-click on a line of the Summary tab of the Search window to search for that particular command, and return to the previous search with the new Previous button. It is also possible to save the summary and to copy it to the clipboard. Thanks to M_Knox!
E. The "Most Recently Used" contextual menu of the Search box included dupes when a leading or trailing space was included or when there were upper / lower case differences. Now, the "almost dupes" are automatically removed.

PGC Editor:

E. Improved the tooltip of the NextPGCN pink link in menus.
F. PUOs Editor: It was not possible to input a value for the PUOs editor when it was launched from the PGC editor.
A. PGC Editor -> Subpicture Colour Lookup Table -> Import: Added the VobSub index files (*.idx) to the supported CLUT formats. (Note that the conversion from YCrCb to RGB is not always accurate.)
F. Pgc Editor -> Cell Type Flags editor: Now, the user cannot set the Angle and Interleaved Allocation flags in a menu.
A. PgcEditor -> Create New Cell: New option to copy all cells of a VOB in one operation.
F. When the first 16:9 cell was created in a menu domain, the letterboxed or pan&scan flag was not automatically set in the domain stream attributes. Now, the letterboxed flag is forced by default.

Menu Editor:

E. MAJOR IMPROVEMENT! It is now possible to edit all button positions for all groups at the same time:

The position values are now automatically computed for the groups that are not currently displayed.
The pseudo-group "All" is now a checkbox. When it is ticked, the user can edit all groups at the same time, including the positions of the buttons.
The group radiobuttons are now used only to select the group to display in the viewer (or the group to edit when the All checkbox is not ticked.)
The new All checkbutton is highlighted in RED when there are parameter differences in the groups of the CURRENT button. It is still pink when there are differences in the other buttons. The tooltip of the All checkbutton now contains the list of the group differences for all buttons.
The button position sliders are now highlighted in yellow when there is a notable position difference in the different groups, as it might be better to edit the button positions in each group separately.
New dialogue when the user quits the editor with OK and there are button parameter differences in the groups (except for the positions).

E. MAJOR IMPROVEMENT when creating a new cell with buttons, so that the highlight of the new button is now visible by default. The new cells can now easily be used as a basis for simple still menus, with the help of VobBlanker and DVDSubEdit:

When the FIRST button is created in a cell of a 16:9 domain and the user selects the option to create 2 (or 3) groups, and there is no subpic decoding stream defined in the PGC, PgcEdit now creates a stream with 2 subpics: subpic 0 for the wide display mode, and subpic 1 for the letterbox AND pan&scan modes. It is therefore possible now to edit the button highlights of 2 groups independently with DVDSubEdit. (Note that 3 groups are still not, and will probably never be supported.)
When a new button is created, colour scheme 1 is now assigned by default to the button, instead of colour scheme 0 (usually transparent).
When a new dummy PGC is created, PgcEdit now uses its own CLUT instead of the Muxman default CLUT. As a consequence, when the first button is created and the original colour scheme is still undefined, the default colour schemes created will be different to those created by previous versions of PgcEdit. Colour scheme 1 (the default) is special, as none of the 4 colours are fully transparent, to ensure that the highlight of the buttons created by PgcEdit will be visible anyway.
When the first button of a cell is created and the current colour scheme has not yet been defined and is still full transparent, a default colour scheme with reasonable values is created automatically.
DON'T FORGET TO VERIFY THE NEW BUTTONS WITH A GOOD PLAYER!

A. New functions in the Edit menu "Clear all adjacent button links", "Automatically link buttons (numerically)" and "Automatically link buttons (by position)" to let PgcEdit clear or set the adjacent button links automatically. The Automatically Link functions fail in some cases, notably when there are auto-activating buttons, therefore a verification function "Verify Buttons Accessibility" has been added to check if all non-hidden buttons can be accessed with the remote from all non-auto activating buttons. This function is automatically called at the end of the Automatically Link Buttons processes and when the user OK the editor.
N. New "Paste and Increment" functions in the Edit menu to paste a command and automatically increment some of its parameters. A simplified version "Paste and Increment JumpVTS_PTT" is designed to fill the commands of the chapter menu buttons. See the help in the Edit menu of the editor.
F. When importing or copying a whole menu, the number of numerically selectable buttons was sometimes wrong.
F. The number of buttons was not updated in the list of cells of the menu viewer when the editor was closed.

Menu Viewer and Editor:

E. It is now possible to select the adjacent buttons of the auto-activating buttons with Control+Cursors. (A real player does not allow this with its remote.)
E. It is now possible to select the previous or next button with the keyboard shortcuts Control+P and Control+N. Tooltips added.

File menu:

F. Open DVD: Fixed some bugs when fake PGCs and LUs are automatically removed.
F. File -> Recent DVDs: some DVDs were shown twice in the list.
E. Find BOVs: Improved the method to find all BOVs when the option to Scan Only One VOBU Every N VOBUs is high and the cell is relatively small.
F. Find BOVs: After having scanned a short cell, the scan of the remaining cells was very slow.
F. New DVD: the commands added immediately after New DVD to the FP-PGC were lost, and the Jump To Title 1 command was not highlighted.
A. New function File -> Menu Buttons & BOVs -> Export and convert PAL <-> NTSC to convert the position of the buttons from PAL to NTSC or vice versa during the export operation. The file can be imported in a converted DVD.

Edit menu:

A. New Edit function "Dupe and Increment" to duplicate several commands at once and automatically adjust their parameters. Useful to create long lists of similar commands. See the help in the Edit menu.
Clicking on the Duplicate button (in the bottom of the main window) with the right mouse button calls the new Dupe and Increment function.

Trace mode:

E. The State -> Mark Played PGCs as '<Played>' option has been replaced by Mark Called/Played PGCs in Comments. Now, a PGC is marked as Called and highlighted in light yellow when it has been accessed, and as Played and highlighted in light green when a video cell has been played. It is therefore easier to locate PGCs with never played video content.
F. All Player Audio Capabilities flags were inverted in the Virtual Player Configuration and in SPRM(15).
PLEASE VERIFY YOUR VIRTUAL PLAYER CONFIGURATION!
F. A NextPGCN link not pointing to itself in a menu is now considered as invalid by the trace.
F. Trace menu -> State -> Clear All Played/Called Comments and Highlights replaced the other comments with "-". Thanks wencaS!
F. The Control+Down key (shortcut to start the trace) was active even when the trace mode was off.
F. It is now impossible to jump to the post or cell commands of a cell without buttons but with an infinite still time. The user must now press a button on the remote to continue to trace.
F. The trace was blocked when a Title PGC with BOVs and with the Button Select Or Activate PUO set was encountered.
F. Fixed the hexadecimal string appearing in the Watch window.
F. When the menu viewer was closed by an external function and not manually by the user, an error happened when the trace mode was closed.

DVD menu:

E. Remove Useless Stuff has been greatly improved, and includes several new functions. The order of the operations has also been modified.

E. Clear Useless Set GPRM Commands now also converts the JumpSS_VMGM_PGC commands in the VMGM to simple LinkPGCN commands.
A. Added PGC and DVD -> Delete All Dead Commands to remove the commands that cannot be executed due to unconditional jumps or gotos.
Use Info -> Find Dead Commands to examine the dead commands in the DVD.
A. New function "Delete All Dead Menubuttons" to remove the buttons that cannot or cannot easily enough be activated by the user due to PUO or too short playback time.
A. Added PGC and DVD -> Delete All NOPs to remove all useless NOPs (and move the goto targets to NOPs to the next non-NOP line.)


Domain menu:

F. Delete Last PGC In Domain, when used on a PGC of a not-one_sequential Title often produced an error.

PGC menu:

E. Kill PGC Playback, on PGCs with menu buttons or BOVs: PgcEdit tries now to pre-select the best button (in the best cell) to propose a reasonable default button to the user.
E. When using Kill PGC Playback on a menu without VOB files, PgcEdit doesn't ask each time if the VOB file should be removed. Now, it checks if there are still references to the VOB in the IFO, and displays the dialogue only when that's the case.
E. Jump To PGC Upon DVD Insert: A new dialogue is shown when the target PGC is a menu so that the user can now select the longest Title for the resume point instead of the default resume Title. See point 12 of the online guide here (http://www.digital-digest.com/~blutach/Jump2PGC/Jump2PGC_guide.html).

Menu menu:

F. After having replaced a menu domain with New Menu, it was impossible to create a new cell in the new menu.
F. Change LU Language Code: It was impossible to define an "undefined" code.
F. Menu -> New Menu bug: the menu was not usable after having cancelled the function. It was necessary to reload the DVD to access the menu.

Title menu:

F. Fixed partially a problem with Import Title's Intro Clip, occurring when the title is visited (but not played) before the main menu.

Info menu:

E. When applied to a Title, Root, Audio, Subpic, Angle or Chapter menu PGC, Go To Calling Command now also shows the Title PGCs from which the user can call the entry menu PGC with the corresponding button of the remote.
E. Go To Calling Command has now an additional pink button to warn the user when there are jumps to nowhere in the DVD. The user can click the button to launch the Find Jumps To Nowhere GUI immediately.
E. Go To Calling Commands (and similar functions): When the user clicks on a reference in the list, the focus is now automatically set to the command.
F. Go To Calling Command crashed if the user clicked Refresh after having deleted the target PGC. Now, the GUI is simply closed.
F. Go To Calling Command bug: the "Return To Target" button did not work properly after having used the "Refresh" button. Thanks to M_Knox!

Bookmarks menu:

N. New Bookmarks menu. You can now assign a bookmark to any PGC, and quickly jump to that PGC. Thanks to M_KNOX for the idea and demo plugin.
Note: the bookmarks are automatically saved and loaded with the DVD, and you can also export and import them.

Tools menu:

E. There is now a new Contextual Help plugin, maintained by M_Knox. It uses the F1 key, so the F1 key has been removed from the Tools menu. There is a dialogue when you start PgcEdit v9.3 for the first time, to explain that you may need to reorganize the Tools menu.

Scratchbook menu:

F. After having loaded a Scratchbook file in the scratchbook, the sub-menu of Append To Scratchbook (with the scratchbook sections) was not updated.

Options menu:

A. Added the Options -> Input/Output -> Set Default Provider ID submenu, to force a specific Provider ID by default.
F. Fixed a bug when the Highlight Gotos and Errors option was OFF.

General:

F. Compiled with a new version of FreeWrap 6.42.4, with several fixes by M_Knox. This version should fix the problems with foreign characters in the file and path names, and a bug under some Linux flavours.
Unfortunately, that means also that PGCEDIT DOESN'T RUN UNDER WIN 95/98/ME ANY MORE!
F. Fixed most problems with foreign characters in the file or path names.
E. The message boxes now have a scrollbar when the text is too long to fit.
F. Fixed a bunch of typos and non-European spellings. Thanks to all betas!
E. The tiny cells created by PgcEdit have now a blank subpic pack. As a consequence, the size of the VOB cell is now 20KB instead of 10KB.
F. Yes/No/Cancel dialogues: the height of some dialogues was wrong, and a bug occurred when the option "use_internal_dialog" was manually set to "false" in PgcEdit.cfg. The icons have also been improved by M_Knox.
E. Added "No to all" and/or "Yes to all" in some dialogues that can be shown many times in some circumstances.
E. The torn off menus are now always on top of their parent windows, and they do not have a button in the Windows task bar any more.
E. Improved the method to detect if the cells of a menu PGC can be played.
E. Some cosmetic improvements (About menu, new bold or underlined text and clickable URLs in dialogues, ...) Thanks to M_Knox!
F. Workaround for a system bug when renaming the backups folders.

r0lZ
22nd March 2010, 20:05
Linux specific:

F. Menu Editor, under Linux: Fixed the error (without consequence) happening when the user ticks or unticks the "All" checkbox.
F. Three bugs under Linux in the new function that displays the text in the standard Yes/No/Cancel dialogues and in the text viewer. Thanks M_Knox!
*. Unfortunately, due to an incompatibility in Wine with the new kernels, the preview doesn't work correctly any more under most Linux distributions. Let me know if you can find a workaround!



Updated plugins:

PUO (Prohibited User Operations) plugin v2.0

Added "Edit VOB PUOs of current domain" and "Edit VOB PUOs of current PGC" with a GUI to selectively set or clear any VOB PUO of any cell of the current domain or PGC.
Removed Selectively Clear VOB PUOs, less powerful than the new functions.
The plugin menu has been reorganised.

DVDShrink plugin v2.7

Minor change necessary for the new PgcEdit contextual help system.

Womble plugin v1.2

Added Create Celltimes.txt from a Womble PAL Project file.



New plugins by M_Knox:

Context Help plugin

Developed by M_Knox with the help of blutach and Wombler (for the help file), this plugin implements the new contextual help system in PgcEdit. Use the F1 key to get help for any function!
IMO, this plugin is essential, especially for newbies. Thanks to everybody involved in that big project!
Note: If you're getting "Page not found" errors when using PgcEdit_Manual.chm, please ensure that you have the latest version of it, which can be obtained here (http://www.digital-digest.com/~blutach/PgcEdit_Manual.zip), or delete the PgcEdit manual from your PgcEdit installation folder to force the plugin to use the online help.
The Context Help plugin discussion thread and download link are here (http://forum.doom9.org/showthread.php?p=1384938#post1384938).

Drag and Drop support plugin

Developed by M_Knox, this plugin implements the Drag and Drop support for PgcEdit. Just drop the icon of any DVD-Video file in the PgcEdit main window to open the DVD. You can also import a VTST by dropping its IFO file to the PGC list pane.
The Drag and Drop support plugin discussion thread and download link are here (http://forum.doom9.org/showthread.php?t=152694).

QuickTarget plugin

Yet another useful plugin developed by M_Knox. With this plugin, you can easily change the target of almost all Jump, Call, LinkPGCN or Goto command by simply Alt-clicking its target! You can even change the Prev/Next/GoUp PGCN links from the PGC Editor the same way, and convert any NOP to a jump! There is also a function to split combined Set+Link commands into two commands.
The QuickTarget plugin discussion thread and download link are here (http://forum.doom9.org/showthread.php?t=152320).

Options Dialog plugin

This plugin, written by M_Knox, adds a new "Show Options Dialog" entry in the Options menu. It allows you to change all PgcEdit options from an handy window with tabs, instead of having to use the options menu.
The Options Dialog plugin discussion thread and download link are here (http://forum.doom9.org/showthread.php?p=1384727).

Command Parser plugin

This new plugin by M_Knox is still in development phase. It will be released as soon as possible.
With that plugin, you will be able to type the command instead of having to use the menus and widgets of the Command Editor to insert or modify a command. You will be able to use the standard PgcEdit syntax, as well as a slightly simplified syntax.

blutach
22nd March 2010, 22:56
Fantastic r0lZ. And huge thanks also to M_Knox for his innovative plugins.

Regards

r0lZ
22nd March 2010, 23:00
... and to you and Wombler for your patient work on the manual, and to all beta testers for their wonderful job!

I would like to thank also all donors. Thanks to them, I am still motivated to continue to develop PgcEdit, although some additional donations are still welcome! ;)

goonix
22nd March 2010, 23:45
You are the greatest, r0lZ!
Many thanks to you and all the beta testers.

goonix

kikatu
23rd March 2010, 01:25
Thanks: r0lZ, M_Knox, testers, and anybody else involved with PcgEdit evolvement. :)

Hubbabub
23rd March 2010, 07:44
Thank you all for a super program

dashali
23rd March 2010, 12:52
Very Very Thx for this great gift....

Wombler
23rd March 2010, 22:42
... and to you and Wombler for your patient work on the manual, and to all beta testers for their wonderful job!

I would like to thank also all donors. Thanks to them, I am still motivated to continue to develop PgcEdit, although some additional donations are still welcome! ;)

Thanks r0lZ!

I had the easy bit though. :)

Great to see all this finally arrive as I know users will find the enhancements extremely useful.

The 'Remove Useless Stuff' function is a particularly powerful favourite of mine that I use on every disc.


Wombler

r0lZ
24th March 2010, 10:28
Thanks for the kind words, everybody!

I like also Remove Useless Stuff. Funny to see how simple some DVDs can become after having applied that function, and how unnecessarily complex some authoring programs are.

naiden_99
28th March 2010, 03:02
Thank you r0lZ for this little gem. I've used it quite a while and it's getting better with each new version. Thanks also to all the people involved with PgcEdit.

Could someone please explain what exactly does 'Remove Useless Stuff' do. I don't remember seeing that function before.

:thanks:

r0lZ
28th March 2010, 06:57
Remove Useless Stuff calls in sequence a lot of functions. All of those functions are available from the DVD, Domain or PGC menus, but Remove Useless Stuff launches them all, in a particular order. The goal is to simplify the DVD as much as possible, without breaking the navigation. It is not new, but it has been expanded with several new functions in v9.3.

Examples:
- Most authoring programs are based on templates, and they create usually several PGCs in each menu domains that are used only in some very specific cases. When PgcEdit detects that some of these PGCs are not useful, it removes them automatically.
- Remove Useless Stuff tries also to remove the "dead commands", which are the commands that can never be executed and are therefore useless. By freeing them, some PGCs can become uncalled, and PgcEdit can remove them as well. (The dead commands stuff is new in 9.3.)

You can turn any of the cleanup function off before launching the Remove Useless Stuff. So, if you don't like a feature of Remove Useless Stuff, you can skip it. Personally, I use that function usually immediately after having ripped the DVD, to remove most useless stuff, but I like to keep the NOPs, as they are sometimes used as GOTO targets, and keeping them can be useful when I modify the navigation manually. When I have finished my edits, I launch it again, and that time, I remove also the useless NOPs.

Anyway, try it! As far as I know, this function is safe to use, and it can help to understand the structure of the DVD. It can even sometimes regain some disc space, by removing uncalled PGCs or VTS.

naiden_99
28th March 2010, 07:27
It is not new, but it has been expanded with several new functions in v9.3.
Maybe I should look more carefully in the menu commands, is just that I'm used to work by clicking on the button bar.:rolleyes:

Anyway I will try it and see for myself what it does.:)
Thanks for your explanation and examples.

:goodpost:

Wombler
29th March 2010, 11:57
Maybe I should look more carefully in the menu commands, is just that I'm used to work by clicking on the button bar.:rolleyes:

Anyway I will try it and see for myself what it does.:)
Thanks for your explanation and examples.

:goodpost:

r0lZ is kind of understating things there. :)

'Remove Useless Stuff' is a very powerful tool for cleaning up and simplifying the DVD structure.

It's very easy to use though as all the complicated stuff is dealt with by PgcEdit.

Check out the manual for further information as it explains in more detail as to exactly what this function does.

The CHM file version is included in the PgcEdit download and if you extract this to your PgcEdit folder it'll always be available via the 'Documentation' link in the 'Help Menu'.

HTH.


Wombler

vwpassion
10th April 2010, 10:57
Thanks r0lz for the update, its very much appreciated. :)

Found a small bug: When you right click a pgc and go to "Domain stream attributes" and click on delete behind Audio/SubPic Stream the Application error "wrong # args: should be "winfo toplevel win..." pops up. When i click on OK the error msg disappears tho and the function itself works fine.

r0lZ
10th April 2010, 11:08
Thanks for the report. I've already noticed and fixed that bug. I'll release an update soon, but I want to improve some things and wait for other (possible) bug reports before.

BTW, the bug is not really important. It is caused by the dialogue that pops up to inform you that the stream is not removed from the VOB files. Since that dialogue is (normally) displayed only once per session, you can retry, and the bug will not happen any more. Anyway, don't worry, the bug causes nothing wrong in your IFOs. Just verify that the stream is really gone by closing and reopening the DSA window.

Gothmog
2nd May 2010, 02:52
Bug report... ?

You may or may not be aware of this, and it took me awhile to notice, but "control + shift + V" (paste after) does not work in 9.3 or 9.2 and maybe others. It worked in versions before 9.0 that I'm aware of. It works from the menu, but not in the keyboard shortcut. it just pastes.

XP, sp2

BTW... I love this program!

blutach
2nd May 2010, 03:17
Works OK for me.

Regards

Gothmog
2nd May 2010, 03:24
well, then I'm stumped...:(

I just tested it again in another clean copy of this OS (dual boot) and it does it there too, so its not a software hotkey conflict.

It does NOT misbehave if the caps lock is on.

Something must have changed since it did not behave this way before.

blutach
2nd May 2010, 04:05
Just a guess - maybe a keyboard problem. Try swapping your keyboard and see if that helps.

Regards

r0lZ
2nd May 2010, 07:12
Control+Shift+V means Control+upper case V. So, if Caps-Lock is on, you need to type Control-v without the shift key, and if it is off, you have to hold shift. In other words, use Control+whatever key combination you use to type "V" in notepad.

Gothmog
2nd May 2010, 22:59
Just a guess - maybe a keyboard problem. Try swapping your keyboard and see if that helps.

Regards

I swapped keyboards and bingo, it works again! Looks like that's the only thing wrong with it. #@%@#%

And here I thought hardware went bad all at once.

Thanks!!!

IVaN_000
16th July 2010, 23:11
Is there an unattended way to open a DVD folder, search for BOVs, "Remove useless stuff", save, and then exit?

I tried to make a little app in C# to perform those tasks by retrieving the handles of PgcEdit buttons, and sending Windows messages to them, but apparently windows made in Tcl/Tk work different than regular Win32 windows, because that didn't work as I expected. For example, trying to use WM_CLOSE to close some windows (like "Verify number of streams") actually minimizes them. I guess I should study some Tcl and write a plugin to automatize that.

(Sorry for my poor English.)

r0lZ
17th July 2010, 09:44
I guess I should study some Tcl and write a plugin to automatize that.
Yes, that's the way to do it. When a DVD is passed to PgcEdit via the command line, the plugins are always loaded and executed after the DVD has been loaded. Normally, a plugin does nothing at load time, except to add itself to the Plugins menu, but you can theoretically launch any processing, then exit PgcEdit.

Unfortunately, you cannot just launch the Remove Useless Stuff procedure from the plugin, as it opens a window. But you can launch the procedures that Remove Useless Stuff uses, one at a time. (Note however that sometimes, one of these procedures can display a dialog box if it encounters a problem, so there is no guarantee that it will work completely unattended.)

Try this:

# Launch Remove Useless Stuff unattended

# check if a DVD has been loaded at startup
if {[info exists ::dvddir]} {
# Delete all useless Dead Commands
::main::clean_up_dvd 2
if {$::dvd_modified} {::main::Write_DVD false}

# Delete all useless Dead Buttons and BOVs
::macros::delete_all_dead_buttons true
if {$::dvd_modified} {::main::Write_DVD false}

# Delete all unreferenced cell commands
::utils::delete_all_unreferenced_cell_commands true
if {$::dvd_modified} {::main::Write_DVD false}

# Delete completely all uncalled Titlesets
::utils::delete_uncalled_vts true
if {$::dvd_modified} {::main::Write_DVD false}

# Clear useless Set commands and free useless GPRMs
::macros::clear_useless_set_commands true

# Clear jumps and links to void PGCs
::utils::clear_jumps_to_void_pgcs true
if {$::dvd_modified} {::main::Write_DVD false}

# Remove useless menu VOB files
::macros::remove_useless_menu_vobs true

# Delete all uncalled PGCs
::utils::delete_all_uncalled true
if {$::dvd_modified} {::main::Write_DVD false}

# Delete all NOPs
::main::clean_up_dvd -2
if {$::dvd_modified} {::main::Write_DVD false}

# close PgcEdit
exit
}

The BOVs are scanned automatically at startup anyway, so you don't need to add that function in the plugin.

Note that you will need to copy the PgcEdit installation folder elsewhere and add the plugin in that folder only, or you will not been able to use PgcEdit without running your plugin when a DVD is opened at startup.

Note also that I have not tested the method. I hope it works. :-)

mikenadia
21st July 2010, 14:34
Preprocessed the VOB with PGCedit (including "remove unwanted stuff": all options checked). Then run Voblanker ( with 32k gaps unchecked, VIDEO_TS= 0k, otherwise 64k).
With 32k gaps unchecked (in Vobblanker options), no issue.
With 32k gaps checked (in Vobblanker options), if I rerun "remove unwanted stuff" VIDEO_TS goes down to 0k (instead of 64k), meaning I probably have to rerun Vobblanker. It seems that it is the option "remove unnecessary Menu VOB" that makes the difference.
I understand it may be normal behaviour but I would like to know what options I should unckeck in "Remove useless stuff" if I decide to rerun with a future version without having to rerun Vobblanker.
Thanks in advance.

r0lZ
21st July 2010, 21:10
PgcEdit and ImgBurn use a special technique commonly called "64K gaps" to be sure that the IFO and BUP files are placed in different ECC (error correction) blocks of the DVD. For example, when there is no VIDEO_TS.VOB file, VIDEO_TS.BUP is placed on disc after VIDEO_TS.IFO and a gap so that a read error in one ECC block doesn't ruin both files.

In the other hand, VobBlanker has an option to create a blank VIDEO_TS.VOB file to fill the gap. Therefore, the IFO and BUP will always be on different ECC blocks, even with burning program that rebuild the IFO and suppress the gap, such as Nero.

If you don't burn with ImgBurn, then the VobBlanker option might be useful. But if you burn with ImgBurn or if you create an ISO with PgcEdit (with the 32k gap option enabled), then the VOB file is absolutely useless.

Anyway, PgcEdit's Remove Useless Stuff does what it is supposed to do: it removes the useless VOB file. Of course, you can untick that option if you need the VIDEO_TS.VOB file, but take care. Some commercial DVDs create huge VIDEO_TS.VOB files, just to align the layer break correctly. Not removing them is a great waste of space if you want to burn the DVD on a single layer disc. And note that the other useless menu VOBs will not be removed either, and it is rarely necessary to create gaps between VTS IFO and BUP files, since there is always at least one VOB file between the two files on disc.

notec
27th July 2010, 15:31
You can turn any of the cleanup function off before launching the Remove Useless Stuff. So, if you don't like a feature of Remove Useless Stuff, you can skip it. Personally, I use that function usually immediately after having ripped the DVD, to remove most useless stuff, but I like to keep the NOPs, as they are sometimes used as GOTO targets, and keeping them can be useful when I modify the navigation manually. When I have finished my edits, I launch it again, and that time, I remove also the useless NOPs.


Nice tip didn't know that about the NOPs and GOTOs.

Do you run "Remove Useless Stuff" (Ctrl+Shift+R) the second time with all the options ticked or just with the the remove NOPs box ticked? Does it hurt to run as after opening the DVD with them all ticked? (I'm assuming no but thought I'd ask).

thx...

r0lZ
27th July 2010, 18:44
You can tick all options both times, especially if you have modified the navigation. PgcEdit might find new stuff to remove. Also, sometimes, running all options two times can be useful, as some cleanup functions can free stuff that can be only removed during the second pass. (I did my best to put the functions in the most useful order, but I had to take the speed of the operations into account, and the best order depends of each DVD.)
Anyway, Remove Useless Stuff should be transparent to the navigation (unless there is a bug somewhere).

notec
29th July 2010, 14:22
Now running before and after as you describe. Thanks for the tips (and confidence that it's a viable solution for proper clean up)!

mikenadia
30th July 2010, 15:53
Cosmetics
1) Straight from the rip.
[71 00 00 05 00 00 00 00] 1 Set gprm(5) =(mov) 0
[71 00 00 02 00 00 00 00] 2 Set gprm(2) =(mov) 0
[00 C1 00 01 00 06 00 05] 3 if ( gprm(1) >= 6 ) then { Goto line 5 }
[30 06 00 01 03 83 00 00] 4 (JumpSS) Jump to VTSM 3, Root menu (TTN 1)
[30 06 00 01 07 83 00 00] 5 (JumpSS) Jump to VTSM 7, Root menu (TTN 1)
[30 06 00 00 00 00 00 00] 6 (JumpSS) Jump to First Play PGC
From the info GPRM Summary tab, it seems that gprm(1) is never >=6.
But VTSM 7 does not exist , so line 5 is a Jump to nowhere, but because line 5 is a Jump and because there is no Goto line 6 , line 6 is considered as a Dead command and is deleted while running "Remove useless stuff".

2) Sometimes, I have
[71 00 00 05 20 00 00 00] 1 Set gprm(5) =(mov) 8192
[71 00 00 05 00 01 00 00] 2 Set gprm(5) =(mov) 1
[71 00 00 03 00 01 00 00] 3 Set gprm(3) =(mov) 1
[30 02 00 00 00 01 00 00] 4 (JumpTT) Jump to Title 1
Two consecutive set commands for the same gprm and at non variable values. Can I always delete the first one?

Thanks in advance.

r0lZ
30th July 2010, 16:10
1) I don't see your point. PgcEdit can delete line 6, as normally it cannot be executed. The fact that line 5 is a jump to nowhere doesn't change that. A player should normally hang on that line. If it doesn't hang, you're lucky, but you cannot assume that all players will happily continue to the next line.
PgcEdit could be smarter and check if the condition of the test in line 3 can never be true, and when it's the case, it could delete lines 3, 5 and 6, but it is extremely difficult to do that (especially as I have to take the speed of the operations into account and verifying all possible values of a GPRM in each condition is much too slow).

2) When the second command's operator is =(mov), then yes, you can safely remove the previous set, as the value of the GPRM is overwritten anyway.

mikenadia
30th July 2010, 16:17
I understand but my point is that "Remove useless stuff" should not delete line 6 (assuming that it is a Dead command) without checking that the previous Jump (here line 5) is not a Jump to Nowhere.

Otherwise, I have to make sure to have solved all the " Jump to nowhere" issues before running " Remove useless stuff".

The intent of the DVD is to have lines 1, 2, 3,4, 6 left, I think.

Thanks.

Edit: I was not asking for lines 3, 5 , 6 to be removed and the "Jump to nowhere" check will be welcome , if there is no objection.
Edit2:If you insert a conditionnal Goto to a non existing line ( the last one + 1), when you create that line, the conditionnal GOto is modified (the last one (before any modifications ) +2). Just cosmetics. One click away. (Or when you insert a conditionnal Goto to a non existing line, it may create automatically the missing lines).
Also, selecting more than one line, and clicking on Add only creates one line.

r0lZ
30th July 2010, 16:28
Well, I could add a global check for Jumps to Nowhere as the first step of Remove useless stuff or just before Delete Dead Commands, and issue a warning when there are jumps to nowhere, but as I have explained, it is not possible to check every command before processing them, because that's too slow.

frank
7th September 2010, 09:58
Hello r0lZ,
I want to set the sound on as standard in PgcEditPreview.exe.
It's very useful when I check the chapterpoints for noise.
How to do it?

I don't see a PgcEdit option at the options dialog menu.
Perhaps you can implement a button?

r0lZ
7th September 2010, 11:55
The Preview options are in the Preview menu.
Tick Preview -> Playback Mode -> Real Time With Audio, and select the option you prefer in Preview -> Default Audio Stream. If you tick "Based on Virtual Player Setup", be sure to set the right language code in the Player Setups for SPRM 16.

frank
7th September 2010, 21:45
Great! Never searched it there.
:thanks:

mikenadia
9th October 2010, 15:27
Cosmetics.
Straight from the rip (lines 2 to 5 of the pre-command highlighted in purple).
[20 04 00 00 00 00 00 02] 1 LinkPGCN PGC 2
[61 00 00 05 00 8D 00 00] 2 Set gprm(5) =(mov) sprm(13:Parental level)
[79 00 00 05 00 0F 00 00] 3 Set gprm(5) &=(and) 15 (preserve bits 0-3)
[20 C4 00 05 00 06 00 04] 4 if ( gprm(5) >= 6 ) then { LinkPGCN PGC 4 }
[71 00 00 05 00 00 00 00] 5 Set gprm(5) =(mov) 0
********** post commands:
[00 B1 00 05 00 01 00 03] 1 if ( gprm(5) != 1 ) then { Goto line 3 }
[00 03 00 00 00 00 08 04] 2 (SetTmpPML) Set parental level =(mov) 8, Goto line 4
[20 04 00 00 00 00 00 03] 3 LinkPGCN PGC 3
[20 04 00 00 00 00 00 04] 4 LinkPGCN PGC 4
********** cell commands:
After running "Remove useless stuff" and Killing Playback on two parental menus as part of running "Remove...".
(lines 2 to 7 of the pre-command highlighted in purple).
[20 04 00 00 00 00 00 02] 1 LinkPGCN PGC 2
[56 00 00 00 04 00 00 00] 2 (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1)
[71 00 00 05 00 01 00 00] 3 Set gprm(5) =(mov) 1
[00 B1 00 05 00 01 00 06] 4 if ( gprm(5) != 1 ) then { Goto line 6 }
[00 03 00 00 00 00 04 07] 5 (SetTmpPML) Set parental level =(mov) 4, Goto line 7
[20 06 00 00 00 00 00 02] 6 LinkPGN Program 2
[20 04 00 00 00 00 00 06] 7 LinkPGCN PGC 6
********** post commands:
[56 00 00 00 04 00 00 00] 1 (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1)
[71 00 00 05 00 01 00 00] 2 Set gprm(5) =(mov) 1
[00 B1 00 05 00 01 00 05] 3 if ( gprm(5) != 1 ) then { Goto line 5 }
[00 03 00 00 00 00 04 06] 4 (SetTmpPML) Set parental level =(mov) 4, Goto line 6
[20 06 00 00 00 00 00 02] 5 LinkPGN Program 2
[20 04 00 00 00 00 00 06] 6 LinkPGCN PGC 6
********** cell commands:

I was expecting the lines 2 to 7 to be removed. I understand that PGCEdit cannot try for every combination (gprm...) to see if those lines can be removed but I saw the them highlighted in purple. (I do not know the exact meaning of the purple highlighting . I did not find it in the Help file). Running " Remove..." another time does not remove them.

Thanks in advance.

r0lZ
9th October 2010, 18:43
You're right. PgcEdit should have removed the purple lines. (Purple is assigned to the "dead" lines: the lines that cannot be executed due to non-conditional jumps or gotos.)

I'm not sure why PgcEdit has not removed them. (The function that removes the dead lines is new and still not perfect, and I prefer to leave some dead lines than to remove useful ones!) Anyway, I will have a look. Thanks for the detailed example. :-)

r0lZ
9th October 2010, 23:10
Hum, I don't know how you did your tests, but on my system, PgcEdit has removed the dead commands correctly.
If you still have the files, can you try DVD -> Delete All Dead Commands alone?
Also, what version are you using?

mikenadia
10th October 2010, 02:25
I am using 9.3.0.1000 . The dead commands are deleted when using the "Delete Dead command" alone.
The problem arises when , in " Remove useless stuff", the Delete Dead command" is used in combination with "Remove useless menu VOB when possible". Then I am asked to Kill Playback on the two "Parental Mgt" menus (recognized as useless) and the "deleted command " reappear somehow.

After having done "Remove useless stuff" with only the "Delete Dead command" and "Remove useless menu VOB when possible" checked, I have
[20 04 00 00 00 00 00 02] 1 LinkPGCN PGC 2
[00 00 00 00 00 00 00 00] 2 NOP
[56 00 00 00 04 00 00 00] 3 (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1)
[71 00 00 05 00 01 00 00] 4 Set gprm(5) =(mov) 1
[00 00 00 00 00 00 00 00] 5 NOP
[00 B1 00 05 00 01 00 08] 6 if ( gprm(5) != 1 ) then { Goto line 8 }
[00 03 00 00 00 00 08 09] 7 (SetTmpPML) Set parental level =(mov) 8, Goto line 9
[20 04 00 00 00 00 00 03] 8 LinkPGCN PGC 3
[20 04 00 00 00 00 00 04] 9 LinkPGCN PGC 4

Thanks in advance.

Edit: after only doing "Remove useless menu VOBS, some dead commands are added (now, lines 2 to 13 are highlighted purple).
Actually, the lines 7 to 13 are added everytime I run "Remove useless menu VOBs", that is why they reappear if I run "Remove useless stuff " twice even I do not have any "Killing Playback" the second time.
And those lines are identical if I "kill Playback" on those two " Parental Mgt " PGCs straight from the rip (they are also dead commands).
********** pre commands:
[20 04 00 00 00 00 00 02] 1 LinkPGCN PGC 2
[61 00 00 05 00 8D 00 00] 2 Set gprm(5) =(mov) sprm(13:Parental level)
[79 00 00 05 00 0F 00 00] 3 Set gprm(5) &=(and) 15 (preserve bits 0-3)
[20 C4 00 05 00 04 00 02] 4 if ( gprm(5) >= 4 ) then { LinkPGCN PGC 2 }
[71 00 00 05 00 00 00 00] 5 Set gprm(5) =(mov) 0
[00 00 00 00 00 00 00 00] 6 NOP
[56 00 00 00 04 00 00 00] 7 (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1)
[71 00 00 05 00 01 00 00] 8 Set gprm(5) =(mov) 1
[00 00 00 00 00 00 00 00] 9 NOP
[00 B1 00 05 00 01 00 0C] 10 if ( gprm(5) != 1 ) then { Goto line 12 }
[00 03 00 00 00 00 04 0D] 11 (SetTmpPML) Set parental level =(mov) 4, Goto line 13
[20 06 00 00 00 00 00 02] 12 LinkPGN Program 2
[20 04 00 00 00 00 00 06] 13 LinkPGCN PGC 6

If, straight from the rip, I "kill Playback" on those two Parental Mgt" PGCs and then run "Remove Useless stuff" (with Remove useless menu VOBs ( the dead commands are still there).

r0lZ
10th October 2010, 11:52
OK, I think I understand. Delete Dead Commands works as expected, but as you can see, it is at the first position in the list of actions in Remove Useless Stuff. That means that it is executed first. Then the other actions are executed as well, and if the PGC needs to be killed, the post commands (and if necessary some button or cell commands) are copied to the pre-commands area again. (Kill PGC Playback doesn't verify if it copies useless commands, and that function is called indirectly by many other functions.) It's why the useless commands are added again. It's also why I have explained elsewhere that it might be necessary to run Remove Useless Stuff twice.

Sometimes, as in your example, a function of Remove Useless Stuff changes the DVD in such a way that it is possible to simplify it further. (Here, ) But if the function that could simplify it again has already been called, it is not called again during the procedure, and you need to relaunch Remove Useless Stuff (or one of its procedures) again. Unfortunately, it is not easy to determine the best order of the functions in Remove Useless Stuff, as it depends of the authoring of each DVD, and of what the user has made manually. Also, I have to take the duration of the actions in mind. For example, I like to leave Delete Dead Commands as the first function, as it suppresses sometimes some useless commands jumping to dead PGCs, and if I leave those commands before calling Delete Uncalled PGCs, the useless PGCs will not be removed because they will still be technically referenced (although by dead commands).

I could perhaps relaunch the whole Remove Useless Stuff procedure automatically, until there is nothing that can still be removed, but that would require some hard work for me, and that might be very slow. There is also a risk of infinite loop if, for some reason, it is not possible to remove everything that needs to be removed. So, currently, you have to relaunch the procedure yourself. Can you verify if that works well?

I just saw your edit now. It seems that "Remove useless menu VOBs" restores the useless commands each time any way. That's probably a little bug, as if the VOB is not needed, the post commands should be copied to the pre-command area the first time the command is run, then removed from the post-command area. If they are not removed, they are copied again the next time. Obviously, there is a bug here. I will have a look...

mpucoder
10th October 2010, 15:31
A simple way to repeat a process without the risk of an infinite loop is to use a flag which indicates if any changes were made by the process. Then execute the process until no changes have been made.

BOOL something_changed;

something_changed = TRUE; //to run the first pass
while (something_changed) {
something_changed = FALSE;
check_for_things_to_do();
}

or if the actions taken are so many that the while logic could get difficult to see when maintaining the code

BOOL something_changed;
//loop until no changes are made
loop: something_changed = FALSE;
.
.
.
if (something_changed) goto loop;

The difficult part here would be to add code for setting the flag at every possible change, but if one is missed the worst that can happen is the user need to rerun, there would be no danger of a hang.

r0lZ
10th October 2010, 17:02
Thanks mpucoder. I use already that logic in the loop that searches for uncalled PGCs, and it works fine. But Remove Useless Stuff is a global macro that calls several totally independent functions. Each of these functions will have to return the flag to the main macro, but some of them have already something to return. I will have to use global flags, and I don't like that too much. Furthermore, the fact that a function finds nothing to remove doesn't mean that it will not find something during the next run (as the conditions may have changed due to another function), and therefore I can't exclude it from the loop to simplify and speed things up.

Also, the risk of infinite loop is caused by the fact that a function could try to remove something, but fail. If the flag telling that something has been removed is set anyway, the loop will be repeated again and again.

I wonder if improving that already powerful macro is really necessary. Anyway, I will add a call to Delete Dead Commands (on the current PGC) at the end of Kill PGC Playback. So, the useless post-commands copied to the pre-command area will be removed immediately, and will not interfere with the other functions. That should at least solve the little bug reported by mikenadia.

r0lZ
11th October 2010, 10:55
OK, I did what I have suggested above. Now, Delete Dead Commands is called automatically after Kill PGC Playback (on the killed PGC only). This way, KillPGC playback no longer adds useless commands in the pre-command area. (The drawback is that it removes also the dead commands that were in the original pre-command area before the operation, but IMO, since the PGC is modified anyway, that doesn't matter much.)

Also, in Remove Useless Menu VOBs, PgcEdit should no longer consider a menu with button that leads to a dead end as useless. Previously, that kind of menu (that stops the navigation) was removed, but that might be a problem with parental management menus, as I suppose that sometimes that kind of menu is intentional. It might be normal to stop the navigation completely if the user is unable to provide the password to watch the DVD, after having displayed a menu that explains why the DVD will stop.
However, I don't know if that kind of parental management menu is frequent, and even if it exists, as here in Europe, it is extremely rare to find a DVD with parental management.
It is possible that the new logic will prevent to remove really useless menus in some cases, but I think it is dangerous to remove menus with buttons anyway (unless the PGC is uncalled of course). The user can manually kill it if he wish.

If someone can send me a good example of a parental management menu, I will be able to check what I did in real circumstances. Thanks in advance.

mikenadia
16th November 2010, 07:57
Different navigation between PGCedit and PowerDVD.
There is a gprm(15) set with sprm(preferred audio) so in PGCedit , I go to a menu that asks me to choose the preferred audio. I went to Virtual Player setup and put "en" in " Preferred audio language". It did not change anything.
By inserting " set gprm(15)=25966" in FPG-PC , both navigation are identical.

Thanks in advance.

r0lZ
16th November 2010, 09:44
Well, I don't understand the problem.

If you modify the language code of the "Preferred audio language" in the virtual player setup, you change the value of SPRM(16). That value cannot be modified by a nav command when the DVD is playing, so you can consider it as a constant.
If your DVD executes the command Set GPRM(15)=SPRM(16), then that value is transferred in GPRM(15). That works well in PgcEdit, I have just verified.
So, if you need to add the command Set GPRM(15)='en (which is identical to set gprm(15)=25966) in the FP-PGC, that means that the DVD does not execute the Set GPRM(15)=SPRM(16) when it should, or that that command has been modified or removed.

You can verify that PgcEdit is not responsible of the problem by changing the Set of the FP-PGC to Set GPRM(15)=SPRM(16). The result should be correct for any preferred audio language in the virtual player setup. It is preferable to use that command anyway, as the player will (theoretically) select the right audio language automatically. If you leave your command, it will select English, regardless of the setup.

So, IMO, you have found an authoring error: a missing Set command. I really don't understand why PowerDVD does not react like PgcEdit, but take in mind that there is no setup for most software players. They assume usually that the language of the Windows installation is what you want. That makes the software players useless to check if the right language is selected automatically.

BTW, I do not trust any software player, except the "Play DVD" of IfoEdit. Have you checked if IfoEdit does the same thing than PowerDVD?

mikenadia
16th November 2010, 13:49
Thank you. Solved.
The navigation required also "Preferred menu language" and " Preferred sub picture language "to be set up. If I put both of them to "en", PGCedit and PowerDVD act the same, so PowerDVD is "guessing" that they are probably set to "en" (my Windows language). It looks like that PowerDVD and IfoEdit act the same way.

Thanks a lot.

r0lZ
16th November 2010, 15:07
Thanks for the confirmation.
Maybe I'll need to set default values in the virtual player setup automatically when PgcEdit is launched for the first time, as some DVDs seem to dislike undefined language codes. But I have no precise way to find out what's the Windows installation language, and I don't want to force English by default. Anyway, a correctly authored DVD should always check if the language is not defined, and use reasonable defaults if it's the case. Unfortunately, there are exceptions. Your DVD is probably among them.

mpucoder
16th November 2010, 18:39
I can't remember if you use C++ or another language, but there is a round-about way to determine a window user's language. First get the locale identifier using GetUserDefaultLCID() (or you could use GetSystemDefaultLCID() if you want the system default instead). This gives you a number that can be cross referenced to a language and locale. The so-called LangID is in the lower word and can be isolated by simply casting the value to WORD or using LANGIDFROMLCID (which does the same thing). I found a fairly easy to read cross reference at http://www.pagedowntech.com/faq/faq.asp?faqid=21

It may seem overwhelming, but there is a way to simplify things. Only the lower 10 bits are used to define the language, bits above that define the sub-language, for example:
English ...9
English - Australia ...3081
English - Belize ...10249
English - Canada ...4105
English - Ireland ...6153
English - Jamaica ...8201
English - New Zealand ...5129
English - South Africa ...7177
English - Trinidad ...11273
English - United Kingdom ...2057
English - United States ...1033

After masking off the upper bits, or performing a mod 1024 operation, they all have the value of 9.

edit: I found an even easier to comprehend list at the Microsoft (http://msdn.microsoft.com/en-us/library/0h88fahh(VS.85).aspx) site. (I'm surprised)
Also This (http://www.google.com/url?q=http://download.microsoft.com/download/9/5/e/95ef66af-9026-4bb0-a41d-a4f81802d92c/%255BMS-LCID%255D.pdf&sa=U&ei=bcTiTJT9N4GB8gaVx5z_Dw&ved=0CBMQFjAC&usg=AFQjCNHIIbWaHswtUkdakIgTwQaAnwGYPg) may be more helpful. I am still searching the web for a pre-defined cross reference (that is an array definition of ISO 639-2 codes indexed by LangID)
Seems a lot of people have struggled with this, I even found a script to scan the registry key HKLM\Software\CLASSES\MIME\Database\Rfc1766 (which does list all the LangID codes in effect at the time of install and their ISO code)!

r0lZ
16th November 2010, 19:01
Thanks, but unfortunately, I can't call directly Windows functions, because Tcl/Tk is a cross-platform language. Perhaps I can read the information in the registry? Anyway, I will have to find another method under Linux.
Maybe I'll just add a warning in the trace log when the trace is started and the language SPRMs are not defined. Much easier! :-)