Fix mkv copy merge timestamps
This commit is contained in:
parent
ff9071902e
commit
14712f7785
9
main.go
9
main.go
|
|
@ -3368,10 +3368,15 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress
|
||||||
"-y",
|
"-y",
|
||||||
"-hide_banner",
|
"-hide_banner",
|
||||||
"-loglevel", "error",
|
"-loglevel", "error",
|
||||||
|
}
|
||||||
|
if format == "mkv-copy" {
|
||||||
|
args = append(args, "-fflags", "+genpts", "-reset_timestamps", "1")
|
||||||
|
}
|
||||||
|
args = append(args,
|
||||||
"-f", "concat",
|
"-f", "concat",
|
||||||
"-safe", "0",
|
"-safe", "0",
|
||||||
"-i", listFile.Name(),
|
"-i", listFile.Name(),
|
||||||
}
|
)
|
||||||
if withChapters && chapterFile != nil {
|
if withChapters && chapterFile != nil {
|
||||||
args = append(args, "-i", chapterFile.Name(), "-map_metadata", "1", "-map_chapters", "1")
|
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",
|
"-b:a", "256k",
|
||||||
)
|
)
|
||||||
case "mkv-copy":
|
case "mkv-copy":
|
||||||
args = append(args, "-c", "copy")
|
args = append(args, "-c", "copy", "-avoid_negative_ts", "make_zero")
|
||||||
case "mkv-h264":
|
case "mkv-h264":
|
||||||
args = append(args,
|
args = append(args,
|
||||||
"-c:v", "libx264",
|
"-c:v", "libx264",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user