Commit Graph

252 Commits

Author SHA1 Message Date
7aa0de8bcb Bump version to v0.1.0-dev19 2025-12-20 21:55:13 -05:00
a9804b3ad3 Add Author module skeleton with tabbed interface
Renamed "DVD Author" to "Author" for broader disc production workflow.
Created foundation for complete authoring pipeline with three main tasks:

**Module Structure:**
- Tabbed interface with Chapters, Rip DVD/ISO, and Author Disc tabs
- Added authorChapter struct (timestamp, title, auto-detected flag)
- Added author module state fields (file, chapters, threshold, detecting)

**Chapters Tab (Basic UI):**
- File selection with video probing integration
- Scene detection sensitivity slider (0.1-0.9 threshold)
- Placeholder UI for chapter list and controls
- Add Chapter and Export Chapters buttons (placeholders)
- Foundation for FFmpeg scdet scene detection

**Rip DVD/ISO Tab:**
- Placeholder for high-quality disc extraction
- Will support lossless ripping (like FLAC from CD)
- Preserve all audio/subtitle tracks

**Author Disc Tab:**
- Placeholder for VIDEO_TS/ISO creation
- Will support burn-ready output, NTSC/PAL, menus

Changes:
- Modified main.go: Added authorChapter struct, author state fields,
  showAuthorView(), buildAuthorView(), buildChaptersTab(),
  buildRipTab(), buildAuthorDiscTab()
- Modified internal/modules/handlers.go: Renamed HandleDVDAuthor to
  HandleAuthor with updated comment
- Updated DONE.md with Author module skeleton details

Next steps: Implement FFmpeg scene detection, chapter list UI,
and DVD/ISO ripping functionality.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 21:33:55 -05:00
364d2099f5 Run gofmt on main.go for consistent formatting
Applied gofmt to fix code alignment and formatting consistency.
Changes are purely cosmetic (whitespace/alignment).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 21:17:26 -05:00
762c840de9 Add audio channel remixing options to convert module
Added advanced audio channel remixing features for videos with imbalanced
left/right audio channels (e.g., music in left ear, vocals in right ear).

New audio channel options using FFmpeg pan filter:
- Left to Stereo: Copy left channel to both speakers
- Right to Stereo: Copy right channel to both speakers
- Mix to Stereo: Downmix both channels together evenly
- Swap L/R: Swap left and right channels

Changes:
- Updated audioChannelsSelect dropdown with 8 options (was 4)
- Implemented pan filter logic in all 4 FFmpeg command builders:
  - buildFFmpegCommandFromJob (main convert)
  - DVD encoding function
  - Convert command builder
  - Snippet generation
- Removed unused "os" import from internal/convert/ffmpeg.go
- Updated DONE.md with audio channel remixing feature

The pan filter syntax allows precise channel routing:
- pan=stereo|c0=c0|c1=c0 (left to both)
- pan=stereo|c0=c1|c1=c1 (right to both)
- pan=stereo|c0=0.5*c0+0.5*c1|c1=0.5*c0+0.5*c1 (mix)
- pan=stereo|c0=c1|c1=c0 (swap)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 21:07:48 -05:00
505db279d8 Gate AI upscale on ncnn backend 2025-12-20 20:56:24 -05:00
271c83ec74 Add Real-ESRGAN upscale controls and pipeline 2025-12-20 20:55:21 -05:00
28e2f40b75 Add frame interpolation presets in Filters 2025-12-20 20:25:21 -05:00
2f9995d8f1 Add configurable temp directory with SSD hint 2025-12-20 19:55:13 -05:00
91d38a1b3f Add DVD authoring placeholder and adjust snippet defaults 2025-12-20 18:49:54 -05:00
762403b770 Lower video pane min sizes for window snapping 2025-12-20 16:41:07 -05:00
66346d8cee Rearrange snippet controls with options toggle 2025-12-20 16:36:45 -05:00
e39b6a7f99 Fix snippet toggle button scope 2025-12-20 16:29:47 -05:00
a7b92cfa8e Collapse snippet tools behind a toggle 2025-12-20 16:27:19 -05:00
7b264c7224 Hide quality presets outside CRF mode 2025-12-20 16:22:48 -05:00
e002b586b1 Sync bitrate preset between simple and advanced 2025-12-20 16:13:32 -05:00
17900f2b0a Normalize bitrate preset default to 2.5 Mbps 2025-12-20 16:07:13 -05:00
3354017032 Expand and rename bitrate presets 2025-12-20 16:02:23 -05:00
7ae1bb10dd Add CRF preset dropdown with manual option 2025-12-20 15:57:49 -05:00
c9e34815da Prevent CRF control from showing in non-CRF modes 2025-12-20 15:52:36 -05:00
97cad9eeba Hide irrelevant bitrate controls by mode 2025-12-20 15:49:49 -05:00
3c4560a55a Default encoder preset to slow 2025-12-20 15:46:09 -05:00
69230dda0d Add 2.0 Mbps preset and default to 2.5 Mbps 2025-12-20 15:41:46 -05:00
4b1bdea7ed Restore target size reduction presets 2025-12-20 15:35:37 -05:00
19269a204d Fix reset tabs scope in convert view 2025-12-20 15:33:08 -05:00
cdf8b10769 Force reset to restore source resolution and frame rate 2025-12-20 15:30:41 -05:00
685707e8d1 Reset convert settings to full defaults 2025-12-20 15:25:51 -05:00
d20dcde5bb Refactor convert config reset to use helper function
- Extract reset defaults logic to resetConvertDefaults function
- Add setTargetFileSize helper with syncing guard
- Add syncingTargetSize flag to prevent update loops
- Consolidate reset button handlers to call shared function
- Improves code organization and maintainability

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 15:24:24 -05:00
c1ccb38062 Improve preset UX and finalize 800x600 UI scaling
UI Scaling Improvements:
- Reduce module tiles from 160x80 to 150x65
- Reduce title from 20 to 18
- Reduce queue tile from 140x50 to 120x40
- Reduce category labels to 12px
- Reduce padding from 8 to 4px
- Remove scrolling, everything fits in 800x600

