Commit Graph

342 Commits

Author SHA1 Message Date
03e036be51 Update output filename preview in real-time when toggling suffix
- Output hint now updates immediately when checking/unchecking suffix checkbox
- User can see "video.mp4" vs "video-convert.mp4" change live
- Improves UX by providing instant visual feedback

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 16:06:10 -05:00
19739b0fab Make "-convert" suffix optional with checkbox (off by default)
- Added AppendSuffix bool field to convertConfig (default: false)
- By default, output filename matches source filename exactly
- Added checkbox "Append \"-convert\" to filename" (unchecked by default)
- Checkbox appears in both Simple and Advanced modes
- Eliminates noise when doing batch conversions
- Auto-naming still works and respects the suffix setting

Before: video.mp4 → video-convert.mp4 (always)
After: video.mp4 → video.mp4 (or video-convert.mp4 if checked)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 13:03:54 -05:00
de81c9f999 Add clear completed button to all module top bars
- Added clearCompletedJobs() method to appState in main.go
- Clears only completed and failed jobs, keeps pending/running/paused
- Added small ⌫ (backspace) icon button next to View Queue in all modules
- Button has LowImportance styling to keep it subtle
- Implements Jake's suggestion for quick queue cleanup

Modules updated:
- Convert (main.go)
- Author (author_module.go)
- Subtitles (subtitles_module.go)
- Rip (rip_module.go)
- Filters (filters_module.go)
- Thumbnails (thumb_module.go)
- Inspect (inspect_module.go)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 22:02:35 -05:00
16767a5ca6 refactor(ui): Reorganize metadata into compact two-column layout
- Replaced single-column Form widget with two-column grid layout
- Created makeRow helper for compact key-value pairs
- Left column: File, Format, Resolution, Aspect, Duration, FPS, etc.
- Right column: Codecs, Bitrates, Pixel Format, Channels, etc.
- More efficient use of space, matches modern UI design
- Text truncation prevents overflow

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 12:19:15 -05:00
3645291988 refactor(ui): Remove benchmark indicator from Convert module top bar
- Removed benchmark status display and apply button from top bar
- Cleaner UI matching mockup design
- Benchmark functionality still accessible via Settings menu
- Reduces visual clutter in Convert module

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 12:15:27 -05:00
4c4d436a66 feat(benchmark): Respect user quality preference when applying recommendations
- Check if user has "slow" or "slower" preset before applying benchmark
- Upgrade benchmark preset to "slow" if user prefers quality
- Prevents benchmark from forcing fast presets on quality-focused users
- Logs quality preference detection for debugging

