Commit Graph

11 Commits

Author SHA1 Message Date
9afe4251df fix(author): remove quotes from fontfile and font paths in FFmpeg filter
Fixed FFmpeg filter parsing error by removing single quotes from font
paths and properly escaping special characters instead.

The Bug:
FFmpeg's drawtext filter was failing because fontfile paths were wrapped
in single quotes, which conflicted with the filter expression parsing:
  drawtext=fontfile='/path/to/font.ttf':text='Some Text'
                    ^                ^      ^          ^
                    These quotes broke FFmpeg's parser!

Error was:
  [AVFilterGraph] No option name near ' I Fucked My Best…'
  Error parsing filterchain ... around:

The Fix:
Before: fontfile='/home/.../IBMPlexMono-Regular.ttf'
After:  fontfile=/home/.../IBMPlexMono-Regular.ttf (with : and ' escaped)

Now we:
1. Escape : as \: (FFmpeg filter requirement)
2. Escape ' as \' (FFmpeg filter requirement)
3. Don't wrap in quotes (FFmpeg doesn't need them)

Same fix applied to font= paths (system fonts).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 02:02:59 -05:00
7c4bae1e2a fix(author): remove quotes from scale expression in menu logo filter
Fixed FFmpeg filter parsing error by removing unnecessary single quotes
from the scale expression in resolveMenuLogoScaleExpr.

The Bug:
FFmpeg command was failing with "Error parsing filterchain" because
the scale expression had quotes around the min() functions:
  scale=w='min(iw*0.50,180)':h='min(ih*0.50,120)'
                ^^^^^^^^^^^^        ^^^^^^^^^^^^
FFmpeg's filter parser doesn't expect quotes here and treats them as
part of the option value, breaking the parsing.

The Fix:
  Before: scale=w='min(iw*%.2f,%.0f)':h='min(ih*%.2f,%.0f)'
  After:  scale=w=min(iw*%.2f,%.0f):h=min(ih*%.2f,%.0f)

Error was:
  [AVFilterGraph] No option name near ' I Fucked My Best…'
  [AVFilterGraph] Error parsing filterchain around: ,180)':h='min...
  exit status 234

Now the scale expression is parsed correctly and menu generation
should complete successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 01:54:47 -05:00
863d92dca4 fix(author): pass logFn through all menu generation functions
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.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 01:46:01 -05:00
743a6ab82f fix(author): improve DVD menu font fallback to prevent FFmpeg 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.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 01:22:05 -05:00
ea7cfbbf6a Clamp menu logo scale and add preview 2026-01-06 23:42:14 -05:00
514f1a0475 Fix menu theme type and add openURL helper 2026-01-06 21:09:50 -05:00
46d8bd0f93 Add DVD menu tab with theme and logo controls 2026-01-06 21:04:58 -05:00
Stu Leak
0b1cf8eb19 fix: remove duplicate code and syntax errors
- Remove orphaned closing brace in author_menu.go
- Remove duplicate code sections in main.go
- Fix non-declaration statements outside function body
- Ensure clean compilation with no syntax errors
- Complete UnifiedPlayerAdapter integration cleanup
2026-01-06 18:36:07 -05:00
Stu Leak
10b605464c fix: resolve syntax errors in author_menu.go and main.go
- 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
2026-01-06 18:14:07 -05:00
Stu Leak
222e2f1414 feat: Implement DVD menu templating system
- 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
2026-01-06 17:42:51 -05:00
Stu Leak
852e2cd5c1 Add VT-styled DVD menu generation 2026-01-04 18:44:21 -05:00