Commit Graph

303 Commits

Author SHA1 Message Date
925334d8df Clean up root folder and update TODO/DONE for dev19
Root Folder Cleanup:
- Moved all documentation .md files to docs/ folder
- Kept only README.md, TODO.md, DONE.md in root
- Cleaner project structure for contributors
- Better organization of documentation

Files Moved to docs/:
- BUILD.md, BUILD_AND_RUN.md, CHANGELOG.md
- COMPLETION_SUMMARY.md, DVD_IMPLEMENTATION_SUMMARY.md
- DVD_USER_GUIDE.md, INSTALLATION.md, INTEGRATION_GUIDE.md
- LATEST_UPDATES.md, QUEUE_SYSTEM_GUIDE.md, QUICKSTART.md
- TESTING_DEV13.md, TEST_DVD_CONVERSION.md, WINDOWS_SETUP.md

DONE.md Updates:
- Added dev19 section (2025-12-18)
- Documented history sidebar delete button
- Documented command preview improvements
- Documented format options reorganization
- Documented bitrate mode descriptive labels
- Documented critical bug fixes (Convert crash, log viewer)
- Documented bitrate control improvements

TODO.md Updates:
- Updated to dev19+ plan
- Added "Current Focus: dev19" section
- Added AI frame interpolation task (RIFE, FILM, DAIN, CAIN)
- Added color space preservation tasks
- Reorganized priority structure

This establishes dev19 as the current development focus on
Convert module cleanup and polish, with clear tracking of
completed work and upcoming priorities.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 16:21:15 -05:00
f7bb87e20a Add descriptive labels to bitrate mode dropdown
Bitrate Mode Options Now Show:
- CRF (Constant Rate Factor)
- CBR (Constant Bitrate)
- VBR (Variable Bitrate)
- Target Size (Calculate from file size)

Implementation:
- Added bidirectional mapping between short codes and full labels
- Internally still uses short codes (CRF, CBR, VBR, Target Size)
- Preserves compatibility with existing config files
- Maps display label to internal code on selection
- Maps internal code to display label when loading

Makes it immediately clear what each bitrate mode does without
needing to reference documentation or tooltips.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 16:13:10 -05:00
83c8e68f80 Improve command preview button and reorganize format options
Command Preview Button:
- Disabled when no video source is loaded
- Shows "Show Preview" when preview is hidden
- Shows "Hide Preview" when preview is visible
- Makes it clear when and why the button can be used

Format Options Reorganization:
- Grouped formats by codec family for better readability
- Order: H.264 → H.265 → AV1 → VP9 → ProRes → MPEG-2
- Added comments explaining each codec family
- Makes it easier to find and compare similar codecs

This improves discoverability and reduces user confusion about
when the command preview is available and which format to choose.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 16:09:55 -05:00
5b544b8484 Add history entry delete button and fix Convert module crash
Features:
- Add "×" delete button to each history entry in sidebar
- Click to remove individual entries from history
- Automatically saves and refreshes sidebar after deletion

Bug Fixes:
- Fix nil pointer crash when opening Convert module
- Fixed widget initialization order: bitrateContainer now created
  AFTER bitratePresetSelect is initialized
- Prevented "invalid memory address" panic in tabs layout

Technical Details:
- Added deleteHistoryEntry() method to remove entries by ID
- Updated BuildHistorySidebar signature to accept onEntryDelete callback
- Moved bitrateContainer creation from line 5742 to 5794
- All Select widgets now properly initialized before container creation

The crash was caused by bitrateContainer containing a nil
bitratePresetSelect widget, which crashed when Fyne's layout system
called .Visible() during tab initialization.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 11:51:26 -05:00
4616dee10a Fix log viewer crash and improve bitrate controls
- Fix panic when closing log viewer (duplicate channel close)
- Improve CBR: Set bufsize to 2x bitrate for better encoder handling
- Improve VBR: Increase maxrate cap from 1.5x to 2x target bitrate
- Add bufsize to VBR at 4x target (2x maxrate) to enforce caps
- Update VBR hint to reflect 2x peak cap and 2-pass encoding

