Commit Graph

69 Commits

Author SHA1 Message Date
524fd66cb5 Fix fyne hover interface import for status bar 2025-12-17 14:52:27 -05:00
a3a6fbe6d0 Improve snippet progress reporting and speed up striped bars 2025-12-17 14:47:37 -05:00
5498d0df63 Restore tap handling on status bar 2025-12-17 14:33:11 -05:00
9aeb82dd2b 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.
2025-12-17 14:25:18 -05:00
a255bdb04b 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
b8bcc06196 Use unified status bar helper across modules 2025-12-17 05:06:25 -05:00
f6f110e319 Make stats bar overlay use module tint and lighter text 2025-12-17 03:03:45 -05:00
bf1aaef7ab Fix queue progress calc type 2025-12-17 02:38:55 -05:00
ef7c7c9f6e Animate striped progress bars in queue 2025-12-17 02:25:00 -05:00
bfb3f58c8d Improve queue progress UI and upscale progress reporting 2025-12-17 02:21:55 -05:00
f6fe8bb61b Fix 'Clear Completed' to preserve running jobs
Removed cancelRunningLocked() call from Clear() method.
Now 'Clear Completed' only removes completed/failed/cancelled jobs
and preserves pending/running/paused jobs.

Previously it was cancelling active jobs before filtering, causing
running jobs (like merges) to be removed from the queue.
2025-12-17 00:34:20 -05:00
0f23953ba8 Complete dev18: Thumbnail enhancements, Player/Filters/Upscale modules, and precise snippet generation
Enhances screenshot module with comprehensive technical metadata display including audio bitrate, adds 8px padding between thumbnails for professional contact sheets. Implements new Player module for video playback access. Adds complete Filters and Upscale modules with traditional FFmpeg scaling methods (Lanczos, Bicubic, Spline, Bilinear) and resolution presets (720p-8K). Introduces configurable snippet length (5-60s, default 20s) with batch generation capability for all loaded videos. Fixes snippet duration precision by re-encoding instead of stream copy to ensure frame-accurate cutting at configured length.
2025-12-15 15:36:24 -05:00
6eb361fc91 Fix thumbnail generation and add viewing capability
Fixed Thumbnail Count Issue:
- Changed frame selection from hardcoded 30fps to timestamp-based
- Now uses gte(t,timestamp) filter for accurate frame selection
- This fixes the issue where 5x8 grid only generated 34 instead of 40 thumbnails