Fixes issue where benchmark kept switching to fast encoding despite
user preference for higher quality output.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 02:34:22 -05:00
e0fc69ab97 feat(ui): Add distinct color for Remux format
- Added ColorRemux (#06B6D4 cyan-glow) to semantic color system
- Remux formats now display with distinct color from regular MKV
- buildFormatBadge checks for "Remux" in label and applies special color
- Differentiates lossless remux from transcoded formats

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 02:29:54 -05:00
15537ba73a feat(ui): Display codec badges inline with dropdowns
- Changed badge layout from vertical stacking to horizontal inline display
- Badges now appear next to dropdowns using HBox containers
- Applied to format, video codec, and audio codec selections
- Added assets/mockup/ to .gitignore for design references

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 02:27:44 -05:00
1934ed0d5e feat(ui): Add color-coded badges for format and codec dropdowns
- Implemented buildVideoCodecBadge() and buildAudioCodecBadge() functions
- Added badge containers for format, video codec, and audio codec selections
- Badges use semantic color system from ui/colors.go
- Video codecs: AV1 (emerald), H.265 (lime), H.264 (sky blue), etc.
- Audio codecs: Opus (violet), AAC (purple), FLAC (magenta), etc.
- Format badges: MKV (teal), MP4 (blue), MOV (indigo), etc.
- Badges update dynamically when selection changes

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 02:14:49 -05:00
40e647ee5b Add color-coded format badges to Convert module
Implemented semantic color-coded badges for format selection:
- Badge displays next to format dropdown showing container name
- Uses semantic color system (MKV=teal, MP4=blue, MOV=indigo, etc.)
- Updates dynamically when format selection changes
- Appears in both Simple and Advanced modes

Changes:
- Created buildFormatBadge() function to generate colored badges
- Added formatBadgeContainer with updateFormatBadge() callback
- Integrated badge into both Simple and Advanced mode layouts
- Badge provides visual recognition of container type at a glance

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 01:45:11 -05:00
6413082365 Hide benchmark indicator when user clicks Apply Benchmark
User feedback: Benchmark indicator should disappear entirely once applied,
not just show "Applied" status.

Changes:
- Modified Apply Benchmark button callback to hide the entire indicator
- Removed code that changed text/color and disabled button
- Cleaner UI - indicator completely disappears after applying settings

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 01:30:33 -05:00
88b318c5e4 Fix nil pointer crash in Convert module benchmark indicator
When benchmark settings are already applied, benchmarkIndicator is nil but was
being added to the container unconditionally, causing a crash during UI layout.

Changes:
- Conditionally build back bar items array
- Only append benchmarkIndicator if it's not nil
- Prevents SIGSEGV when opening Convert module with applied benchmark

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 00:13:24 -05:00
8ce6240c02 Hide benchmark indicator in Convert module when already applied
User feedback: Don't show benchmark status clutter when settings are already applied.

Changes:
- Only show benchmark indicator when settings are NOT applied
- Removes 'Benchmark: Applied' text + button from UI when active
- Cleaner Convert module interface when using benchmark settings

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 22:21:09 -05:00
b964c70da0 Re-enable Player module - already uses internal FFmpeg (no external deps)
Investigation revealed:
- Player module is ALREADY fully internal and lightweight
- Uses FFmpeg directly to decode video frames and audio
- Uses Oto library (lightweight Go audio library) for audio output
- No external VLC/MPV/FFplay dependencies

Implementation:
- FFmpeg pipes raw video frames (rgb24) directly to UI
- FFmpeg pipes audio (s16le) to Oto for playback
- Frame-accurate seeking and A/V sync built-in
- Error handling: Falls back to video-only if audio fails

Previous crash was likely from:
- Oto audio initialization failing on your system
- OR unrelated issue (OOM, etc.)
- Code already handles audio failures gracefully

Player module is safe to re-enable - it follows VideoTools' core principles.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 20:36:40 -05:00
69a1cd5ba7 Disable Player module to prevent crashes (external dependency violation)
Issue:
- Player module was crashing when accessed
- Uses external tools (MPV, VLC, FFplay) which violates VideoTools' core principle
- Everything should be internal and lightweight, no external dependencies

Fix:
- Disabled Player module in main menu
- Module still exists in code but is not accessible to users
- Prevents crash by preventing access to broken functionality

Future work needed:
- Implement pure-Go internal player using FFmpeg libraries
- OR implement simple preview-only playback using existing preview system
- Must be self-contained and lightweight

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 20:33:07 -05:00
c464a7a7dd Add benchmark result caching to avoid redundant benchmarks
Changes:
- Check for existing benchmark results when opening benchmark module
- If recent results exist for same hardware, show cached results instead of auto-running
- Display timestamp of cached results (e.g., "Showing cached results from December 28, 2025 at 2:45 PM")
- Add "Run New Benchmark" button at bottom of cached results view
- Only auto-run benchmark if no previous results exist or hardware has changed

Benefits:
- No more redundant benchmarks every time you open the module
- Results persist across app restarts (saved to ~/.config/VideoTools/benchmark.json)
- Clear indication when viewing cached vs fresh results
- Easy option to re-run if desired

Hardware detection:
- Compares GPU model to detect hardware changes
- If GPU changes, automatically runs new benchmark
- Keeps last 10 benchmark runs in history

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 20:24:11 -05:00
ff65928ba0 Implement queue priority for Convert Now and auto-cleanup for failed conversions
Queue Priority Changes:
- Added AddNext() method to queue package that inserts jobs after running jobs
- "Convert Now" now adds to top of queue when conversions are already running
- "Add to Queue" continues to add to end of queue
- User feedback message indicates when job was added to top vs started fresh

Auto-Cleanup for Failed Files:
- Convert jobs now automatically delete incomplete/broken output files on failure
- Prevents accumulation of partial files from failed conversions
- Success tracking ensures complete files are never removed

Benefits:
- Better workflow when adding files during active conversions
- "Convert Now" truly prioritizes the current file
- No more broken partial files cluttering output directories
- Cleaner error handling and disk space management

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 20:14:21 -05:00
b887142401 Improve merge module UX: split output path into folder and filename fields
Changed the merge output path from a single long entry field to two
separate fields for better usability:

UI Changes:
- Output Folder: Entry with "Browse Folder" button for directory selection
- Output Filename: Entry for just the filename (e.g., "merged.mkv")
- Users can now easily change the filename without navigating through
  the entire path

Internal Changes:
- Split `mergeOutput` into `mergeOutputDir` and `mergeOutputFilename`
- Updated all merge logic to combine dir + filename when needed
- Extension correction now works on filename only
- Clear button resets both fields independently
- Auto-population sets dir and filename separately

Benefits:
- Much simpler to change output filename
- No need to scroll to end of long path
- Cleaner, more intuitive interface
- Follows common file dialog patterns

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 20:06:49 -05:00
5026a946f5 Reduce queue list jankiness during auto-refresh
Implemented two key optimizations to smooth queue list updates:

1. Increased auto-refresh interval from 1000ms to 2000ms
   - Reduces frequency of view rebuilds
   - Gives UI more time to stabilize between updates

2. Reduced scroll restoration delay from 50ms to 10ms
   - Minimizes visible jump during position restoration
   - Saves offset to variable before goroutine to avoid race conditions

These changes work together to provide a smoother queue viewing
experience by reducing rebuild frequency while accelerating scroll
position recovery.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 19:48:57 -05:00
3863242ba9 fix(ui): Enable word wrapping for batch settings labels
Issue:
- User reported batch settings text being cut off
- "Settings persist across videos. Change them anytime to affect all sub"
- Text truncated instead of wrapping to next line
- Cache directory hint also had truncation issues

Root Cause:
- settingsInfoLabel didn't have TextWrapWord enabled
- cacheDirHint had TextWrapWord but wasn't in a sized container
- Labels in VBox need padded containers for wrapping to work properly

Solution:
- Enabled TextWrapWord on settingsInfoLabel
- Wrapped both labels in container.NewPadded() containers:
  * settingsInfoContainer: "Settings persist across videos..." text
  * cacheDirHintContainer: "Use an SSD for best performance..." text
- Replaced direct label usage with containers in settingsContent VBox

Affected Labels:
- settingsInfoLabel: Batch settings persistence explanation
- cacheDirHint: Cache/temp directory usage guidance

Implementation:
- Added TextWrapWord to settingsInfoLabel
- Created padded containers for both labels
- Updated settingsContent VBox to use containers instead of labels
- Consistent with fix from commit 1051329

Impact:
- Batch settings text now wraps properly
- "Change them anytime to affect all subsequent videos" fully visible
- Better readability in narrow windows
- No more truncated guidance text

Files Changed:
- main.go: Batch settings label wrapping

Reported-by: User (screenshot showing batch settings truncation)
Related: Commit 1051329 (hint label wrapping fix)
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 19:43:55 -05:00
1051329763 fix(ui): Enable word wrapping for hint labels in convert module
Issue:
- User reported hint text being cut off at window edge
- Example: "CBR mode: Constant bitrate - predictable file quality. Use for strict size requirements or s"
- Text truncated with "or s" visible, rest cut off
- Hint labels weren't wrapping properly in narrow windows

Root Cause:
- Hint labels had TextWrapWord enabled BUT
- Labels inside VBox containers don't wrap properly without width constraints
- Fyne requires labels to be in a sized container for wrapping to work
- VScroll container doesn't provide width hints to child labels

Solution:
- Wrap all hint labels in container.NewPadded() containers
- Padded containers provide proper sizing context for text wrapping
- Labels now wrap at available width instead of extending beyond bounds

Affected Hint Labels:
- encoderPresetHint: Encoder preset descriptions
- encodingHint: Bitrate mode (CRF/CBR/VBR/Target Size) hints
- frameRateHint: Frame rate change warnings
- outputHint: Output file path display
- targetAspectHint: Aspect ratio selection hint
- hwAccelHint: Hardware acceleration guidance

Implementation:
- Created *Container versions of each hint label
- Wrapped label in container.NewPadded(label)
- Replaced direct label usage with container in VBox layouts
- Maintains TextWrapWord setting on all labels

Impact:
- Hint text now wraps properly in narrow windows/panels
- No more truncated text
- Better readability across all window sizes
- Consistent behavior for all hint labels

Files Changed:
- main.go: Wrapped 6 hint labels in padded containers

Reported-by: User (screenshot showing "or s" truncation)
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 19:38:58 -05:00
da49a1dd7b fix(queue): Prevent massive goroutine leak from StripedProgress animations
Critical Fix:
- Goroutine dump showed hundreds of leaked animation goroutines
- Each queue refresh created NEW progress bars without stopping old ones
- Animation goroutines continued running forever, consuming resources

Root Cause:
- BuildQueueView() creates new StripedProgress widgets on every refresh
- StartAnimation() spawned goroutines for running jobs
- Old widgets were discarded but goroutines never stopped
- Fyne's Destroy() method not reliably called when rebuilding view

Solution:
- Track all active StripedProgress widgets in appState.queueActiveProgress
- Stop ALL animations before rebuilding queue view
- Stop ALL animations when leaving queue view (stopQueueAutoRefresh)
- BuildQueueView now returns list of active progress bars
- Prevents hundreds of leaked goroutines from accumulating

Implementation:
- Added queueActiveProgress []*ui.StripedProgress to appState
- Modified BuildQueueView signature to return progress list
- Stop old animations in refreshQueueView() before calling BuildQueueView
- Stop all animations in stopQueueAutoRefresh() when navigating away
- Track running job progress bars and append to activeProgress slice

Files Changed:
- main.go: appState field, refreshQueueView(), stopQueueAutoRefresh()
- internal/ui/queueview.go: BuildQueueView(), buildJobItem()

Impact:
- Eliminates goroutine leak that caused resource exhaustion
- Clean shutdown of animation goroutines on refresh and navigation
- Should dramatically reduce memory usage and CPU overhead

Reported-by: User (goroutine dump showing 900+ leaked goroutines)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 19:24:17 -05:00
8cff33fcab fix(ui): Enable text wrapping for batch settings toggle button
Fixed Issue:
- "Hide Batch Settings" button text was overflowing beyond button boundary
- Text was truncated and hard to read in narrow layouts

Solution:
- Created wrapped label overlay on button using container.NewStack
- Label has TextWrapWord enabled for automatic line breaking
- Maintains button click functionality while improving readability
- Text now wraps to multiple lines when space is constrained

Files Changed:
- main.go: Batch settings toggle button (lines 6858-6879)

Reported-by: User (screenshot showing text overflow)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 19:08:39 -05:00
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
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
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
18209240f2 Add drag and drop enhancements and timing offset controls to subtitle module 2025-12-26 19:44:38 -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
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
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
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