Commit Graph

429 Commits

Author SHA1 Message Date
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
c8bcaf476c Fix queue UI refresh 2025-12-23 22:42:45 -05:00
e5dcde953b Commit incremental progress
- Current state: 3 modules partially/fully extracted
- upscale_module.go: showUpscaleView + AI helpers migrated successfully
- Build syntax:  Clean
- Build failing due to unrelated Fyne API issue in internal/ui/queueview.go
- Ready for next incremental extraction steps
2025-12-23 22:39:33 -05:00
165480cf8c Extract showUpscaleView and AI helper functions to upscale_module.go
- Move showUpscaleView() from main.go to upscale_module.go
- Remove AI helper functions (detectAIUpscaleBackend, checkAIFaceEnhanceAvailable, etc.)
- Syntax passes, ready for further migration
- Build error is unrelated Fyne API issue in internal/ui
2025-12-23 22:35:06 -05:00
67c71e2070 Restore main.go + upscale_module.go preparation
- main.go restored from corruption (13,664 lines)
- upscale_module.go created with AI helper functions
- Ready for safer incremental extraction approach
2025-12-23 22:29:42 -05:00
4e449f8748 Update rip documentation 2025-12-23 22:13:54 -05:00
b02cd844c4 Finish thumb module extraction fixes 2025-12-23 22:05:54 -05:00
f5a162b440 Add thumb module files
- thumb_module.go: Complete thumb module implementation
- main.go.backup-before-inspect-extraction: Backup before refactoring
- Successfully extracted showThumbView() from main.go
2025-12-23 21:57:41 -05:00
cf9422ad6b Format cleanup and minor fixes
- Apply go formatting across internal packages
- Clean up imports and code style
2025-12-23 21:56:47 -05:00
81773c46a1 Extract thumb module from main.go (partial)
- Create thumb_module.go with showThumbView(), buildThumbView(), executeThumbJob()
- Remove showThumbView() from main.go
- buildThumbView() and executeThumbJob() still in main.go to be removed
- Syntax check passes
- Working on large function extraction
2025-12-23 21:47:14 -05:00
1a268ce983 Auto-refresh queue view 2025-12-23 21:36:19 -05:00
c98c1aa924 Extract filters module from main.go
- Create filters_module.go (257 lines)
- Move showFiltersView() and buildFiltersView()
- Reduce main.go by ~257 lines (from 14245 to 13988)
- All syntax checks pass, module ready for testing
2025-12-23 21:35:06 -05:00
a42b353aea Label author/rip jobs in queue 2025-12-23 21:30:56 -05:00
0bad7d858f Add comprehensive refactoring guide for opencode
Created step-by-step guide for modularizing main.go:
- 9 modules to extract in priority order (least → most important)
- Filters first (easiest), Convert last (most critical)
- Clear instructions for each extraction
- Reference patterns from existing modules
- Success criteria and testing steps
- Emergency rollback procedures

Module extraction order:
1. filters_module.go (~236 lines) - Simple UI
2. upscale_module.go (~1200 lines) - AI integration
3. thumb_module.go (~400 lines) - Thumbnail generation
4. player_module.go (~800 lines) - Playback system
5. compare_module.go (~550 lines) - File comparison
6. merge_module.go (~700 lines) - File merging
7. benchmark_module.go (~400 lines) - Encoder benchmarks
8. queue_module.go (~500 lines) - Job queue
9. convert_module.go (~6400 lines) - Most critical, do last

Goal: Reduce main.go from 14,116 → ~4,000 lines
Expected: Windows build time 5+ min → <2 min

Each module extraction is independent and testable.
Pattern established with inspect_module.go (already done).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 21:30:17 -05:00
c883a92155 Handle nil values in toString 2025-12-23 21:25:41 -05:00
e1af8181c0 Add rip job type 2025-12-23 21:22:37 -05:00
faef905f18 Add Rip module for DVD/ISO/VIDEO_TS 2025-12-23 21:19:44 -05:00
0d5670f34b Implement major player performance improvements (Priority 2 & 5)
Priority 2: FFmpeg Volume Control
- Moved volume processing from Go to FFmpeg -af volume filter
- Eliminated CPU-intensive per-sample processing loop
- Removed ~40 lines of hot-path audio processing code
- Reduced CPU usage during playback significantly
- Dynamic volume changes restart audio seamlessly

