diff --git a/author_module.go b/author_module.go index 4aafb98..c6b3aa5 100644 --- a/author_module.go +++ b/author_module.go @@ -1615,7 +1615,28 @@ func (s *appState) runAuthoringPipeline(ctx context.Context, paths []string, reg if err := runCommandWithLogger(ctx, platformConfig.FFmpegPath, args, logFn); err != nil { return err } - mpgPaths = append(mpgPaths, outPath) + + // Remultiplex the MPEG to fix timestamps for DVD compliance + // This resolves "SCR moves backwards" errors from dvdauthor + remuxPath := filepath.Join(workDir, fmt.Sprintf("title_%02d_remux.mpg", i+1)) + remuxArgs := []string{ + "-fflags", "+genpts", + "-i", outPath, + "-c", "copy", + "-f", "dvd", + "-y", + remuxPath, + } + if logFn != nil { + logFn(fmt.Sprintf(">> ffmpeg %s (remuxing for DVD compliance)", strings.Join(remuxArgs, " "))) + } + if err := runCommandWithLogger(ctx, platformConfig.FFmpegPath, remuxArgs, logFn); err != nil { + return fmt.Errorf("remux failed: %w", err) + } + + // Remove original encode, use remuxed version + os.Remove(outPath) + mpgPaths = append(mpgPaths, remuxPath) advance("") } diff --git a/internal/ui/queueview.go b/internal/ui/queueview.go index 92beaac..82908b9 100644 --- a/internal/ui/queueview.go +++ b/internal/ui/queueview.go @@ -171,8 +171,14 @@ func (r *stripedProgressRenderer) MinSize() fyne.Size { } func (r *stripedProgressRenderer) Refresh() { - // small drift to animate stripes - r.bar.offset += 2 + // Only animate stripes when animation is active + r.bar.animMu.Lock() + shouldAnimate := r.bar.animStop != nil + r.bar.animMu.Unlock() + + if shouldAnimate { + r.bar.offset += 2 + } r.Layout(r.bg.Size()) canvas.Refresh(r.bg) canvas.Refresh(r.stripes)