This eliminates runaway bitrates while maintaining quality peaks.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 10:30:55 -05:00
714395764e Hide unused bitrate controls and improve VBR accuracy
Restructured bitrate controls to hide unused options based on mode,
and improved VBR encoding to use 2-pass for accurate bitrate targeting.

UI Improvements:
- Wrapped CRF, bitrate, and target size controls in hideable containers
- Only show relevant controls based on selected bitrate mode:
  * CRF mode: Show only CRF entry
  * CBR mode: Show only bitrate entry and presets
  * VBR mode: Show only bitrate entry and presets
  * Target Size mode: Show only target size controls
- Added descriptive hints for each mode explaining behavior
- Updated DVD mode to work with new container structure
- Made command preview update when bitrate settings change

Encoding Improvements:
- VBR now uses maxrate at 1.5x target for quality peaks
- VBR automatically enables 2-pass encoding for accuracy
- CBR remains strict (minrate=maxrate=target) for guaranteed bitrate
- Target Size mode continues to calculate exact bitrate from duration

This addresses runaway bitrate issues by:
1. Making it clear which mode is active
2. Hiding confusing unused controls
3. Ensuring VBR hits target average bitrate with 2-pass
4. Keeping CBR strict for exact constant bitrate

Pros of manual bitrate targeting:
- Predictable file sizes
- Meets strict size requirements
- Good for streaming with bandwidth constraints

Cons of manual bitrate targeting:
- Variable quality (simple scenes waste bits, complex scenes starve)
- Less efficient than CRF overall
- Requires 2-pass for VBR accuracy (slower)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 10:18:25 -05:00
a7505a3de7 Remove logs dialog from main menu 2025-12-18 10:17:40 -05:00
628df87a1e Add AV1, WebM, and MOV format options; Make command preview live-update
Added support for modern video codecs and containers, and made the
FFmpeg command preview update in real-time as settings change.

Format additions:
- MP4 (AV1) - AV1 codec in MP4 container
- MKV (AV1) - AV1 codec in Matroska container
- WebM (VP9) - VP9 codec for web video
- WebM (AV1) - AV1 codec for web video
- MOV (H.264) - H.264 in QuickTime for Apple compatibility
- MOV (H.265) - H.265 in QuickTime for Apple compatibility

Command preview improvements:
- Added forward declaration for buildCommandPreview function
- Command preview now updates live when changing:
  * Format selection
  * Video codec
  * Quality presets (Simple and Advanced)
  * Encoder speed presets
- Preview stays synchronized with current settings
- Users can now see exactly what command will be generated

This gives professionals comprehensive format options while keeping
the preview accurate and up-to-date.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 10:12:18 -05:00
2e3ccc0346 Make command preview collapsible and show actual file paths
Made the FFmpeg command preview less intrusive by adding a toggle button
and showing actual file paths instead of placeholders.

Changes:
- Added convertCommandPreviewShow state field to track preview visibility
- Added "Command Preview" toggle button next to "View Queue" button
- Command preview now hidden by default to save screen space
- Preview shows actual input/output file paths instead of INPUT/OUTPUT
- Cover art paths also shown with real file path when present

This makes the interface cleaner while providing more useful information
when the preview is needed.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 09:59:34 -05:00
d7389a25bc Phase 5: Integrate sidebar into main menu
Integrated history sidebar into main menu with toggle button and split
view layout. Added history details dialog with FFmpeg command copy.

Changes:
- internal/ui/mainmenu.go:
  * Updated BuildMainMenu() signature to accept sidebar parameters
  * Added "☰ History" toggle button to header
  * Implemented HSplit layout (20% sidebar, 80% main) when sidebar visible

- main.go:
  * Added "sort" import for showHistoryDetails
  * Added showHistoryDetails() method to display job details dialog
  * Shows timestamps, config, error messages, FFmpeg command
  * "Show in Folder" button (only if output file exists)
  * "View Log" button (only if log file exists)
  * Updated showMainMenu() to build and pass sidebar
  * Implemented sidebar toggle that refreshes main menu

The sidebar can be toggled on/off from the main menu, shows history
entries with filtering by status (Completed vs Failed/Cancelled), and
clicking an entry opens a detailed view with all job information and
the ability to copy the FFmpeg command for manual execution.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:36:39 -05:00
385c6f736d Phase 4: Create sidebar UI components
Added history sidebar UI with tabs for completed and failed jobs.
Created reusable UI components and helpers for displaying history entries.

