Commit Graph

421 Commits

Author SHA1 Message Date
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
f5d78cc218 Wire author module navigation 2025-12-23 17:24:50 -05:00
acdb523fb1 Add drag and drop for Player module and enable Author module
Player Module Drag and Drop:
- Add handleDrop case for player module
- Drag video files onto player to load them
- Works the same way as convert module
- Auto-probe and load first video file from drop

Author Module:
- Enable Author module button in main menu
- Add "author" to enabled modules list (line 1525)
- Module is now clickable and functional

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 17:20:07 -05:00
a7901c8f66 Add DVDStyler URL override for Windows installer 2025-12-23 17:16:24 -05:00
513a60058b Improve DVDStyler download mirrors for Windows 2025-12-23 15:59:17 -05:00
573e7894b2 Fix VT_Player seeking and frame stepping
Seeking Fixes:
- Remove debouncing delay for immediate response
- Progress bar now seeks instantly when clicked or dragged
- No more 150ms lag during playback navigation

Frame Stepping Fixes:
- Calculate current frame from time position (current * fps)
- Previously used frameN which resets to 0 on every seek
- Frame stepping now accurately moves ±1 frame from actual position
- Buttons now work correctly regardless of seek history

Technical Details:
- currentFrame = int(p.current * p.fps) instead of p.frameN
- Removed seekTimer and seekMutex debouncing logic
- Immediate Seek() call in slider.OnChanged for responsive UX

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 15:53:09 -05:00
e910bee641 VT_Player foundation: Frame-accurate navigation and responsive scrubbing
Frame Navigation:
- Add frame-by-frame stepping with Previous/Next frame buttons
- Implement StepFrame() method for precise frame control
- Auto-pause when frame stepping for accuracy
- Display real-time frame counter during playback

Responsive Scrubbing:
- Add 150ms debounce to progress bar seeking
- Prevents rapid FFmpeg restarts during drag operations
- Smoother user experience when scrubbing through video

Player Session Improvements:
- Track frame numbers accurately with frameFunc callback
- Add duration field for proper frame calculations
- Update frame counter in real-time during playback
- Display current frame number in UI (Frame: N)

UI Enhancements:
- Frame step buttons: ◀| (previous) and |▶ (next)
- Frame counter label with monospace styling
- Integrated into existing player controls layout

Technical Details:
- Frame calculation: targetFrame = currentFrame ± delta
- Time conversion: offset = frameNumber / fps
- Clamp frame numbers to valid range [0, maxFrame]
- Call frameFunc callback on each displayed frame

Foundation ready for future enhancements (keyboard shortcuts, etc.)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 15:37:26 -05:00
bc85ed9940 Harden DVDStyler download for Windows deps 2025-12-23 15:33:54 -05:00
ac155f72a3 Fix Windows deps script encoding for PowerShell 2025-12-23 15:02:38 -05:00