From e1c4d9ca508dddc6990b5759ef26ff9efc6341e3 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Tue, 30 Dec 2025 15:41:03 -0500 Subject: [PATCH] Fix DVD authoring VOBU errors with proper MPEG-PS muxing Critical fix for dvdauthor "Skipping sector at inoffset 0" errors: - Add -f dvd format to initial MPEG encoding - Add -muxrate 10080000 (10.08 Mbps DVD standard mux rate) - Add -packetsize 2048 (DVD packet size requirement) - Apply same parameters to remux and concat steps - Ensures proper VOBU (Video Object Unit) boundaries - Creates DVD-compliant MPEG-PS streams from encoding This fixes the "dvdauthor structure creation failed" error when authoring multi-scene DVDs. The MPEG files now have proper DVD navigation structure that dvdauthor can process. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- author_module.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/author_module.go b/author_module.go index 11464da..50c395f 100644 --- a/author_module.go +++ b/author_module.go @@ -1238,6 +1238,9 @@ func concatDVDMpg(inputs []string, output string) error { "-safe", "0", "-i", listPath, "-c", "copy", + "-f", "dvd", // Maintain DVD format + "-muxrate", "10080000", // DVD mux rate + "-packetsize", "2048", // DVD packet size output, } return runCommand(platformConfig.FFmpegPath, args) @@ -1733,7 +1736,15 @@ func (s *appState) runAuthoringPipeline(ctx context.Context, paths []string, reg } remuxPath := filepath.Join(workDir, fmt.Sprintf("title_%02d_remux.mpg", i+1)) - remuxArgs := []string{"-fflags", "+genpts", "-i", outPath, "-c", "copy", "-f", "dvd", "-y", remuxPath} + remuxArgs := []string{ + "-fflags", "+genpts", + "-i", outPath, + "-c", "copy", + "-f", "dvd", + "-muxrate", "10080000", + "-packetsize", "2048", + "-y", remuxPath, + } if logFn != nil { logFn(fmt.Sprintf(">> ffmpeg %s (remuxing for DVD compliance)", strings.Join(remuxArgs, " "))) } @@ -2216,6 +2227,9 @@ func buildAuthorFFmpegArgs(inputPath, outputPath, region, aspect string, progres "-b:a", "192k", "-ar", "48000", "-ac", "2", + "-f", "dvd", // DVD-compliant MPEG-PS format + "-muxrate", "10080000", // DVD mux rate (10.08 Mbps) + "-packetsize", "2048", // DVD packet size outputPath, )