Commit Graph

133 Commits

Author SHA1 Message Date
b94919e616 Fix Merge module file list to use full vertical space
Issue: File list only used half the vertical space, wasting screen real estate.

Changed left panel from VBox to Border layout:
- Top: "Clips to Merge" label and Add/Clear buttons (fixed size)
- Center: File list scroll area (expands to fill remaining space)

The border layout gives the scroll area priority to expand vertically,
maximizing the visible file list area. This is especially important
when merging many clips.
2025-12-13 09:01:07 -05:00
9535659426 Add debug logging to diagnose merge progress calculation issues
User reports progress jumps to 100% within 10 seconds but merge continues for 45s total.

Added comprehensive debug logging to track:
- Individual clip durations as they're summed
- Total expected duration for the merge
- Exact moment when progress hits 100% with actual vs expected times
- Only update progress when it changes by ≥0.1% (reduces callback spam)

This will help diagnose whether:
- Clip durations are being calculated incorrectly
- FFmpeg's out_time_ms doesn't match expected total duration
- Concat demuxer reports different output duration than sum of inputs

Logging appears in logs/videotools.log with CatFFMPEG category.
To view: tail -f logs/videotools.log | grep FFMPEG
2025-12-13 08:53:49 -05:00
f09a7576df Add auto file extension and H.264/H.265/MP4 format options to Merge module
Issues fixed:
- Missing file extensions caused FFmpeg errors (user's job 234 failure)
- Limited codec options (only copy or H.265)
- Manual codec mode selector was redundant

Changes:
1. Auto file extension handling:
   - Automatically adds/corrects extension based on selected format
   - .mkv for MKV/Blu-ray formats
   - .mpg for DVD formats
   - .mp4 for MP4 formats
   - Validates and fixes extension in addMergeToQueue

2. Expanded format options:
   - MKV (Copy streams) - stream copy, no re-encoding
   - MKV (H.264) - re-encode with H.264, CRF 23
   - MKV (H.265) - re-encode with H.265, CRF 28
   - MP4 (H.264) - H.264 + AAC audio, web-optimized
   - MP4 (H.265) - H.265 + AAC audio, web-optimized
   - DVD NTSC/PAL (16:9 and 4:3)
   - Blu-ray (H.264)

3. Removed redundant codec mode selector:
   - Format dropdown now explicitly includes codec choice
   - Cleaner, more intuitive UI
   - Backward compatible with old queue jobs

Extension is auto-updated when:
- User selects a different format (updates existing path extension)
- User adds merge to queue (validates/fixes before encoding)
- Prevents errors from missing or wrong file extensions
2025-12-13 08:48:34 -05:00
7c5bd3e2a3 Fix merge job progress reporting showing 100% throughout
The -progress flag was being added AFTER the output path in the FFmpeg command,
causing FFmpeg to not recognize it and therefore not output progress information.

Moved -progress pipe:1 -nostats to appear BEFORE the output path.

Now merge jobs will correctly report progress as they encode:
- Progress starts at 0%
- Updates based on out_time_ms from FFmpeg progress output
- Calculates percentage based on total duration of all clips
- Shows accurate real-time progress in queue view and stats bar
2025-12-13 08:38:05 -05:00
5390f9d355 Fix drag-and-drop for Merge module
The Merge module's ui.NewDroppable wrappers weren't receiving drop events
because the window-level handleDrop function was intercepting them first.

Added merge module handling to handleDrop function:
- Accepts individual video files and adds them sequentially to merge clips
- Accepts multiple files at once and processes all in order
- Accepts folders and recursively finds all video files
- Probes each video to get duration and metadata
- Sets chapter names defaulting to filename
- Auto-sets output path to "merged.mkv" once 2+ clips are added
- Refreshes UI after each clip is added

Now drag-and-drop works consistently across all modules (Convert, Compare, Inspect, Merge).
2025-12-13 08:37:26 -05:00
006856cff3 Return to main menu after clearing queue 2025-12-11 12:01:21 -05:00
ea263bad72 Show stats bar in merge view 2025-12-11 09:36:33 -05:00
92d454d8b9 Add live progress to merge jobs 2025-12-11 09:27:39 -05:00
1e3e213964 Fix merge job clip extraction 2025-12-11 09:16:39 -05:00
16217600b1 Fix merge button declarations 2025-12-11 07:27:31 -05:00
bde047c974 Enable merge actions when clips present 2025-12-11 07:25:29 -05:00
d6e9082aa9 Allow drop anywhere in merge list 2025-12-10 21:22:04 -05:00
c8398dd966 Fix merge drag/drop build error 2025-12-10 17:14:42 -05:00
66f57da8ad Add droppable merge empty state 2025-12-10 16:43:20 -05:00
eb9bedfcb1 Handle drag/drop into merge list 2025-12-10 16:14:52 -05:00
e2a3028b73 Add in-module cancel for running jobs 2025-12-10 15:46:18 -05:00
0cc1488f70 Prompt before overwriting existing outputs 2025-12-10 15:22:26 -05:00
8d44735526 Fix DVD aspect default and ensure targets 2025-12-10 15:17:46 -05:00
e362c6895a Enforce DVD presets and optional merge chapters 2025-12-10 14:53:09 -05:00
587286d1e1 Auto-set DVD bitrate and lock bitrate controls 2025-12-10 12:05:53 -05:00
d8098ea2ae Tighten DVD preset messaging 2025-12-10 12:02:14 -05:00
59d29c14bd Lock DVD presets to compliant defaults 2025-12-10 11:58:27 -05:00
7a1d8fa910 Add merge chrome and guard NVENC runtime availability 2025-12-10 11:44:29 -05:00
bdc1afc367 Add 360p/480p/540p resolution presets 2025-12-09 16:14:15 -05:00
894f7ef4f5 Add initial Merge module with chapters and queue support 2025-12-09 16:10:23 -05:00
87fb9eb151 Clean up Logs menu and show log path 2025-12-09 14:34:39 -05:00
e6ec933793 Add 5:3 aspect option 2025-12-09 14:27:38 -05:00
1448c12ac8 Persist convert config and tidy queue UI 2025-12-09 13:24:39 -05:00
9ea55f955e Fix hardware fallback retry to keep build green 2025-12-09 13:13:03 -05:00
6208dcfe8c Handle HW fallback retry return 2025-12-09 12:09:12 -05:00
4b99fe8029 Refine HW fallback: retry convert once in software 2025-12-09 11:50:48 -05:00
075f363872 Retry hardware failures inline with software and avoid UI crash 2025-12-09 11:08:37 -05:00
f60b2a648b Auto-retry convert in software if hardware encoder fails 2025-12-09 02:08:09 -05:00
d333a922ec Force Source aspect unless user changes it; keep configs aligned 2025-12-09 02:06:06 -05:00
57cfcde707 Include FFmpeg stderr in snippet job errors 2025-12-09 01:50:10 -05:00
1e9c7fe0aa Queue snippets and honor user aspect; skip HW accel if unavailable 2025-12-09 01:33:05 -05:00
4515793f5e Force Source aspect default on snippets to prevent 16:9 drift 2025-12-09 01:28:33 -05:00
d6c4f5da29 Do not change aspect on snippets unless user explicitly sets it 2025-12-09 01:16:53 -05:00
d1ba052a6d Apply current convert settings to snippets (scale/aspect/fps/bitrate/preset) 2025-12-09 01:13:21 -05:00
50fe10d9b3 Fix config reload and inspect status ticker build errors 2025-12-09 00:40:52 -05:00
048c906321 Add config load/save, queue/status in inspect, keep aspect default 2025-12-09 00:16:56 -05:00
c9a377e041 Fallback to software when auto hardware accel fails 2025-12-09 00:06:51 -05:00
44795b6951 Show bitrate in kbps/Mbps and expand presets 2025-12-08 23:53:40 -05:00
aff598c8b5 Default hardware accel to auto with helper selection 2025-12-08 23:28:47 -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
9d53f7b795 Remove unused origBytes to fix Windows build 2025-12-08 20:51:29 -05:00
9271f32376 Remove unused origBytes placeholder in compare metadata 2025-12-08 20:48:05 -05:00
d49c75ebf5 Suppress unused variable warning in compare metadata 2025-12-08 20:45:28 -05:00
a61c75d477 Add default bitrate fallback for CBR and format family labeling 2025-12-08 20:36:37 -05:00