Fix DVD authoring SCR errors and queue animation persistence
DVD Authoring Fix: - Add remultiplex step after MPEG encoding for DVD compliance - Use ffmpeg -fflags +genpts -c copy -f dvd to fix timestamps - Resolves "ERR: SCR moves backwards" error from dvdauthor - FFmpeg direct encoding doesn't always create DVD-compliant streams - Remux regenerates presentation timestamps correctly Queue Animation Fix: - Stop stripe animation on completed jobs - Bug: Refresh() was always incrementing offset regardless of state - Now only increments offset when animStop != nil (animation running) - Completed/failed/cancelled jobs no longer show animated stripes Testing: - DVD authoring should now succeed on AVI files - Completed queue jobs should show static progress bar
This commit is contained in:
parent
901a6e45ed
commit
282db38c4f
|
|
@ -1615,7 +1615,28 @@ func (s *appState) runAuthoringPipeline(ctx context.Context, paths []string, reg
|
||||||
if err := runCommandWithLogger(ctx, platformConfig.FFmpegPath, args, logFn); err != nil {
|
if err := runCommandWithLogger(ctx, platformConfig.FFmpegPath, args, logFn); err != nil {
|
||||||
return err
|
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("")
|
advance("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,14 @@ func (r *stripedProgressRenderer) MinSize() fyne.Size {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *stripedProgressRenderer) Refresh() {
|
func (r *stripedProgressRenderer) Refresh() {
|
||||||
// small drift to animate stripes
|
// Only animate stripes when animation is active
|
||||||
r.bar.offset += 2
|
r.bar.animMu.Lock()
|
||||||
|
shouldAnimate := r.bar.animStop != nil
|
||||||
|
r.bar.animMu.Unlock()
|
||||||
|
|
||||||
|
if shouldAnimate {
|
||||||
|
r.bar.offset += 2
|
||||||
|
}
|
||||||
r.Layout(r.bg.Size())
|
r.Layout(r.bg.Size())
|
||||||
canvas.Refresh(r.bg)
|
canvas.Refresh(r.bg)
|
||||||
canvas.Refresh(r.stripes)
|
canvas.Refresh(r.stripes)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user