Commit Graph

2 Commits

Author SHA1 Message Date
c297bf1a09 feat(audio): Complete Phase 1 - Add normalization and batch processing
Implemented two-pass loudnorm normalization and batch processing:

**Two-Pass Loudnorm Normalization:**
- First pass: Analyze audio with FFmpeg loudnorm filter
- Parse JSON output to extract measured values (I, TP, LRA, thresh)
- Second pass: Apply normalization with measured parameters
- EBU R128 standard with configurable target LUFS and true peak
- Progress reporting for both analysis and extraction phases

**Batch Processing:**
- Toggle between single file and batch mode
- Add multiple video files via drop or browse
- Show batch file list with remove buttons
- Extract first audio track from each file in batch
- All files share same output format/quality settings

**Technical Implementation:**
- analyzeLoudnorm() - First pass analysis with JSON parsing
- extractAudioWithNormalization() - Second pass with measured values
- extractAudioSimple() - Single-pass extraction without normalization
- getAudioCodecArgs() - Codec-specific argument building
- runFFmpegExtraction() - Common extraction executor with progress
- addAudioBatchFile() - Add files to batch list
- updateAudioBatchFilesList() - Refresh batch UI
- refreshAudioView() - Switch between single/batch UI modes

**UI Enhancements:**
- Batch file list with remove buttons and total count
- Clear All button for batch mode
- Seamless switching between single and batch modes
- Progress tracking for normalization passes

**Files Modified:**
- audio_module.go - Added 390+ lines for normalization and batch mode
- main.go - Added batch UI container state fields

Phase 1 is now complete! 🎉

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 12:20:19 -05:00
75d0149f34 feat(audio): Implement audio extraction module (Phase 1 complete)
Added comprehensive audio extraction module with the following features:

**Core Functionality:**
- Audio track detection via ffprobe with JSON parsing
- Multi-track selection with checkboxes
- Format conversion: MP3, AAC, FLAC, WAV
- Quality presets and custom bitrate settings
- Queue integration for batch processing
- Config persistence (saves user preferences)

**UI Components:**
- Left panel: Video drop zone, file info, track list
- Right panel: Format/quality settings, normalization options, output directory
- Status bar with progress indication
- Extract Now and Add to Queue buttons

**Technical Implementation:**
- Created audio_module.go with all UI and logic
- Implemented executeAudioJob() for FFmpeg extraction
- Added audioTrackInfo struct for track metadata
- Config persistence using JSON (~/config/VideoTools/audio.json)
- Proper error handling and logging

**Files Modified:**
- audio_module.go (NEW) - Complete audio module
- main.go - Audio state fields, module registration, navigation
- internal/queue/queue.go - JobTypeAudio already existed

**Remaining Phase 1 Tasks:**
- Two-pass loudnorm normalization
- Batch mode for multiple videos

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 21:12:26 -05:00