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
This commit is contained in:
Stu Leak 2025-12-13 08:38:05 -05:00
parent 5390f9d355
commit 7c5bd3e2a3

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)