Changes:
- Build FFmpeg command with volume filter
- Remove per-sample int16 processing loop
- Remove encoding/binary import (no longer needed)
- Add restartAudio() for dynamic volume changes
- Volume changes >5% trigger audio restart with new filter

Priority 5: Adaptive Frame Timing
- Implemented drift correction for smooth video playback
- Frame dropping when >3 frames behind schedule
- Gradual catchup when moderately behind
- Maintains smooth playback under system load

Frame Timing Logic:
- Behind < 0: Sleep until next frame (ahead of schedule)
- Behind > 3 frames: Drop frame and resync (way behind)
- Behind > 0.5 frames: Catch up gradually (moderately behind)
- Otherwise: Maintain normal pace

Performance Improvements:
- Audio: No more per-chunk volume processing overhead
- Video: Adaptive timing handles temporary slowdowns
- CPU: Significant reduction in audio processing load
- Smoothness: Better handling of system hiccups

Testing Notes:
- Audio stuttering should be greatly reduced
- Volume changes have ~200ms glitch during restart
- Frame drops logged every 30 frames to avoid spam
- Works with all frame rates (24/30/60 fps)

Still TODO (Priority 3):
- Single FFmpeg process for perfect A/V sync
- Currently separate video/audio processes can drift

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 21:16:38 -05:00
ee67bffbd9 Support VIDEO_TS drop to ISO 2025-12-23 21:10:46 -05:00
68ce3c2168 Document and fix player module stuttering issues
Performance Analysis:
- Created PLAYER_PERFORMANCE_ISSUES.md with root cause analysis
- Identified 6 major issues causing stuttering
- Provided priority-ordered fix recommendations

Quick Fixes Implemented (Priority 1):
- Increase audio buffer: 2048 → 8192 samples (42ms → 170ms)
- Increase audio chunk size: 4096 → 16384 bytes (21ms → 85ms)
- Reduces audio underruns and stuttering significantly

Root Causes Documented:
1. Separate video/audio FFmpeg processes (no A/V sync)
2. Tiny audio buffers causing underruns
3. CPU waste on per-sample volume processing
4. Frame timing drift with no correction mechanism
5. UI thread blocking every frame update
6. Memory allocation on every frame (GC pressure)

Remaining Work (Requires More Time):
- Priority 2: Move volume control to FFmpeg (remove hot path processing)
- Priority 3: Single FFmpeg process for perfect A/V sync
- Priority 4: Frame buffer pooling to reduce GC pressure
- Priority 5: Adaptive frame timing with drift correction

Testing Checklist Provided:
- Frame rate support (24/30/60 fps)
- A/V sync validation
- Codec compatibility
- CPU usage benchmarking

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 21:09:21 -05:00
ec7649aee8 Default author output path without dialogs 2025-12-23 21:06:49 -05:00
1da9317d73 Update Windows build guide for Git Bash users
Git Bash Optimizations:
- Create add-defender-exclusions.ps1 automated script
- Update guide with Git Bash-first instructions
- Add command for running PowerShell from Git Bash
- Document how to run Git Bash as Administrator

New Helper Script:
- scripts/add-defender-exclusions.ps1
- Automatically adds all necessary Defender exclusions
- Shows clear success/failure messages
- Can be run from Git Bash using powershell.exe