Changes:
- internal/ui/mainmenu.go:
  * Added HistoryEntry type definition
  * Added BuildHistorySidebar() for main sidebar UI with tabs
  * Added buildHistoryList() and buildHistoryItem() helpers
  * Added imports for queue and utils packages

- internal/ui/components.go:
  * Moved GetStatusColor() and BuildModuleBadge() here as shared functions
  * Added queue and utils imports for shared helpers

- internal/ui/queueview.go:
  * Updated to use shared GetStatusColor() and BuildModuleBadge()
  * Removed duplicate function definitions

- main.go:
  * Updated to use ui.HistoryEntry type throughout
  * Updated historyConfig, appState, and all methods to use ui.HistoryEntry

The sidebar displays history entries with:
- Status-colored indicators (green/red/orange)
- Module type badges with colors
- Shortened titles and formatted timestamps
- Separate tabs for "Completed" and "Failed" (includes cancelled)
- Empty state messages when no entries exist

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:34:22 -05:00
d785e4dc91 Phase 3: Add history data structures and persistence
Added conversion history tracking with persistence to disk. Jobs are
automatically added to history when they complete, fail, or are cancelled.

Changes:
- Added HistoryEntry struct to represent completed jobs
- Added historyConfig for JSON persistence
- Added historyConfigPath(), loadHistoryConfig(), saveHistoryConfig() functions
- Added historyEntries and sidebarVisible fields to appState
- Added addToHistory() method to save completed jobs
- Initialize history loading on app startup
- Hook into queue change callback to automatically save finished jobs
- Store FFmpeg command in history for each job
- Limit history to 20 most recent entries

History is saved to ~/.config/VideoTools/history.json and includes job
details, timestamps, error messages, and the FFmpeg command for manual
reproduction.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:27:44 -05:00
bccacf9ea2 Phase 2B: Add Copy Command button to queue view for running/pending jobs
Added "Copy Command" button to queue view for running and pending jobs,
allowing users to copy the FFmpeg command to clipboard for manual execution.

Changes:
- internal/ui/queueview.go: Add onCopyCommand parameter and buttons
- main.go: Implement onCopyCommand handler in showQueue()

The handler retrieves the job, generates the FFmpeg command with
INPUT/OUTPUT placeholders using buildFFmpegCommandFromJob(), and copies
it to the clipboard with a confirmation dialog.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:25:38 -05:00
9df622eb72 Phase 2: Add FFmpeg command preview to Convert module UI
Integrated the FFmpegCommandWidget into the Convert module:

1. Added command preview section in buildConvertView():
   - Creates FFmpegCommandWidget displaying current settings as FFmpeg command
   - Uses INPUT/OUTPUT placeholders for portability
   - Positioned above action bar, after snippet section
   - Only shows when video is loaded

2. Command building logic:
   - Builds config map from current convertConfig state
   - Passes to buildFFmpegCommandFromJob() for command generation
   - Updates preview dynamically (foundation for real-time updates)
   - Includes all conversion settings (codecs, filters, quality, audio)

3. UI layout improvements:
   - Added labeled "FFmpeg Command Preview:" header
   - Scrollable monospace command display (80px min height)
   - Copy button with clipboard integration
   - Clean separation from other sections

Users can now see and copy the exact FFmpeg command that will be used
for their conversion before starting it. This makes it easy to reproduce
VideoTools' output in external tools or verify settings.

Next: Add Copy Command button to queue view for active/pending jobs.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:18:18 -05:00
5903b15c67 Add missing dialog/layout imports for FFmpeg command widget 2025-12-17 19:11:34 -05:00
42af533627 Phase 1: Add FFmpeg command copy infrastructure
Implemented the foundation for FFmpeg command copy functionality:

1. Created FFmpegCommandWidget (components.go):
   - Displays FFmpeg commands in scrollable monospace text
   - Includes "Copy Command" button with clipboard integration
   - Shows confirmation dialog when copied
   - Reusable widget for consistent UI across modules

