Fixed menu generation logging by threading logFn parameter through all
menu building functions. Previously, all menu FFmpeg commands were
called with logFn=nil, so errors were never logged.
Functions updated to accept and pass logFn:
- buildMenuBackground
- buildDarkMenuBackground
- buildPosterMenuBackground
- buildMenuOverlays
- buildMenuOverlay (helper)
- buildMenuMPEG
All three menu templates now properly log:
- SimpleMenu.Generate() → buildMenuBackground → runCommandWithLogger
- DarkMenu.Generate() → buildDarkMenuBackground → runCommandWithLogger
- PosterMenu.Generate() → buildPosterMenuBackground → runCommandWithLogger
Before:
- Menu FFmpeg commands run silently (logFn=nil)
- Errors not logged → "ERROR: FFmpeg failed during DVD encoding"
- No way to diagnose what failed
After:
- >> /usr/bin/ffmpeg [full command with args]
- ERROR starting command: [error details]
- ERROR command failed: [error] (exit code: X)
Combined with the previous commit's enhanced runCommandWithLogger,
we now have complete visibility into menu generation failures.
The menu generation was failing because it tried to use "IBM Plex Mono"
font which isn't universally available. FFmpeg's drawtext filter would
fail silently when the font didn't exist.
Changes:
- Check if FontPath actually exists before using it (os.Stat check)
- Only use FontName if it's a known universally available font
- Whitelist of safe fonts: DejaVu, Liberation, Free fonts
- Ultimate fallback: "monospace" (most universally available)
Before:
- Tried IBM Plex Mono (not installed) → FFmpeg fails → "ERROR: FFmpeg failed during DVD encoding"
After:
- Tries IBM Plex Mono font file → doesn't exist
- Checks if "IBM Plex Mono" is in safe list → not in list
- Falls back to "monospace" → works everywhere
This fixes the cryptic "FFmpeg failed during DVD encoding" error that
actually occurred during menu generation, not encoding.
- Fix unterminated string in author_menu.go line 418
- Fix invalid escape sequences in escapeDrawtextText function
- Remove orphaned code outside function body in main.go
- Fix extra parentheses causing syntax errors
- Ensure clean compilation for successful build
- Refactor author_menu.go to support multiple menu templates
- Add Simple, Dark, and Poster menu templates
- Add UI for selecting menu template and background image