From 62938a500ff8ef70889451c9ec7534a3f18fb2a8 Mon Sep 17 00:00:00 2001 From: bytedream Date: Mon, 5 Sep 2022 00:24:31 +0200 Subject: [PATCH] Disable subtitles by default on re-encode --- cli/commands/archive/archive.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cli/commands/archive/archive.go b/cli/commands/archive/archive.go index 63eac77..841b33d 100644 --- a/cli/commands/archive/archive.go +++ b/cli/commands/archive/archive.go @@ -670,7 +670,15 @@ func archiveFFmpeg(ctx context.Context, dst io.Writer, videoFiles, audioFiles, s tmpFile.Close() errBuf.Reset() - cmd = exec.CommandContext(ctx, "ffmpeg", "-y", "-i", file.Name(), "-c", "copy", "-map", "0", "-t", fmt.Sprintf("%02d:%02d:%02d.%d", videoLength[0], videoLength[1], videoLength[2], videoLength[3]), "-f", "matroska", tmpFile.Name()) + cmd = exec.CommandContext(ctx, "ffmpeg", + "-y", + "-i", file.Name(), + "-map", "0", + "-c", "copy", + "-disposition:s:0", "0", + "-t", fmt.Sprintf("%02d:%02d:%02d.%d", videoLength[0], videoLength[1], videoLength[2], videoLength[3]), + "-f", "matroska", + tmpFile.Name()) cmd.Stderr = &errBuf if err = cmd.Run(); err != nil { return fmt.Errorf(errBuf.String())