2. Created buildFFmpegCommandFromJob() function (main.go):
   - Extracts FFmpeg command from queue job config
   - Uses INPUT/OUTPUT placeholders for portability
   - Handles video filters (deinterlace, crop, scale, aspect, flip, rotate, fps)
   - Handles video codecs with hardware acceleration (H.264, H.265, AV1, VP9)
   - Handles quality modes (CRF, CBR, VBR)
   - Handles audio codecs and settings
   - Covers ~90% of convert job scenarios

This infrastructure enables users to copy the exact FFmpeg command
being used for conversions, making it easy to reproduce VideoTools'
output in external tools like Topaz or command-line ffmpeg.

Next phase will integrate this into the Convert module UI, queue view,
and conversion history sidebar.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 19:09:43 -05:00
015e4c0dc2 Import json/strconv for thumbnail ffprobe parsing 2025-12-17 19:09:43 -05:00
eff752a97c Use ffprobe json parsing for thumbnail video info 2025-12-17 19:09:43 -05:00
Jake P
799102cac7 Attempted to create GUI
Attempted to create GUIs for both lt-convert and lt-gui
2025-12-17 22:50:59 +00:00
ec967d50e7 Clamp snippet bitrates and block lossless for short clips 2025-12-17 16:19:24 -05:00
ce5ad6e7fa Clamp snippet conversion bitrate and ensure yuv420p 2025-12-17 16:15:31 -05:00
c3a9cbd69e Update DONE and TODO for UI/progress work 2025-12-17 14:53:46 -05:00
4c737d5280 Fix fyne hover interface import for status bar 2025-12-17 14:52:27 -05:00
b826c02660 Improve snippet progress reporting and speed up striped bars 2025-12-17 14:47:37 -05:00
ac424543d8 Make entire status strip clickable 2025-12-17 14:34:13 -05:00
589330cc0b Restore tap handling on status bar 2025-12-17 14:33:11 -05:00
27e038e1a1 Fix queue stats to properly distinguish cancelled from failed jobs
The queue Stats() method was grouping cancelled and failed jobs together,
causing cancelled jobs to be displayed as "failed" in the status bar.
Updated Stats() to return a separate cancelled count and modified all
callers (updateStatsBar, queueProgressCounts, showMainMenu) to handle
the new return value. Also updated ConversionStatsBar to display
cancelled jobs separately in the status bar.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 14:25:18 -05:00
aa64e64576 Add mouse back/forward button navigation support
- Add navigationHistory and navigationHistoryPosition to appState
- Add navigationHistorySuppress flag to prevent recursive history tracking
- Implement pushNavigationHistory to track module navigation
- Implement navigateBack and navigateForward for mouse button navigation
- Create mouseButtonHandler widget to capture mouse button events
- Wrap all content with mouseButtonHandler in setContent
- Track history in showModule and showMainMenu
- Handle mouse button 4 (back) and mouse button 5 (forward)
- Maintain history of up to 50 module navigations

Mouse back/forward buttons now work like a web browser - press the back button
to return to previous modules, press forward to go back to where you were.
History is maintained across all module transitions for seamless navigation.
2025-12-17 14:09:42 -05:00
082153be19 Ensure status bar remains tappable 2025-12-17 14:05:27 -05:00
6e4eda93d2 Improve progress bar visibility and thickness
- Increase striped progress bar contrast (light: 90→60, dark: 140→200)
- Increase fill opacity (180→200) for better visibility
- Increase progress bar height from 14px to 20px across both striped and standard bars
- Makes progress bars more visible and easier to read at a glance

The striped gradient now has much clearer distinction between light and dark
stripes, and the increased thickness makes progress easier to track visually.
2025-12-17 13:36:56 -05:00
957b92d8cd Fix FrameRate default to always be Source
- Add check in loadPersistedConvertConfig to default FrameRate to "Source" if empty
- Add check after loading persisted config to ensure FrameRate is "Source" if not set
- Prevents unwanted frame rate conversions from persisted config overriding safe defaults

