8.5 KiB
Latest Updates - November 29, 2025
Summary
This session focused on three major improvements to VideoTools:
- Auto-Resolution for DVD Formats - Automatically sets correct resolution when selecting NTSC/PAL
- Queue System Improvements - Better thread-safety and new control features
- Professional Installation System - One-command setup for users
1. Auto-Resolution for DVD Formats
What Changed
When you select a DVD format in the Convert module, the resolution and framerate now automatically set to match the standard:
- Select "DVD-NTSC (MPEG-2)" → automatically sets resolution to 720×480 and framerate to 30fps
- Select "DVD-PAL (MPEG-2)" → automatically sets resolution to 720×576 and framerate to 25fps
Why It Matters
- No More Manual Setting - Users don't need to understand DVD resolution specs
- Fewer Mistakes - Prevents encoding to wrong resolution
- Faster Workflow - One click instead of three
- Professional Output - Ensures standards compliance
How to Use
- Go to Convert module
- Load a video
- Select a DVD format → resolution/framerate auto-set!
- In Advanced Mode, you'll see the options pre-filled correctly
Technical Details
File: main.go lines 1416-1643
- Added DVD resolution options to resolution selector dropdown
- Implemented
updateDVDOptions()function to handle auto-setting - Updates both UI state and convert configuration
2. Queue System Improvements
New Methods
The queue system now includes several reliability and control improvements:
PauseAll()- Pause any running job and stop processingResumeAll()- Restart queue processing from paused stateMoveUp(id)/MoveDown(id)- Reorder pending/paused jobs in the queue- Better thread-safety - Improved locking in Add, Remove, Pause, Resume, Cancel operations
UI Improvements
The queue view now displays:
- Pause All button - Quickly pause everything
- Resume All button - Restart processing
- Up/Down arrows on each job - Reorder items manually
- Better status tracking - Improved running/paused/completed indicators
Why It Matters
- More Control - Users can pause/resume/reorder jobs
- Better Reliability - Improved thread-safety prevents race conditions
- Batch Operations - Control all jobs with single buttons
- Flexibility - Reorder jobs without removing them
File Changes
File: internal/queue/queue.go
- Fixed mutex locking in critical sections
- Added PauseAll() and ResumeAll() methods
- Added MoveUp/MoveDown methods for reordering
- Improved Copy strategy in List() method
- Better handling of running job cancellation
File: internal/ui/queueview.go
- Added new control buttons (Pause All, Resume All, Start Queue)
- Added reordering UI (up/down arrows)
- Improved job display and status tracking
3. Professional Installation System
New Files
- Enhanced
install.sh- One-command installation - New
INSTALLATION.md- Comprehensive installation guide
install.sh Features
The installer now performs all setup automatically:
bash install.sh
This handles:
- ✅ Go installation verification
- ✅ Building VideoTools from source
- ✅ Choosing installation path (system-wide or user-local)
- ✅ Installing binary to proper location
- ✅ Auto-detecting shell (bash/zsh)
- ✅ Updating PATH in shell rc file
- ✅ Sourcing alias.sh for convenience commands
- ✅ Providing next-steps instructions
Installation Options
Option 1: System-Wide (for shared computers)
bash install.sh
# Select option 1 when prompted
Option 2: User-Local (default, no sudo required)
bash install.sh
# Select option 2 when prompted (or just press Enter)
After Installation
source ~/.bashrc # Load the new aliases
VideoTools # Run the application
Available Commands
After installation:
VideoTools- Run the applicationVideoToolsRebuild- Force rebuild from sourceVideoToolsClean- Clean build artifacts
Why It Matters
- Zero Setup - No manual shell configuration needed
- User-Friendly - Guided choices with sensible defaults
- Automatic Environment - PATH and aliases configured automatically
- Professional Experience - Matches expectations of modern software
Documentation
INSTALLATION.md includes:
- Quick start instructions
- Multiple installation options
- Troubleshooting section
- Manual installation instructions
- Platform-specific notes
- Uninstallation instructions
- Verification steps
Display Server Auto-Detection
What Changed
The player controller now auto-detects the display server:
File: internal/player/controller_linux.go
- Checks for Wayland environment variable
- Uses Wayland if available, falls back to X11
- Conditional xdotool window placement (X11 only)
Why It Matters
- Works with Wayland - Modern display server support
- Backwards Compatible - Still works with X11
- No Configuration - Auto-detects automatically
Files Modified in This Session
Major Changes
- main.go - Auto-resolution for DVD formats (~50 lines added)
- install.sh - Complete rewrite for professional setup (~150 lines)
- INSTALLATION.md - New comprehensive guide (~280 lines)
- README.md - Updated Quick Start section
Queue System
- internal/queue/queue.go - Thread-safety and new methods (~100 lines)
- internal/ui/queueview.go - New UI controls (~60 lines)
- internal/ui/mainmenu.go - Updated queue display
- internal/player/controller_linux.go - Display server detection
Git Commits
Two commits were created in this session:
Commit 1: Auto-Resolution and Queue Improvements
Improve queue system reliability and add auto-resolution for DVD formats
- Auto-set resolution to 720×480 when NTSC DVD format selected
- Auto-set resolution to 720×576 when PAL DVD format selected
- Improved thread-safety in queue system
- Added PauseAll, ResumeAll, MoveUp, MoveDown queue methods
- Display server auto-detection (Wayland vs X11)
Commit 2: Installation System
Add comprehensive installation system with install.sh and INSTALLATION.md
- 5-step installation wizard with visual progress indicators
- Auto-detects bash/zsh shell and updates rc files
- Automatically adds PATH exports
- Automatically sources alias.sh
- Comprehensive installation guide documentation
- Default to user-local installation (no sudo required)
What's Ready for Testing
All features are built and ready:
For Testing Auto-Resolution
- Run
VideoTools - Go to Convert module
- Select "DVD-NTSC (MPEG-2)" or "DVD-PAL (MPEG-2)"
- Check that resolution auto-sets (Advanced Mode)
For Testing Queue Improvements
- Add multiple jobs to queue
- Test Pause All / Resume All buttons
- Test reordering with up/down arrows
For Testing Installation
- Run
bash install.shon a clean system - Verify binary is in PATH
- Verify aliases are available
Next Steps
For Your Testing
- Test the new auto-resolution feature with NTSC and PAL formats
- Test queue improvements (Pause All, Resume All, reordering)
- Test the installation system on a fresh checkout
For Future Development
- Implement FFmpeg execution integration (call BuildDVDFFmpegArgs)
- Display validation warnings in UI before queuing
- Test with DVDStyler for compatibility verification
- Test with actual PS2 hardware or emulator
Documentation Updates
All documentation has been updated:
- README.md - Updated Quick Start, added INSTALLATION.md reference
- INSTALLATION.md - New comprehensive guide (280 lines)
- BUILD_AND_RUN.md - Existing user guide (still valid)
- DVD_USER_GUIDE.md - Existing user guide (still valid)
Summary of Improvements
| Feature | Before | After |
|---|---|---|
| DVD Resolution Setup | Manual selection | Auto-set on format selection |
| Queue Control | Basic (play/pause) | Advanced (Pause All, Resume All, reorder) |
| Installation | Manual shell config | One-command wizard |
| Alias Setup | Manual sourcing | Automatic in rc file |
| New User Experience | Complex | Simple (5 steps) |
Technical Quality
All changes follow best practices:
- ✅ Proper mutex locking in queue operations
- ✅ Nil checks for function pointers
- ✅ User-friendly error messages
- ✅ Comprehensive documentation
- ✅ Backward compatible
- ✅ No breaking changes
Enjoy the improvements! 🎬