Documentation Updates:
- Prioritize Git Bash commands (Jake's workflow)
- Add "Quick Start for Git Bash Users" section
- Provide step-by-step Git Bash instructions
- Keep PowerShell/CMD options as alternatives

For Jake:
```bash
# From Git Bash as Administrator:
powershell.exe -ExecutionPolicy Bypass -File ./scripts/add-defender-exclusions.ps1
```

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 20:55:47 -05:00
9dc946b7c0 Add Windows build performance optimizations
Build Script Improvements:
- Add -p flag for parallel compilation (use all CPU cores)
- Add -trimpath for faster builds and smaller binaries
- Detect CPU core count automatically
- Show parallel process count during build

Performance Guide:
- Create WINDOWS_BUILD_PERFORMANCE.md with troubleshooting steps
- Document Windows Defender exclusion fix (saves 2-5 minutes)
- Provide PowerShell commands for adding exclusions
- Include benchmarking and troubleshooting commands

Expected Improvements:
- With Defender exclusions: 5+ min → 30-90 sec
- Parallel compilation: 30-50% faster on multi-core CPUs
- Trimpath flag: 10-20% faster linking

Scripts Updated:
- build.ps1: Added core detection and optimization flags
- build.bat: Added parallel build support

Addresses Jake's 5+ minute Windows build issue.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 20:53:43 -05:00
960def5730 Extract inspect module from main.go
Refactoring:
- Create inspect_module.go (292 lines)
- Move showInspectView() and buildInspectView()
- Reduce main.go from 14,329 to 14,116 lines (-213 lines)
- Reduce main.go from 426KB to 420KB

This is the first step in modularizing main.go to improve:
- Windows build performance (currently 5+ minutes)
- Code maintainability and organization
- Following established pattern from author_module.go and subtitles_module.go

Remaining modules to extract:
- player, compare, thumb, filters, upscale, merge, convert, queue, benchmark

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 20:51:42 -05:00
1b1657bc21 Fix author warnings dialog thread 2025-12-23 20:49:34 -05:00
9315a793ba Simplify authoring error messaging 2025-12-23 20:48:45 -05:00
588fc586a1 Add authoring log/progress and queue job 2025-12-23 20:47:10 -05:00
62802aa79e Link author subtitles to subtitles tool 2025-12-23 20:38:05 -05:00
364c3aa1ed Move chapter buttons to bottom 2025-12-23 20:36:58 -05:00
16140e2e12 Add batch queue feature to Convert module
Convert Module:
- Add "Add All to Queue" button when multiple videos loaded
- Batch-add all loaded videos to queue with one click
- Remove confirmation dialogs for faster workflow
- Queue button updates immediately to show new count
- Button only visible when 2+ videos are loaded

Workflow improvements:
- No more clicking through videos one by one to queue
- No "OK" confirmation clicks required
- Queue count updates instantly in View Queue button
- Auto-starts queue after adding jobs

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 20:27:59 -05:00
77ff859575 Add DVD5/DVD9 disc size guidance 2025-12-23 20:20:15 -05:00
4ea3834d76 Allow local DVDStyler ZIP install 2025-12-23 20:00:54 -05:00
1ef88069bc Add more DVDStyler mirrors 2025-12-23 20:00:54 -05:00
c75f6a0453 Add manual DVDStyler download hint 2025-12-23 20:00:54 -05:00
d69573fa7f Prompt for optional DVD authoring deps 2025-12-23 20:00:54 -05:00
stu
89d9a15fa9 Update README.md 2025-12-24 00:31:55 +00:00
e356dfca6d Harden DVDStyler download fallback 2025-12-23 18:41:44 -05:00
eeb62d8e4b Make install.sh dependencies-only 2025-12-23 18:41:12 -05:00
4d031a4dae Polish menu header and Windows DVDStyler download 2025-12-23 18:30:35 -05:00
056df2ec25 Add subtitles module with offline STT 2025-12-23 18:30:27 -05:00
f3f4ee0f3a Show clip-based chapters in author chapters tab 2025-12-23 17:58:45 -05:00
71021f5585 Add chapter naming per clip in author videos tab 2025-12-23 17:56:39 -05:00
595b1603ee Add author chapter sources and scene detection 2025-12-23 17:54:01 -05:00
23759caeea Add right column for author clip duration 2025-12-23 17:40:19 -05:00
bff07bd746 Improve author subtitles layout and summary refresh 2025-12-23 17:39:47 -05:00
0c91f63329 Align author clip list styling with merge 2025-12-23 17:36:01 -05:00
22eb734df2 Refresh author clip list after Add Files 2025-12-23 17:33:45 -05:00
9b4fedc181 Handle drag-and-drop in author module 2025-12-23 17:33:17 -05:00