Preview from BDMV folder so the BD-J menu Xlet actually loads

The disc structure, signed JAR, and video are all valid. The menu never
appeared because 'make run' opened the UDF .iso: libbluray's BD-J stack must
copy BDMV/JAR/00000.jar out of the image into /tmp/libbluray-bdj-cache before
the JVM can load it, and that write is refused by libbluray's BD-J
SecurityManager (usingUdf=true / no disc root). With no JAR mounted the Xlet
class isn't found (ClassNotFoundException: org.homebrew.MyXlet) and VLC falls
back to the raw playlist -> video, no menu.

Opening the build/disc BDMV folder instead lets libbluray read the JAR
directly, so the Xlet loads and the menu overlay runs. The ISO is still built
for burning; real players read the JAR from the disc filesystem directly.

- run-vlc.sh: default to build/disc, accept folder or .iso, add --bluray-menu
- Makefile: 'run' depends on the disc folder, not the ISO
- README: document the folder-vs-ISO libbluray caveat

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
happy 2026-08-25 14:57:31 -04:00
parent 9c88b8f7f6
commit 48c172cb80
3 changed files with 42 additions and 10 deletions

View file

@ -29,13 +29,22 @@ The ISO is written to:
build/adjustments.iso
```
`make run` launches VLC through the Blu-ray access module, not as a generic
media file:
`make run` previews the disc by pointing VLC's Blu-ray access module at the
`build/disc` BDMV **folder**, not the ISO:
```sh
vlc bluray:///absolute/path/to/build/adjustments.iso
vlc --bluray-menu bluray:///absolute/path/to/build/disc
```
Why the folder and not the ISO: when libbluray opens a UDF `.iso`, its BD-J
runtime must copy `BDMV/JAR/00000.jar` out of the image into a temp cache dir
before the JVM can load it. On this setup that write is refused by libbluray's
BD-J `SecurityManager`, so the Xlet class is never found and VLC silently falls
back to playing the raw playlist with no menu. Reading the folder lets
libbluray load the JAR directly, so the menu Xlet runs. The ISO is still the
artifact you burn/distribute; real players read the JAR from the disc
filesystem directly and are unaffected.
The initial menu is a Java Xlet overlay with a few bonus-feature placeholders
and a hidden menu stub. The actual generated video is a short ffmpeg SMPTE bars
pattern with AC-3 audio, authored as playlist `00000`.