Added comprehensive documentation on Linux/GNOME compatibility:
Known Issues:
- Double-click titlebar maximize is Fyne framework limitation
- Provided workarounds: Super+Up, maximize button, F11
- Window sizing issues have been fixed
Cross-platform goals:
- Smooth operation on Linux, macOS, Windows
- Single codebase with Fyne framework
- Respect native window manager behaviors
Testing matrix:
- GNOME/Fedora verified
- X11 and Wayland support
- Should work on KDE, XFCE, etc.
Development guidelines:
- Test on both X11 and Wayland
- Consider mouse and keyboard workflows
- Respect window manager tiling
- HiDPI display support
This documentation helps users understand current limitations
and provides context for cross-platform development priorities.
Created comprehensive plan for extracting video player into separate project:
Goals:
- Independent development of player features
- Tighter, more polished video controls
- Reusable component for other projects
- Keep VideoTools focused on video processing
Migration strategy:
1. Extract internal/player to new repo
2. Create clean API interface
3. Update VideoTools to use external package
4. Enhance controls in separate project
Future player improvements:
- Thumbnail preview on seek hover
- Frame-accurate stepping
- Playback speed controls
- Better keyboard shortcuts
- Timeline markers and more
This separation will allow both projects to evolve independently
while keeping the VideoTools codebase lean and focused.
Fixed window resizing issues for better cross-platform behavior:
Convert module video pane:
- Reduced video pane minimum from 460x260 to 320x180
- Removed rigid MinSize on outer container (commented out)
- Removed rigid MinSize on image element
- Set stage minimum to 200x113 (reasonable 16:9 minimum)
- Video pane now scales down allowing smaller windows
Compare module:
- Reduced thumbnail minimum from 320x180 to 240x135
- Reduced metadata scroll minimum from 300x200 to 250x150
- More compact layout allows better window resizing
Benefits:
- Window can now shrink to fit smaller screens
- Better behavior on tiling window managers
- More flexible for cross-platform (Windows, macOS, Linux)
- Content scales intelligently instead of forcing window size
Note: Double-click titlebar maximize is a Fyne framework limitation.
Maximize via window controls or OS shortcuts (F11, Super+Up) works.
Added window centering to improve initial presentation:
- Call w.CenterOnScreen() after setting window size
- Window now opens centered rather than at OS default position
- Maintains existing resizing and maximization support
The window is already maximizable via SetFixedSize(false).
Users can maximize using OS window controls (double-click
titlebar, maximize button, or OS shortcuts like F11/Super+Up).
Prevents long filenames from manipulating window size:
- Truncate filenames longer than 35 characters
- Smart truncation preserves file extension
- Format: "long-filename-na...mp4" instead of wrapping
- Falls back to simple truncation for very long extensions
- Removed text wrapping from labels (no longer needed)
Examples:
- "my-very-long-video-filename.mp4" → "my-very-long-video-fi....mp4"
- "short.mp4" → "short.mp4" (unchanged)
- "filename.mkv" → kept as-is if under 35 chars
This ensures the Compare module labels stay compact and
predictable regardless of filename length.
Resolved UI framing issues where metadata was crushed and not
taking available vertical space:
Layout improvements:
- Used container.NewBorder to make metadata areas expand properly
- Set minimum sizes for scroll containers (300x200)
- Removed outer VScroll - individual metadata areas now scroll
- Grid columns now properly fill available vertical space
- Instructions fixed at top, metadata expands to fill remaining space
Text wrapping fixes:
- Added fyne.TextWrapBreak to file labels
- Prevents long filenames from stretching the window horizontally
- Labels now wrap to multiple lines as needed
Architecture changes:
- Separated file headers (label + button) from content
- Each column uses Border layout: header at top, metadata fills center
- Metadata scroll containers have explicit minimum sizes
- Two-column grid properly distributes horizontal space
The layout now feels more modern with better space utilization
and smooth scrolling within the metadata panels.
Major improvements to Compare module user experience:
- Auto-populate metadata when files are loaded (no Compare button needed)
- Show video thumbnails for both files (320x180)
- Support drag-and-drop onto Compare tile from main menu
- Load up to 2 videos when dropped on Compare tile
- Show dialog if more than 2 videos dropped
- Files loaded via drag show immediately with metadata
Changes to handleModuleDrop:
- Added special handling for Compare module
- Loads videos into compareFile1 and compareFile2 state
- Shows module with files already populated
Changes to buildCompareView:
- Added thumbnail display with dark background placeholders
- Created helper functions: formatMetadata(), loadThumbnail(), updateFile1(), updateFile2()
- Initialize view with any preloaded files
- Removed manual Compare button - metadata shows automatically
- Button handlers now call update functions to refresh display
- Cleaner, more intuitive workflow
This addresses the user feedback that dragging videos onto Compare
didn't load the module, and adds the requested thumbnail previews.
The Compare module now has colored bars at the top and bottom matching
its pink visual identity from the main menu. This creates visual
consistency with the Convert module and strengthens the app's
overall design language.
Changes:
- Added top bar with back button using ui.TintedBar
- Added bottom bar with module color
- Restructured layout to use container.NewBorder
- Made content area scrollable
The colored bars use the module's color (#FF44AA pink) as defined
in modulesList and retrieved via moduleColor().
- Implement drag-and-drop file loading in Compare module
- Accepts up to 2 video files
- Shows dialog if more than 2 videos dropped
- Automatically loads first two videos
- Integrated into global window drop handler
- Enhance metadata display with organized sections
- FILE INFO: path, file size, format
- VIDEO: codec, resolution, aspect ratio, frame rate, bitrate,
pixel format, color space, color range, field order, GOP size
- AUDIO: codec, bitrate, sample rate, channels
- OTHER: duration, SAR, chapters, metadata
- Both file panels now show identical detailed information
Critical Bug Fix:
- H.264 profile and level were being applied globally (-profile:v, -level:v)
- When cover art is present, this affected the PNG encoder stream
- PNG encoder doesn't support H.264 profiles, causing exit code 234
- Error: "Unable to parse option value 'main'" on PNG stream
Solution:
- Use stream-specific specifiers when cover art present
- Apply -profile✌️0 and -level✌️0 instead of -profile:v / -level:v
- This targets only the first video stream (main video)
- PNG cover art stream (1:v) is unaffected
- Fixed in both executeConvertJob() and startConvert()
UI Fix:
- Long output filenames were stretching the settings panel
- Added outputHint.Wrapping = fyne.TextWrapWord
- Filename now wraps properly instead of expanding horizontally
Tested with:
- Video with embedded cover art
- H.264 profile=main encoding
- Long filename conversion
Mark auto-crop, frame rate conversion, and encoder presets as complete in TODO.md.
Add detailed feature descriptions to DONE.md for all three priority features.
This commit enhances the encoder preset selector with detailed information
about speed vs quality trade-offs for each preset option.
Preset Information:
- Ultrafast: ~10x faster than slow, ~30% larger files
- Superfast: ~7x faster than slow, ~20% larger files
- Very Fast: ~5x faster than slow, ~15% larger files
- Faster: ~3x faster than slow, ~10% larger files
- Fast: ~2x faster than slow, ~5% larger files
- Medium: Balanced baseline (default)
- Slow: ~2x slower than medium, ~5-10% smaller (recommended)
- Slower: ~3x slower than medium, ~10-15% smaller
- Very Slow: ~5x slower than medium, ~15-20% smaller
UI Enhancements:
- Dynamic hint label below encoder preset dropdown
- Updates automatically when preset changes
- Visual icons for different speed categories:
- ⚡ Ultrafast/Superfast/Very Fast (prioritize speed)
- ⏩ Faster/Fast (good balance)
- ⚖️ Medium (baseline)
- 🎯 Slow/Slower (recommended for quality)
- 🐌 Very Slow (maximum compression)
Implementation:
- updateEncoderPresetHint() function provides preset details
- Called on preset selection change
- Initialized with current preset on view load
- Positioned directly under preset dropdown for visibility
Benefits:
- Helps users understand encoding time implications
- Shows file size impact of each preset
- Recommends "slow" as best quality/size ratio
- Prevents confusion about preset differences
- Enables informed decisions about encoding settings
Technical:
- All presets already supported by FFmpeg
- No changes to command generation needed
- Works with all video codecs (H.264, H.265, VP9, etc.)
- Preset names match FFmpeg standards
This commit implements the frame rate conversion feature with intelligent
file size estimation and user guidance.
Frame Rate Options:
- Added all standard frame rates: 23.976, 24, 25, 29.97, 30, 50, 59.94, 60
- Maintained "Source" option to preserve original frame rate
- Replaced limited [24, 30, 60] with full broadcast standard options
- Supports both film (24 fps) and broadcast (25/29.97/30 fps) standards
Size Estimation:
- Calculates approximate file size reduction when downconverting
- Shows "Converting X → Y fps: ~Z% smaller file" hint
- Example: 60→30 fps shows "~50% smaller file"
- Dynamically updates hint when frame rate or video changes
- Only shows hint when conversion would reduce frame rate
User Warnings:
- Detects upscaling (target > source fps)
- Warns with ⚠ icon: "Upscaling from X to Y fps (may cause judder)"
- Prevents confusion about interpolation limitations
- No hint shown when target equals source
Implementation:
- updateFrameRateHint() function recalculates on changes
- Parses frame rate strings to float64 for comparison
- Calculates reduction percentage: (1 - target/source) * 100
- Updates automatically when video loaded or frame rate changed
- Positioned directly under frame rate dropdown for visibility
Technical:
- Uses FFmpeg fps filter (already implemented)
- Works in both direct convert and queue execution
- Integrated with existing frame rate handling
- No changes to FFmpeg command generation needed
Benefits:
- 40-50% file size reduction for 60→30 fps conversions
- Clear visual feedback before encoding
- Prevents accidental upscaling
- Helps users make informed compression decisions
This commit implements the highest priority dev13 feature: automatic
cropdetect with manual override capability.
Features:
- Added detectCrop() function that analyzes 10 seconds of video
- Samples from middle of video for stable detection
- Parses FFmpeg cropdetect output using regex
- Shows estimated file size reduction percentage (15-30% typical)
- User confirmation dialog before applying crop values
UI Changes:
- Added "Auto-Detect Black Bars" checkbox in Advanced mode
- Added "Detect Crop" button to trigger analysis
- Button shows "Detecting..." status during analysis
- Runs detection in background to avoid blocking UI
- Dialog shows before/after dimensions and savings estimate
Implementation:
- Added CropWidth, CropHeight, CropX, CropY to convertConfig
- Crop filter applied before scaling for best results
- Works in both direct convert and queue job execution
- Proper error handling for videos without black bars
- Defaults to center crop if X/Y offsets not specified
Technical Details:
- Uses FFmpeg cropdetect filter with threshold 24
- Analyzes last detected crop value (most stable)
- 30-second timeout for detection process
- Regex pattern: crop=(\d+):(\d+):(\d+):(\d+)
- Calculates pixel reduction for savings estimate
Benefits:
- 15-30% file size reduction with zero quality loss
- Automatic detection eliminates manual measurement
- Confirmation dialog prevents accidental crops
- Clear visual feedback during detection
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit implements two new features:
1. Compare Module:
- New UI module for side-by-side video comparison
- Loads two video files and displays detailed metadata comparison
- Shows format, resolution, codecs, bitrates, frame rate, color info, etc.
- Accessible via GUI module button or CLI: videotools compare <file1> <file2>
- Added formatBitrate() helper function for consistent bitrate display
2. Target File Size Encoding Mode:
- New bitrate mode "Target Size" for convert module
- Allows users to specify desired output file size (e.g., "25MB", "100MB", "8MB")
- Automatically calculates required video bitrate based on:
* Target file size
* Video duration
* Audio bitrate
* Container overhead (3% reserved)
- Implemented ParseFileSize() to parse size strings (KB, MB, GB)
- Implemented CalculateBitrateForTargetSize() for bitrate calculation
- Works in both GUI convert view and job queue execution
Additional changes:
- Updated printUsage() to include compare command
- Added compare button to module grid with pink color
- Added compareFile1 and compareFile2 to appState
- Consistent "Target Size" naming throughout (UI and code)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive Windows support roadmap:
- Cross-compilation and build system
- Platform-specific path handling
- Windows GPU detection (NVENC/QSV/AMF)
- Installer and distribution
- Testing checklist
Goal: Make VideoTools available for Jake and Windows users
Implements mutual exclusion between 'Convert Now' and queue processing:
Behavior:
- If queue is running: 'Convert Now' button is DISABLED
- If user tries to click 'Convert Now' while queue runs: Shows info dialog
with message and auto-adds video to queue instead
- Only one conversion method active at a time
This prevents:
- Multiple simultaneous FFmpeg processes competing for system resources
- Confusion about which conversion is running
- Queue and direct conversion interfering with each other
When queue is active:
- 'Convert Now' button: DISABLED (grey out)
- 'Add to Queue' button: ENABLED (highlighted)
- Clear UI signal: Only use queue mode for batch operations
Perfect for batch workflows where user loads multiple videos
and expects them all to process sequentially in the queue,
not spawn random direct conversions.
Implements automatic queue processing when jobs are added from the Convert
module via the 'Add to Queue' button:
Features:
- IsRunning() method added to queue package to check processing status
- 'Add to Queue' button now auto-starts queue if not already running
- Eliminates need to manually open Queue view and click 'Start Queue'
- Seamless workflow: Add video → Queue → Auto-starts conversion
Before:
1. Load video
2. Click 'Add to Queue'
3. Click 'View Queue'
4. Click 'Start Queue'
After:
1. Load video
2. Click 'Add to Queue' (auto-starts!)
3. Load next video
4. Click 'Add to Queue' (already running)
Perfect for batch operations where user loads multiple videos and expects
them to start encoding immediately.
Implements clear batch settings control for converting multiple videos:
Features:
- Settings persistence: All conversion settings automatically persist across videos
- Clear UI messaging: Explains that settings carry over between videos
- Reset button: One-click ability to reset all settings to defaults
- Batch workflow: Load video → set format/quality once → convert multiple videos
How it works:
1. User loads first video and configures settings (format, quality, codecs, etc)
2. Settings are stored in state.convert and persist across video loads
3. User can load additional videos - settings remain the same
4. When converting multiple videos, all use the same settings
5. User can change settings anytime - affects all subsequent videos
6. Reset button available to restore defaults if needed
This eliminates the need to reconfigure every video while allowing:
- Batch processing with same settings
- Individual video settings override when needed
- Clear visual indication of what's happening
Perfect for the user's workflow of converting 5 European videos to
DVD-NTSC format - set once, convert all 5!
Critical fix: When a DVD format (NTSC or PAL) is selected, now properly
override the video and audio codec to use DVD-compliant standards:
Video:
- Forces MPEG-2 codec (mpeg2video)
- NTSC: 6000k bitrate, 9000k max, gop=15
- PAL: 8000k bitrate, 9500k max, gop=12
Audio:
- Forces AC-3 codec for DVD container compatibility
- 192 kbps bitrate
- 48 kHz sample rate (DVD standard)
- Stereo channels (2)
This ensures that selecting a DVD format produces DVDStyler-compatible
MPEG files without codec errors. Previously, the code was using the
default H.264 + AAC, which caused 'unsupported audio codec' errors
when trying to write to MPEG container.
Fixes the issue where DVD conversions were failing with:
'Unsupported audio codec. Must be one of mp1, mp2, mp3, 16-bit pcm_dvd,
pcm_s16be, ac3 or dts.'
The setContent function was calling fyne.DoAndWait() from the main goroutine,
which created a deadlock. Changed to use fyne.Do() (asynchronous) to properly
marshal UI updates without blocking.
This resolves the error:
'fyne.Do[AndWait] called from main goroutine'
The async approach is correct here since we don't need to wait for the
content update to complete before continuing.
The new installation system provides a painless, one-command setup for all users:
install.sh Enhancements:
- 5-step installation wizard with visual progress indicators
- Auto-detects bash/zsh shell and updates rc files appropriately
- Automatically adds PATH exports for system-wide or user-local installation
- Automatically sources alias.sh for convenience commands
- Clear instructions for next steps
- Better error messages and validation
- Supports both sudo and non-sudo installation paths
- Default to user-local installation (no sudo required)
INSTALLATION.md Documentation:
- Comprehensive installation guide for all user types
- Multiple installation options (system-wide vs user-local)
- Detailed troubleshooting section
- Manual installation instructions for advanced users
- Platform-specific notes (Linux, macOS, Windows WSL)
- Uninstallation instructions
- Verification steps
README.md Updates:
- Updated Quick Start section to reference install.sh
- Added INSTALLATION.md to documentation index
- Clear distinction between user and developer setup
This enables users to set up VideoTools with:
bash install.sh
source ~/.bashrc
VideoTools
No manual shell configuration needed!
This commit includes several improvements:
Queue System Enhancements:
- Improved thread-safety in Add, Remove, Pause, Resume, Cancel operations
- Added PauseAll and ResumeAll methods for batch control
- Added MoveUp and MoveDown methods to reorder queue items
- Better handling of running job cancellation with proper state management
- Improved Copy strategy in List() to prevent race conditions
Convert Module Enhancement:
- Auto-set resolution to 720×480 when NTSC DVD format selected
- Auto-set resolution to 720×576 when PAL DVD format selected
- Auto-set framerate to 29.97fps (30) for NTSC, 25fps for PAL
- Added DVD resolution options to resolution selector dropdown
Display Server Improvements:
- Auto-detect Wayland vs X11 display servers in player controller
- Conditionally apply xdotool window placement (X11 only)
UI Improvements:
- Added Pause All, Resume All, and queue reordering buttons
- Fixed queue counter labeling (completed count display)