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

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Stu Leak 2025-12-13 08:38:05 -05:00
parent 0577491eee
commit 81cb415663

View File

@ -2047,11 +2047,11 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress
}
}
args = append(args, outputPath)
// Add progress output for live updates
// Add progress output for live updates (must be before output path)
args = append(args, "-progress", "pipe:1", "-nostats")
args = append(args, outputPath)
// Execute
cmd := exec.CommandContext(ctx, platformConfig.FFmpegPath, args...)
utils.ApplyNoWindow(cmd)