diff --git a/DONE.md b/DONE.md index 73ab3b5..47539df 100644 --- a/DONE.md +++ b/DONE.md @@ -103,6 +103,17 @@ This file tracks completed features, fixes, and milestones. - Better quality options now appear at top of list - Applied consistently to both simple and advanced modes +- ✅ **Audio Channel Remixing** (2025-12-20 continuation) + - Added advanced audio channel options for videos with imbalanced L/R channels + - New options using FFmpeg pan filter: + - "Left to Stereo" - Copy left channel to both speakers (music only) + - "Right to Stereo" - Copy right channel to both speakers (vocals only) + - "Mix to Stereo" - Downmix both channels together evenly + - "Swap L/R" - Swap left and right channels + - Implemented in all 4 command builders (DVD, convert, snippet) + - Maintains existing options (Source, Mono, Stereo, 5.1) + - Solves problem of videos with music in one ear and vocals in the other + ### Features (2025-12-18 Session) - ✅ **History Sidebar Enhancements** - Delete button ("×") on each history entry diff --git a/internal/convert/ffmpeg.go b/internal/convert/ffmpeg.go index d072675..ba7e8a0 100644 --- a/internal/convert/ffmpeg.go +++ b/internal/convert/ffmpeg.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - "os" "os/exec" "path/filepath" "strings" diff --git a/main.go b/main.go index ec90fdf..11d4e7a 100644 --- a/main.go +++ b/main.go @@ -3814,6 +3814,18 @@ func (s *appState) executeConvertJob(ctx context.Context, job *queue.Job, progre args = append(args, "-ac", "2") case "5.1": args = append(args, "-ac", "6") + case "Left to Stereo": + // Copy left channel to both left and right + args = append(args, "-af", "pan=stereo|c0=c0|c1=c0") + case "Right to Stereo": + // Copy right channel to both left and right + args = append(args, "-af", "pan=stereo|c0=c1|c1=c1") + case "Mix to Stereo": + // Downmix both channels together, then duplicate to L+R + args = append(args, "-af", "pan=stereo|c0=0.5*c0+0.5*c1|c1=0.5*c0+0.5*c1") + case "Swap L/R": + // Swap left and right channels + args = append(args, "-af", "pan=stereo|c0=c1|c1=c0") } } @@ -10495,6 +10507,18 @@ func (s *appState) startConvert(status *widget.Label, btn, cancelBtn *widget.But args = append(args, "-ac", "2") case "5.1": args = append(args, "-ac", "6") + case "Left to Stereo": + // Copy left channel to both left and right + args = append(args, "-af", "pan=stereo|c0=c0|c1=c0") + case "Right to Stereo": + // Copy right channel to both left and right + args = append(args, "-af", "pan=stereo|c0=c1|c1=c1") + case "Mix to Stereo": + // Downmix both channels together, then duplicate to L+R + args = append(args, "-af", "pan=stereo|c0=0.5*c0+0.5*c1|c1=0.5*c0+0.5*c1") + case "Swap L/R": + // Swap left and right channels + args = append(args, "-af", "pan=stereo|c0=c1|c1=c0") } } @@ -11103,6 +11127,18 @@ func (s *appState) generateSnippet() { args = append(args, "-ac", "2") case "5.1": args = append(args, "-ac", "6") + case "Left to Stereo": + // Copy left channel to both left and right + args = append(args, "-af", "pan=stereo|c0=c0|c1=c0") + case "Right to Stereo": + // Copy right channel to both left and right + args = append(args, "-af", "pan=stereo|c0=c1|c1=c1") + case "Mix to Stereo": + // Downmix both channels together, then duplicate to L+R + args = append(args, "-af", "pan=stereo|c0=0.5*c0+0.5*c1|c1=0.5*c0+0.5*c1") + case "Swap L/R": + // Swap left and right channels + args = append(args, "-af", "pan=stereo|c0=c1|c1=c0") } } }