From 14712f7785c9d85fa113594491fc541e3afb4089 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Wed, 24 Dec 2025 01:10:30 -0500 Subject: [PATCH] Fix mkv copy merge timestamps --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index c815a24..7f5fc98 100644 --- a/main.go +++ b/main.go @@ -3368,10 +3368,15 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress "-y", "-hide_banner", "-loglevel", "error", + } + if format == "mkv-copy" { + args = append(args, "-fflags", "+genpts", "-reset_timestamps", "1") + } + args = append(args, "-f", "concat", "-safe", "0", "-i", listFile.Name(), - } + ) if withChapters && chapterFile != nil { args = append(args, "-i", chapterFile.Name(), "-map_metadata", "1", "-map_chapters", "1") } @@ -3475,7 +3480,7 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress "-b:a", "256k", ) case "mkv-copy": - args = append(args, "-c", "copy") + args = append(args, "-c", "copy", "-avoid_negative_ts", "make_zero") case "mkv-h264": args = append(args, "-c:v", "libx264",