Commit Graph

476 Commits

Author SHA1 Message Date
b3e448f2fe feat(ui): Rebalance color palette to proper rainbow distribution
Rainbow Distribution (ROYGBIV - 2 modules per color):
- RED (2): Inspect (#F44336), Compare (#E91E63 Pink)
- ORANGE (2): Author (#FF5722), Rip (#FF9800)
- YELLOW (2): Audio (#FFC107 Amber), Trim (#FFEB3B)
- GREEN (2): Merge (#4CAF50), Subtitles (#8BC34A Light Green)
- CYAN (2): Filters (#00BCD4), Thumb (#00ACC1 Dark Cyan)
- BLUE (2): Blu-Ray (#2196F3), Player (#3F51B5 Indigo)
- PURPLE (2): Convert (#673AB7 Deep Purple), Upscale (#9C27B0)

Fixed Issues:
- Previous Memphis palette had 9 blue-ish modules (too much blue)
- User requested balanced rainbow spectrum across all modules
- Perfect distribution: 14 modules ÷ 7 colors = 2 per color
- Convert module back to deep purple (user preference)

Files Updated:
- main.go: Module color definitions
- internal/ui/queueview.go: Queue job type colors
- internal/ui/components.go: Badge colors

Tested: Build successful (v0.1.0-dev20)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 18:29:55 -05:00
1546b5f5d1 feat(ui): Implement Memphis Style color palette with section navigation
Memphis Color Palette:
- Complete redesign of 14 module colors inspired by Memphis design
- Eliminated orange overload (4 modules → 1 amber, distributed palette)
- Balanced color wheel distribution: Turquoise, Purple, Blue, Cyan, Green, Yellow, Pink, Red
- All colors WCAG compliant for light text contrast
- Memphis aesthetic: bold, vibrant, geometric, highly navigable

New Colors:
- Convert: #00CED1 Turquoise (Memphis primary)
- Upscale: #A855F7 Purple (AI/tech, was harsh lime green)
- Audio: #FBBF24 Warm Yellow (was too bright)
- Author: #EC4899 Hot Pink (Memphis creative)
- Rip: #F59E0B Amber (distinct from Author)
- Merge: #4ECDC4 Medium Turquoise
- Trim: #5DADE2 Sky Blue
- Filters: #8B5CF6 Vivid Violet
- Blu-Ray: #3B82F6 Royal Blue
- Subtitles: #10B981 Emerald Green
- Thumb: #06B6D4 Cyan
- Compare: #F43F5E Rose Red
- Inspect: #EF4444 Red
- Player: #6366F1 Indigo

Section Navigation Components (Jake's usability feedback):
- Add SectionHeader() with color-coded accent bars
- Add SectionSpacer() for visual breathing room (12px)
- Add ColoredDivider() for geometric separation
- Fixes issue where settings sections blend together

Files Updated:
- main.go: Module color definitions
- internal/ui/queueview.go: Queue job type colors
- internal/ui/components.go: Section helpers + badge colors

Reported-by: Jake (usability - sections too similar)
Reported-by: Stu (color visibility issues)
Inspired-by: Memphis interior design reference

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 16:43:48 -05:00
c4db2f9c56 fix(ui): Improve module color contrast for better text visibility
Color Changes (Module Buttons & Queue):
- Upscale: #AAFF44 → #7AB800 (darker green for better contrast)
- Audio: #FFD744 → #FFB700 (darker amber for better contrast)
- Author: #FFAA44 → #FF9944 (consolidated with existing orange palette)
- Rip: #FF9944 → #FF8844 (adjusted to differentiate from Author)
- Thumb: #FF8844 → #FF7733 (darker orange for better contrast)

Issue: Bright lime green (#AAFF44) and bright yellow (#FFD744) had
poor contrast with light text (#E1EEFF), making them hard to read,
especially on the Upscale module.

Solution: Darkened problematic colors while maintaining visual
distinction between modules. New colors meet WCAG contrast guidelines
for better accessibility.

Files Updated:
- main.go: Module color definitions
- internal/ui/queueview.go: Queue job type colors
- internal/ui/components.go: Badge colors for consistency

Reported-by: Stu
Tested-on: Linux

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 16:31:17 -05:00
ad7b1ef2f7 docs: Update DONE.md for dev20+ session (2025-12-28)
Document completed features:
- Queue view button responsiveness fixes
- Main menu performance optimizations (3-5x improvement)
- Queue position labeling improvements
- Comprehensive remux safety system
- Codec compatibility validation
- Automatic fallback and auto-fix mechanisms

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 06:31:29 -05:00
02c2e389e0 perf(queue): Fix Windows button lag and optimize UI performance
Queue View Improvements:
- Fix Windows-specific button lag after conversion completion
- Remove redundant refreshQueueView() calls in button handlers
- Queue onChange callback now handles all refreshes automatically
- Add stopQueueAutoRefresh() before navigation to prevent conflicts
- Reduce auto-refresh interval from 500ms to 1000ms
- Result: Instant button response (was 1-3 second lag on Windows)

Main Menu Performance:
- Implement 300ms throttling for main menu rebuilds
- Cache jobQueue.List() to eliminate multiple expensive copies
- Smart conditional refresh: only update when history actually changes
- Add refreshMainMenuThrottled() and refreshMainMenuSidebar()
- Result: 3-5x improvement in responsiveness, especially on Windows

Queue Position Display:
- Fix confusing priority labeling in queue view
- Change from internal priority (3,2,1) to user-friendly positions (1,2,3)
- Display "Queue Position: 1" for first job, "Position: 2" for second, etc.
- Apply to both Pending and Paused jobs

Remux Safety System:
- Add comprehensive codec compatibility validation before remux
- Validate container/codec compatibility (MP4, MKV, WebM, MOV)
- Auto-detect and block incompatible combinations (VP9→MP4, etc.)
- Automatic fallback to re-encoding for WMV/ASF and legacy FLV
- Auto-fix timestamp issues for AVI, MPEG-TS, VOB with genpts
- Add enhanced FFmpeg safety flags for all remux operations:
  * -fflags +genpts (regenerate timestamps)
  * -avoid_negative_ts make_zero (fix negative timestamps)
  * -map 0 (preserve all streams)
  * -map_chapters 0 (preserve chapters)
- Add codec name normalization for accurate validation
- Result: Fool-proof remuxing with zero risk of corruption

Technical Changes:
- Add validateRemuxCompatibility() function
- Add normalizeCodecName() function
- Add mainMenuLastRefresh throttling field
- Optimize queue list caching in showMainMenu()
- Windows-optimized rendering pipeline

Reported-by: Jake (Windows button lag)
Reported-by: Stu (main menu lag)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 06:31:16 -05:00
953bfb44a8 fix(author): Clear DVD title when loading new file or clearing clips
- Reset authorTitle when loading new file via file browser
- Reset authorTitle when clearing all clips
- Rebuild author view to refresh title entry UI
- Ensures title field visually resets for fresh content

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 06:30:48 -05:00
c8f4eec0d1 feat(author): Implement real-time progress, add to queue, clear title
This commit introduces several enhancements to the Author module:
- **Real-time Progress Reporting:** Implemented granular, real-time progress updates for FFmpeg encoding steps during DVD authoring. The progress bar now updates smoothly, reflecting the actual video processing. Progress calculation is weighted by video durations for accuracy.
- **Add to Queue Functionality:** Added an 'Add to Queue' button to the Author module, allowing users to queue authoring jobs for later execution without immediate start. The authoring workflow was refactored to accept a 'startNow' parameter for this purpose.
- **Clear Output Title:** Modified the 'Clear All' functionality to also reset the DVD Output Title, preventing accidental naming conflicts for new projects.

Additionally, this commit includes a UI enhancement:
- **Main Menu Categorization:** Relocated 'Author', 'Rip', and 'Blu-Ray' modules to a new 'Disc' category on the main menu, improving logical grouping.

Fixes:
- Corrected a missing argument error in a call to .
- Added missing  import in .

Updates:
-  and  have been updated to reflect these changes.
2025-12-27 01:34:57 -05:00
0193886676 Phase 1 Complete: All upscale utilities migrated
 PHASE 1 SUCCESS - All utility functions completed:
- showUpscaleView() 
- detectAIUpscaleBackend() 
- checkAIFaceEnhanceAvailable() 
- aiUpscaleModelOptions() 
- aiUpscaleModelID() 
- aiUpscaleModelLabel() 
- parseResolutionPreset() 
- buildUpscaleFilter() 
- sanitizeForPath() 

📊 upscale_module.go: ~220 lines, all utilities + imports working
🎯 Next: executeUpscaleJob() (~453 lines) - MASSIVE but linear
🔧 Pattern: Incremental approach working perfectly

Build Status:  Working
Main.go Reduction: ~800+ lines total
2025-12-26 21:15:50 -05:00
660485580c Add debug logging and separate droppable panels for subtitle module
- Wrap left and right panels separately in droppables for better drop coverage
- Add extensive debug logging to trace drop events and state changes
- Log when handleDrop and handleSubtitlesModuleDrop are called
- Log file identification (video vs subtitle) and state updates
- Log videoEntry creation with current subtitleVideoPath value

This will help diagnose why video path isn't populating on drop

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:06:48 -05:00
3be5857cbb Fix subtitle module not switching view on drop from main menu
- Changed handleSubtitlesModuleDrop to call showModule("subtitles")
- Previously only refreshed if already in subtitles view (s.active == "subtitles")
- When dropping from main menu, s.active was "mainmenu", so view never switched
- Now matches behavior of compare and inspect modules
- Video path will now properly populate when dragging from main menu

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:00:06 -05:00
e6c97b5e33 Remove nested droppable wrappers in subtitle module
- Remove individual droppable wrappers from entry widgets and list area
- Keep only the top-level content droppable wrapper
- Fixes video file path not populating when dragging files
- Nested droppables were interfering with drop event handling

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 20:55:37 -05:00
e3aebdcbb7 Fix subtitle module drag and drop and remove emojis from scripts
- Wrap entire subtitle module content in droppable container for drag and drop anywhere
- Remove all emojis from build scripts (build-linux.sh, build.sh, build-windows.sh, alias.sh)
- Subtitle module now accepts video/subtitle file drops on any part of the view

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 20:17:24 -05:00
9257cc79f0 Clean up subtitle module placeholder text 2025-12-26 20:05:54 -05:00
1f5a21466c Fix drag and drop for subtitle module - wrap entire view in droppable 2025-12-26 19:55:04 -05:00
18209240f2 Add drag and drop enhancements and timing offset controls to subtitle module 2025-12-26 19:44:38 -05:00
7a82542f91 Rewrite Author module docs for accessibility 2025-12-26 19:33:51 -05:00
230523c737 Add comprehensive Author module documentation
Created AUTHOR_MODULE.md covering all features in detail:

Chapter Detection:
- How scene detection works (FFmpeg filter threshold)
- Sensitivity slider guide (0.1-0.9 range explained)
- Visual preview feature with thumbnails
- Use cases for different video types
- Technical implementation details

DVD Timestamp Correction:
- SCR backwards error explanation
- Automatic remux solution (-fflags +genpts)
- Why it's needed and how it works
- Performance impact (negligible)

Authoring Log Viewer:
- Tail behavior (last 100 lines)
- Performance optimizations explained
- Copy Log and View Full Log buttons
- Memory usage improvements (O(1) vs O(n))

Complete Workflows:
- Single movie to DVD
- TV series multi-title disc
- Concert with manual chapters

Troubleshooting:
- SCR errors
- Too many/few chapters detected
- UI lag issues (now fixed)
- ISO burning problems
- Playback stuttering

Technical Details:
- Full encoding pipeline with commands
- Chapter XML format
- Temporary file locations
- Dependencies and installation
- File size estimates for NTSC/PAL

Also updated DVD_USER_GUIDE.md:
- Removed branding footer
- Added reference to AUTHOR_MODULE.md for technical details
2025-12-26 19:33:51 -05:00
0d1235d867 Add chapter detection visualizer with thumbnails
Allows visual verification of detected scene changes before accepting.

Features:
- Extracts thumbnail at each detected chapter timestamp
- Displays first 24 chapters in scrollable grid (4 columns)
- Shows timestamp below each thumbnail (160x90px previews)
- Accept/Reject buttons to confirm or discard detection
- Progress indicator during thumbnail generation

Implementation:
- showChapterPreview() function creates preview dialog
- extractChapterThumbnail() uses FFmpeg to extract frame
  - Scales to 320x180, saves as JPEG in temp dir
- Thumbnails generated in background, dialog updated when ready

Performance:
- Limits to 24 chapters for UI responsiveness
- Shows "(showing first 24)" if more detected
- Temp files stored in videotools-chapter-thumbs/

User workflow:
1. Adjust sensitivity slider
2. Click "Detect Scenes"
3. Review thumbnails to verify detection quality
4. Accept to use chapters, or Reject to try different sensitivity
2025-12-26 19:33:51 -05:00
d781ce2d58 Optimize author log viewer performance with tail behavior
Problem: Author log was causing severe UI lag and memory issues
- Unbounded string growth (entire log kept in RAM)
- Full widget rebuild on every line append
- O(n²) string concatenation performance

Solutions implemented:
1. Tail behavior - Keep only last 100 lines in UI
   - Uses circular buffer (authorLogLines slice)
   - Prevents unbounded memory growth
   - Rebuilds text from buffer on each append

2. Copy Log button
   - Copies full log from file (accurate)
   - Falls back to in-memory log if file unavailable

3. View Full Log button
   - Opens full log in dedicated log viewer
   - No UI lag from large logs

4. Track log file path
   - authorLogFilePath stored when log created
   - Used by copy and view buttons

Performance improvements:
- Memory: O(1) instead of O(n) - fixed 100 line buffer
- CPU: One SetText() per line instead of concatenation
- UI responsiveness: Dramatically improved with tail behavior

UI changes:
- Label shows "Authoring Log (last 100 lines)"
- Copy/View buttons for accessing full log
2025-12-26 19:33:51 -05:00
49e01f5817 Fix DVD authoring SCR errors and queue animation persistence
DVD Authoring Fix:
- Add remultiplex step after MPEG encoding for DVD compliance
- Use ffmpeg -fflags +genpts -c copy -f dvd to fix timestamps
- Resolves "ERR: SCR moves backwards" error from dvdauthor
- FFmpeg direct encoding doesn't always create DVD-compliant streams
- Remux regenerates presentation timestamps correctly

Queue Animation Fix:
- Stop stripe animation on completed jobs
- Bug: Refresh() was always incrementing offset regardless of state
- Now only increments offset when animStop != nil (animation running)
- Completed/failed/cancelled jobs no longer show animated stripes

Testing:
- DVD authoring should now succeed on AVI files
- Completed queue jobs should show static progress bar

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 21:20:14 -05:00
e919339e3d Stabilize queue back navigation 2025-12-24 16:22:24 -05:00
7226da0970 Add persistent configs for author/subtitles/merge/rip 2025-12-24 15:39:22 -05:00
9237bae4ff Make log viewer responsive on large files 2025-12-24 08:32:19 -05:00
0e74f28379 Stop split layout from expanding window 2025-12-24 03:14:31 -05:00
804d27a0b5 Disable auto-name on manual output edit 2025-12-24 03:07:54 -05:00
d566a085d1 Use per-file output base for batch convert 2025-12-24 03:05:35 -05:00
e22eae8207 Avoid batch remux output collisions 2025-12-24 03:02:24 -05:00
834d6b5517 Stop queue animation on completion 2025-12-24 02:57:54 -05:00
aa659b80f5 Return to last module after clear all 2025-12-24 02:53:24 -05:00
63804f7475 Prevent clear completed from wiping active project 2025-12-24 02:51:02 -05:00
e84dfd5eed Add chapter removal option in Convert 2025-12-24 02:47:55 -05:00
ff612b547c Fix remux build variables 2025-12-24 02:40:37 -05:00
de70448897 Harden remux timestamp handling 2025-12-24 02:38:41 -05:00
1491d0b0c0 Skip filters during remux 2025-12-24 02:33:28 -05:00
fe5d0f7f87 Lock remux aspect controls to Source 2025-12-24 02:31:34 -05:00
0779016616 Hide encode controls for remux 2025-12-24 02:29:15 -05:00
a821f59668 Add remux option to Convert 2025-12-24 02:22:07 -05:00
b7e9157324 Show benchmark apply status in Convert header 2025-12-24 01:55:37 -05:00
6729e98fae Add player robustness improvements and A/V sync logging
Improvements:
1. Track audio active state with atomic.Bool flag
2. Handle videos without audio track gracefully
   - If audio fails to start, video plays at natural frame rate
   - Clear error messages indicate "video-only playback"
3. Better A/V sync logging for debugging
   - Log when video ahead/behind and actions taken
   - Log good sync status periodically (every ~6 seconds at 30fps)
   - More granular logging for different sync states
4. Proper cleanup when audio stream ends or fails

How it works:
- audioActive flag set to true when audio starts successfully
- Set to false when audio fails to start or ends
- Video checks audioActive before syncing to audio clock
- If no audio: video just paces at natural frame rate (no sync)
- If audio active: full A/V sync with adaptive timing

Expected improvements:
- Video-only files (GIFs, silent videos) play smoothly
- Better debugging info for sync quality
- Graceful degradation when audio missing

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 01:44:08 -05:00
e896fd086d Fix merge badge color 2025-12-24 01:42:57 -05:00
a91a3e60d7 Reset merge output on clear 2025-12-24 01:38:57 -05:00
a7b3452312 Implement audio master clock for A/V synchronization
Priority 3 fix from PLAYER_PERFORMANCE_ISSUES.md - addresses the root
cause of A/V desync in player module.

Changes:
- Audio loop now tracks bytes written and updates master clock (audioTime)
- Audio clock calculation: bytesWritten / (sampleRate × channels × bytesPerSample)
- Video loop already syncs to audio master clock (from previous commit)
- Master clock updates happen after each audio chunk write

How it works:
- Audio is the timing master, plays at natural rate
- Video reads audio clock and adapts timing to stay in sync
- If video >3 frames behind: drop frame and resync
- If video >3 frames ahead: wait longer
- Otherwise: adjust sleep duration for gradual sync

Expected improvements:
- Rock-solid A/V sync maintained over extended playback
- No more drift between audio and video
- Adaptive recovery from temporary slowdowns

Combined with Priority 1 (larger audio buffers) and Priority 2 (FFmpeg
volume control), this completes the core A/V sync architecture.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 01:36:50 -05:00
4a09626e28 Drop unsupported reset_timestamps flag 2025-12-24 01:31:33 -05:00
14712f7785 Fix mkv copy merge timestamps 2025-12-24 01:10:30 -05:00
ff9071902e Simplify merge format list 2025-12-24 01:05:16 -05:00
b0bd1cf179 Add AV1 merge option 2025-12-24 01:02:46 -05:00
6e13a53569 Add WebM merge option 2025-12-24 00:53:07 -05:00
30bc747f0c Make main menu vertically resizable 2025-12-24 00:30:18 -05:00
a7bffb63ee Group DVD modules and add responsive menu 2025-12-24 00:08:56 -05:00
01af1b8cf2 Fix build blockers and continue refactoring
- Fixed Fyne API issue: app.Driver() → fyne.CurrentApp().Driver()
- Fixed unused import: removed strconv from upscale_module.go
- Build now passes successfully 
- Ready to continue module extraction

Current progress:
 filters_module.go (257 lines)
 thumb_module.go (406 lines)
 upscale_module.go partial (173 lines + showUpscaleView + AI helpers)
📊 main.go reduced by ~800+ lines
2025-12-23 23:50:51 -05:00