This ensures that frame rate always defaults to "Source" and users won't
accidentally convert all their videos to 23.976fps or another frame rate
if they had previously saved a config with a specific frame rate set.
2025-12-17 13:28:26 -05:00
34e613859d Add frame rate controls to merge and convert simple mode
- Add mergeFrameRate and mergeMotionInterpolation fields to appState
- Add frame rate dropdown and motion interpolation checkbox to merge UI
- Pass frame rate settings through merge job config
- Implement frame rate conversion in executeMergeJob (for non-DVD formats)
- Add frame rate controls to convert module's simple mode

Frame rate conversion with optional motion interpolation is now available in:
- Convert module (simple and advanced modes)
- Merge module
- Upscale module

All modules support both simple fps conversion (fast) and motion
interpolation (slower, smoother) for professional frame rate standardization.
2025-12-17 13:22:23 -05:00
09de435839 Add frame rate control to upscale module
- Add upscaleFrameRate and upscaleMotionInterpolation fields to appState
- Add Frame Rate section to upscale UI with dropdown and motion interpolation checkbox
- Pass frame rate settings through upscale job config
- Implement frame rate conversion in executeUpscaleJob using minterpolate or fps filter
- Frame rate section appears after resolution selection in upscale settings

Frame rate control is now available in both convert and upscale modules,
allowing users to standardize content from different regions with optional
motion interpolation for smooth conversion.
2025-12-17 13:11:34 -05:00
ccd75af936 Adjust convert action bar spacing 2025-12-17 06:11:12 -05:00
662ebc209c Place convert action bar in tinted footer 2025-12-17 06:06:49 -05:00
a1678cf150 Return to single dark status strip footer 2025-12-17 05:57:44 -05:00
95781ba7ea Align convert footer to single tinted bar with actions 2025-12-17 05:55:25 -05:00
249f5501e2 Add motion interpolation for frame rate conversion
- Add UseMotionInterpolation field to convertConfig struct
- Implement minterpolate filter for smooth frame rate changes when enabled
- Add UI checkbox in advanced settings for motion interpolation option
- Use minterpolate with high-quality settings (mci mode, aobmc, bidir ME, vsbmc)
- Falls back to simple fps filter when motion interpolation is disabled
- Fix pre-existing statusBar function calls (renamed to moduleFooter)

Motion interpolation provides smooth frame rate conversion (e.g., 24fps→60fps)
using motion-compensated interpolation instead of simple frame duplication.
This is useful for standardizing content from different regions.
2025-12-17 05:39:54 -05:00
2b16b130f4 Refine footer layout to match legacy look 2025-12-17 05:35:03 -05:00
f021bcc26c Use unified status bar helper across modules 2025-12-17 05:06:25 -05:00
8a9a947ee2 Make stats bar consistent across modules 2025-12-17 03:12:45 -05:00
6d379a309e Replace chapter warning popup with inline label
Removed confirmation dialog popups when converting files with
chapters to DVD format. Instead, show a non-intrusive inline
warning label that appears/disappears based on format selection.

Warning label:
- Shows only when file has chapters AND DVD format is selected
- Displays inline below format selector in both simple and advanced modes
- No user action required - just informational
- Text: "Chapters will be lost - DVD format doesn't support embedded chapters. Use MKV/MP4 to preserve chapters."
2025-12-17 03:10:59 -05:00
484a636fb4 Add chapter loss warning when converting to DVD format
When converting a file with chapters to DVD/MPEG format, show
a confirmation dialog warning the user that chapters will be lost.

MPEG format does not support embedded chapters - they require
full DVD authoring with IFO files. Users are warned and given
the option to cancel or continue.

Warning appears for both 'Convert Now' and 'Add to Queue' buttons.
2025-12-17 03:05:26 -05:00
f2ac544d75 Make stats bar overlay use module tint and lighter text 2025-12-17 03:03:45 -05:00
a5ad368d0f Fix duplicate queue button declaration in inspect view 2025-12-17 02:45:39 -05:00
320f522d85 Fix queue progress calc type 2025-12-17 02:38:55 -05:00
1eb2d11ccd Add stats bar across modules and fix thumb color 2025-12-17 02:32:06 -05:00
73e5c4940f Animate striped progress bars in queue 2025-12-17 02:25:00 -05:00
90ceba0693 Include upscale output path in queue job 2025-12-17 02:22:33 -05:00
530418f3e5 Improve queue progress UI and upscale progress reporting 2025-12-17 02:21:55 -05:00