Preset UX Improvements:
- Move "Manual" to bottom of all preset dropdowns
- Default bitrate preset: "2.5 Mbps - Medium Quality"
- Default target size: "100MB"
- Manual input fields hidden by default
- Show manual fields only when "Manual" selected

Encoding Preset Order:
- Reverse order: veryslow first, ultrafast last
- Better quality options now appear first
- Applied to both simple and advanced mode

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 15:23:14 -05:00
c62b7867fd Add unit selector for manual video bitrate 2025-12-20 15:14:12 -05:00
c6feb239b9 Ensure upscale targets recompute from presets 2025-12-20 14:58:02 -05:00
67b838e9ad Scale UI for 800x600 window compatibility and improve layout
UI Scaling:
- Reduce module tiles from 220x110 to 160x80
- Reduce title size from 28 to 20
- Reduce queue tile from 160x60 to 140x50 with smaller text
- Reduce section padding from 14 to 8 pixels
- Remove extra padding wrapper around tiles

Header Layout Improvements:
- Use border layout with title on left, controls on right
- Compact button labels: "☰ History" → "☰", "Run Benchmark" → "Benchmark"
- Eliminates wasted space in header

Queue Behavior Fix:
- "Clear Completed" always returns to main menu (not last module)
- "Clear All" always returns to main menu
- Prevents unwanted navigation to convert module after clearing

All changes work together to fit app within 800x600 default window

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 14:50:45 -05:00
2dae75dd8e Hide CRF input when lossless quality is selected 2025-12-20 14:47:47 -05:00
406709bec6 Sync target aspect between simple and advanced 2025-12-20 14:38:15 -05:00
ba1c364113 Default target aspect to Source unless user-set 2025-12-20 14:29:56 -05:00
601acf9ccf Replace benchmark error dialogs with notifications 2025-12-20 14:12:33 -05:00
e020f06873 Refresh history sidebar when jobs complete 2025-12-20 14:08:03 -05:00
121a61d627 Add unit selector for target file size 2025-12-20 13:35:39 -05:00
43efc84bf6 Estimate missing audio bitrate in metadata 2025-12-20 13:29:09 -05:00
5b76da0fdf Improve benchmark results sorting and cancel flow 2025-12-20 12:05:19 -05:00
86d2f2b835 Add progress bars to In Progress tab and fix lossless quality compatibility
In Progress Tab Enhancements:
- Added animated striped progress bars to in-progress jobs
- Exported ModuleColor function for reuse across modules
- Shows real-time progress (0-100%) with module-specific colors
- Progress updates automatically as jobs run
- Maintains consistent visual style with queue view

Lossless Quality Preset Improvements:
- H.265 and AV1 now support all bitrate modes with lossless quality
- Lossless with Target Size mode now works for H.265/AV1
- H.264 and MPEG-2 no longer show "Lossless" option (codec limitation)
- Dynamic quality dropdown updates based on selected codec
- Automatic fallback to "Near-Lossless" when switching from lossless-capable
  codec to non-lossless codec

Quality Options Logic:
- Base options: Draft, Standard, Balanced, High, Near-Lossless
- "Lossless" only appears for H.265 and AV1
- codecSupportsLossless() helper function checks compatibility
- updateQualityOptions() refreshes dropdown when codec changes

Lossless + Bitrate Mode Combinations:
- Lossless + CRF: Forces CRF 0 for perfect quality
- Lossless + CBR: Constant bitrate with lossless quality
- Lossless + VBR: Variable bitrate with lossless quality
- Lossless + Target Size: Calculates bitrate for exact file size with
  best possible quality (now allowed for H.265/AV1)

Technical Implementation:
- Added Progress field to ui.HistoryEntry struct
- Exported StripedProgress widget and ModuleColor function
- updateQualityOptions() function dynamically filters quality presets
- updateEncodingControls() handles lossless modes per codec
- Descriptive hints explain each lossless+bitrate combination

This allows professional workflows where lossless quality is desired
but file size constraints still need to be met using Target Size mode.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 18:27:24 -05:00
12b2b221b9 Add 'In Progress' tab to history sidebar
Features:
- New "In Progress" tab shows running/pending jobs
- Displays active jobs without opening full queue
- Tab positioned first for quick visibility
- Shows "Running..." or "Pending" status
- No delete button on active jobs (only completed/failed)

Implementation:
- Updated BuildHistorySidebar to accept activeJobs parameter
- Converts queue.Job to ui.HistoryEntry for display
- Filters running/pending jobs from queue
- Conditional delete button (nil check)
- Dynamic status text based on job state

UX Improvements:
- Quick glance at current activity without queue view
- Three-tab layout: In Progress → Completed → Failed
- Consistent styling with existing history entries
- Tappable entries to view full job details

This allows users to monitor active conversions directly
from the history sidebar, reducing the need to constantly
check the full job queue view.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 18:02:03 -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