Improved Contact Sheet Display:
- Reduced thumbnail width from 320px to 200px for better window fit
- Changed background color from black to app theme (#0B0F1A)
- Contact sheets now match the VideoTools dark blue theme

Added Viewing Capability:
- New "View Results" button in thumbnail module
- Contact sheet mode: Shows image in full-screen dialog (900x700)
- Individual mode: Opens thumbnail folder in file manager
- Button checks if output exists before showing
- Provides user-friendly messages when no results found

Benefits:
- Correct number of thumbnails generated for any grid size
- Contact sheets fit better in display window
- Visual consistency with app theme
- Easy access to view generated results within the app
2025-12-13 20:56:05 -05:00
d6bddb9a4c Fix thumbnail generation and add preview window
Fixed Issues:
- Exit 234 error: Added font parameter to drawtext filter for individual
  thumbnails (was missing, causing FFmpeg to fail)
- Output directory: Changed from temp to video's directory, creating a
  folder named "{video}_thumbnails" next to the source file

New Features:
- Added video preview window to thumbnail module (640x360)
- Split layout: preview on left (55%), settings on right (45%)
- Preview uses same buildVideoPane as other modules for consistency

The thumbnail module now has a proper preview window for reviewing
the loaded video before generating thumbnails, and outputs are saved
in a logical location next to the source file.
2025-12-13 20:40:06 -05:00
0d39143747 Use monospace font for contact sheet metadata
Updated FFmpeg drawtext filter to use DejaVu Sans Mono for metadata
text on contact sheets. This matches the monospace font style used
throughout the VideoTools UI.

DejaVu Sans Mono is widely available across Linux, macOS, and Windows,
ensuring consistent appearance across platforms.
2025-12-13 20:38:11 -05:00
4f685d720d Add metadata header to thumbnail contact sheets
Implemented metadata header rendering on contact sheets showing:
- Filename and file size
- Video resolution and duration

Uses FFmpeg pad and drawtext filters to create an 80px header area
with white text on black background.
2025-12-13 18:56:39 -05:00
6448e04e90 Add Thumbnail Generation Module (dev17)
New Features:
- Thumbnail extraction package with FFmpeg integration
- Individual thumbnails or contact sheet generation
- Configurable thumbnail count (3-50 thumbnails)
- Adjustable thumbnail width (160-640 pixels)
- Contact sheet mode with customizable grid (2-10 columns/rows)
- Timestamp overlay on thumbnails
- Auto-open generated thumbnails folder

Technical Implementation:
- internal/thumbnail package with generator
- FFmpeg-based frame extraction
- Video duration and dimension detection
- Aspect ratio preservation
- JPEG quality control
- PNG lossless option support

UI Features:
- Thumbnail module in main menu (Orange tile)
- Load video via file picker
- Real-time configuration sliders
- Contact sheet toggle with grid controls
- Generate button with progress feedback
- Success dialog with folder open option

Integration:
- Added to module routing system
- State management for thumb module
- Proper Fyne threading with DoFromGoroutine
- Cross-platform folder opening support

Module is fully functional and ready for testing.
2025-12-13 18:43:34 -05:00
fb859c470a Add interlacing analysis UI to Convert module
Integrated interlacing detection into the Convert module with:

Features:
- "Analyze Interlacing" button in metadata panel
- Real-time analysis using FFmpeg idet filter (first 500 frames)
- Color-coded results card showing:
  - Status (Progressive/Interlaced/Mixed)
  - Interlacing percentage
  - Field order (TFF/BFF/Unknown)
  - Confidence level
  - Recommendation text
  - Detailed frame counts

Auto-updates:
- Automatically suggests enabling deinterlacing if needed
- Updates Convert deinterlace setting from "Off" to "Auto" when interlacing detected

UI States:
- Initial: Just "Analyze Interlacing" button
- Analyzing: Shows progress message
- Complete: Shows colored results card with full analysis

Analysis runs in background goroutine with proper thread-safe UI updates.

Next: Add to simple menu and Inspect module
2025-12-13 16:43:05 -05:00
8fff5fd84d Add interlacing detection analyzer
Created core interlacing detection system using FFmpeg's idet filter.

Features:
- Analyze videos for interlacing using FFmpeg idet filter
- Parse TFF, BFF, Progressive, and Undetermined frame counts
- Calculate interlacing percentage and confidence level
- Determine field order (TFF/BFF/Mixed/Progressive)
- Generate recommendations for deinterlacing
- Quick analysis mode (first 500 frames) for speed
- Full video analysis option
- Preview generation: deinterlaced frame or side-by-side comparison

Detection Results include:
- Status: Progressive / Interlaced / Mixed Content
- Interlacing %: Portion of frames that are interlaced
- Field Order: Top Field First, Bottom Field First, or Unknown
- Confidence: High/Medium/Low based on undetermined frames
- Recommendation: Human-readable guidance
- Suggested filter: yadif, bwdif, etc.

Next: UI integration in Convert and Inspect modules
2025-12-13 16:30:54 -05:00
5a3be05844 Fix benchmark progress bar percentage calculation
The progress bar was configured with Max=100 but we were setting
values in the 0.0-1.0 range, causing it to always show ~0%.

Fixed by multiplying the percentage by 100 before setting the value,
so 4/22 = 0.18 becomes 18% instead of 0.18%.

Also fixed SetComplete() to set 100.0 instead of 1.0.
2025-12-13 14:04:20 -05:00
f365633f89 Fix Fyne threading errors in benchmark progress updates
All UI updates from the benchmark goroutine were causing threading
errors because they weren't wrapped in DoFromGoroutine. Fixed:

- UpdateProgress: progress bar and label updates
- AddResult: adding result cards to the display
- SetComplete: final status updates

These methods are called from background goroutines running the
benchmark tests, so all UI updates must be dispatched to the main
thread using fyne.CurrentApp().Driver().DoFromGoroutine().
2025-12-13 13:33:18 -05:00
9f6e41b927 Add benchmark history tracking and results browser
Extended the benchmark system to maintain a complete history of all
benchmark runs (up to last 10) with full results for each encoder/preset
combination tested.

Features:
- Stores complete benchmark run data including all test results
- History browser UI to view past benchmark runs
- Click any run to see detailed results for all encoders tested
- Compare performance across different presets and encoders
- Apply recommendations from past benchmarks
- Automatic history limit (keeps last 10 runs)

UI Changes:
- Renamed "Benchmark" button to "Run Benchmark"
- Added "View Results" button to main menu
- New benchmark history view showing all past runs
- Each run displays timestamp, recommended encoder, and test count
- Clicking a run shows full results with all encoder/preset combinations

Data Structure:
- benchmarkRun: stores single test run with all results
- benchmarkConfig: maintains array of benchmark runs
- Saves to ~/.config/VideoTools/benchmark.json

This allows users to review past benchmark results and make informed
decisions about which encoder settings to use by comparing FPS across
all available options on their hardware.
2025-12-13 13:07:51 -05:00
dfb7796f10 Add comprehensive hardware encoder benchmarking system
Implemented a full benchmark system that automatically detects available
hardware encoders, tests them with different presets, measures FPS
performance, and recommends optimal settings for the user's system.

Features:
- Automatic test video generation (30s 1080p test pattern)
- Hardware encoder detection (NVENC, QSV, AMF, VideoToolbox)
- Comprehensive encoder testing across multiple presets
- Real-time progress UI with live results
- Performance scoring based on FPS metrics
- Top 10 results display with recommendation
- Config persistence for benchmark results
- One-click apply to use recommended settings

UI Components:
- Benchmark button in main menu header
- Progress view showing current test and results
- Final results view with ranked encoders
- Apply/Close actions for recommendation

Integration:
- Added to main menu between "Benchmark" and "Logs" buttons
- Saves results to ~/.config/VideoTools/benchmark.json
- Comprehensive debug logging for troubleshooting

This allows users to optimize their encoding settings based on their
specific hardware capabilities rather than guessing which encoder
will work best.
2025-12-13 09:16:36 -05:00
251833a614 Fix merge job progress reporting jumping to 100% immediately
The issue was that FFmpeg's out_time_ms field is actually in microseconds
(not milliseconds despite the name). We were dividing by 1,000 when we
should have been dividing by 1,000,000 to convert to seconds.

This caused the progress calculation to be off by 1000x, making it
immediately jump to 100% even though the job was just starting.

Also added comprehensive debug logging to track progress samples and
identify calculation issues in the future.
2025-12-13 09:12:18 -05:00
ca7b9a9bc2 Truncate long error messages in queue view to prevent UI overflow
Long FFmpeg error messages were pushing the queue UI off screen, making
the interface unusable when jobs failed with verbose errors.

Changes:
- Truncate error messages to 150 characters maximum in status text
- Add helpful message indicating full error is available via Copy Error button
- Enable text wrapping on status labels to handle multi-line content gracefully
- Prevents UI layout breakage while maintaining error visibility

Users can still access the full error message via:
- Copy Error button (copies full error to clipboard)
- View Log button (opens per-job conversion log)
2025-12-13 08:45:08 -05:00
ce72a280c9 Simplify droppable to match fyne drop signature 2025-12-11 07:22:36 -05:00
73a283e8ef Use fyne drop signatures to fix build 2025-12-11 06:59:50 -05:00
66f046af27 Fix build by updating droppable drop handling 2025-12-11 06:58:01 -05:00
20e09aaad1 Fix droppable signature and dependency handling 2025-12-11 06:53:49 -05:00
66f57da8ad Add droppable merge empty state 2025-12-10 16:43:20 -05:00
e2a3028b73 Add in-module cancel for running jobs 2025-12-10 15:46:18 -05:00
e362c6895a Enforce DVD presets and optional merge chapters 2025-12-10 14:53:09 -05:00
1448c12ac8 Persist convert config and tidy queue UI 2025-12-09 13:24:39 -05:00
278c8b8846 Remove unused import in dvd adapter 2025-12-09 11:41:07 -05:00
1e9c7fe0aa Queue snippets and honor user aspect; skip HW accel if unavailable 2025-12-09 01:33:05 -05:00
44795b6951 Show bitrate in kbps/Mbps and expand presets 2025-12-08 23:53:40 -05:00
35a90bdcd6 Add simple bitrate/resolution/aspect controls and cache helper 2025-12-08 23:22:28 -05:00
a35049a6d8 Fallback bitrate uses source bitrate; add size/bitrate delta helpers 2025-12-08 22:26:06 -05:00
674c1cd509 Fix formatting helpers: add math import and self-contained reduction formatting 2025-12-08 20:43:17 -05:00
14d3959f4e Normalize MP4 format label, improve log readability, and prep reduction display 2025-12-08 18:46:34 -05:00
fed4139183 Shorten queue descriptions and wrap text to keep controls visible 2025-12-08 18:13:18 -05:00
8b75158923 Fix feedback bundler export and use utils.NewFeedbackBundler 2025-12-08 16:06:58 -05:00
009a5574fb Add metadata map to VideoSource and add MP4 H.265 preset 2025-12-08 16:02:53 -05:00
0e900e7ccb Fix feedback bundler import to restore build 2025-12-08 15:13:24 -05:00
7d9941745f Fix imports for grouped main menu build 2025-12-08 12:26:01 -05:00
a00fffd345 Add sort import for grouped main menu 2025-12-08 12:18:17 -05:00
2d0a865bc1 Group main menu by category and add logs access 2025-12-08 12:07:58 -05:00
6684052585 Add per-conversion logs and surface them in queue UI 2025-12-08 11:31:12 -05:00
cd71f39c53 Hide ffmpeg console windows on Windows and fix inspect clear button 2025-12-08 11:26:14 -05:00
aa0c1959f6 Add queue error copy, auto naming helper, and metadata templating 2025-12-07 12:03:21 -05:00