How to Use PgcEdit to Fix DVD Playability Issues

PgcEdit Tutorial: Editing Menus, Chapters, and Commands

PgcEdit is a powerful, free tool for inspecting and editing DVD and Blu-ray program chains (PGCs), menus, chapter points, and VM commands. This tutorial walks through common tasks: opening a project, examining structure, editing chapters, modifying menus, and adjusting VM commands. Assumed platform: Windows (interface and file locations may vary on Linux/Wine).

1. Get started: open your DVD/Blu-ray structure

  1. Install PgcEdit and supported tools (IfoEdit optional, and a backup of your VIDEO_TS / BDMV folders).
  2. Launch PgcEdit and choose File → Open DVD folder (or File → Open IFO/VOBS).
  3. Select the VIDEO_TS folder (or specific IFO). PgcEdit will parse titles, programs, and menus and show the Titlesets / VTS list.

2. Understand the interface

  • Titleset list: Shows VTS numbers and Title PGCs (main titles and menu PGCs).
  • PGC window: Displays program chains (PGCs) and cells with their playback order and lengths.
  • VM Commands pane: Where Pre, Post, and Cell commands are shown and edited (DVD VM language).
  • Navigation buttons: Step through commands, view flow, and preview action targets.

3. Inspecting structure

  1. Select a Titleset (VTS) and a PGC to view its programs and cells.
  2. Check cell durations, program map, and what each program points to (cells or commands).
  3. Use “View Timeline” or program listing to map chapters to specific cells.

4. Editing chapters (chapter points)

  1. Identify the PGC containing the title you want to change.
  2. To add a chapter at a specific time:
    • Select the target cell and choose Edit → Create Program/Chapter (or use the “Split cell” option).
    • Enter the split point (timecode) or cell offset. PgcEdit will create a new cell and adjust program mapping.
  3. To move or rename chapter marks:
    • Adjust the program-to-cell mapping so desired cells correspond to chapter numbers.
    • Update the chapter titles externally (authoring tools handle visible chapter names—PgcEdit adjusts structural markers only).
  4. To delete a chapter: merge adjacent cells/programs by deleting the desired program entry and updating map. Confirm durations and navigation are correct.

5. Editing menus

  1. Identify the Menu PGC (usually flagged as Menu PGC).
  2. Inspect Menu VM commands in the Pre-Command or Post-Command areas—these control button highlight, navigation, and link targets.
  3. To change a button’s target:
    • Find the VM command that uses the GOTO or CALL instruction pointing to a Program/Title.
    • Edit the command target to the desired PGC/program/cell index. Use the built‑in target selector where available.
  4. To change default button highlight or selection:
    • Modify the PRE or POST command to use the appropriate BUTTON or SELECT command.
  5. To remove an unwanted forced menu loop or auto-play:
    • Look for commands like GOTO TTITLE or GOTO PGC and edit or remove them. Ensure there’s still a sensible navigation path for remote control.

6. Editing VM commands (DVD Virtual Machine)

  1. VM commands are structured lines like: #0: PRE (commands…) or CELL (commands…).
  2. Common commands:
    • GOTO [TTITLE/PGC/CELL] — jump to a title, PGC, or cell.
    • CALL — jump to a subroutine PGC.
    • RETURN — return from CALL.
    • SET/CLR — set or clear registers or flags.
    • BUTTON/SETPRG/SETPGC — control menu buttons and program mapping.
  3. To edit a command:
    • Double-click the command line or use Edit → VM Editor.
    • Use the opcode dropdown and fill arguments; PgcEdit validates targets where possible.
  4. Test logical flow by stepping through commands with the VM debugger to ensure no infinite loops or broken jumps.

7. Common fixes and tips

  • Fix broken links: Replace incorrect GOTO/CALL targets with correct PGC/program/cell indices.
  • Remove forced trailers/ads: Locate the pre-menu PGC that plays trailers and either bypass it (change first-play GOTO) or edit commands to jump straight to the main menu.
  • Repair chapter timing issues: Split or merge cells carefully; always verify durations and navigation.
  • Backup before changes: Always work on a copy of VIDEO_TS/BDMV to avoid data loss.
  • Keep numbering consistent: After edits, re-run any authoring checks or preview in a DVD player emulator.

8. Save and test

  1. After edits, use File → Save (or Save As) to write modified IFO/IFO files. PgcEdit may prompt to update VOBs/IFO pairs—follow prompts.
  2. Rebuild the ISO or copy the modified folder to test on a player or emulator (e.g., VLC, a standalone DVD player, or a set-top box).
  3. Verify menus, chapter points, and navigation work as intended on actual hardware when possible.

9. Troubleshooting

  • If the disc won’t play after edits, revert to backup and reapply changes incrementally to isolate issues.
  • Use the VM step debugger to locate the command causing an unexpected jump or loop.
  • Ensure cell sizes and mapping remain aligned with VOB file boundaries—avoid fractional cell edits that conflict with VOB structure.

10. Further learning resources

  • Consult PgcEdit’s built-in help and forums for opcode references and examples.
  • Review DVD-Video VM language guides for deeper command semantics.
  • Practice on small test discs before editing important projects.

Final notes: PgcEdit edits structure and VM commands but does not visually edit menu graphics—use authoring software (e.g., DVDAuthor, Scenarist) for graphic changes. Always keep backups and test after each change.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *