From 793f3b5900cbd77c9200640b70eed547c9e04fd0 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 12 Apr 2021 11:52:03 +1200 Subject: [PATCH] mkvmerge: set track languages and title --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ac10497..5758893 100644 --- a/main.go +++ b/main.go @@ -124,7 +124,11 @@ func performDownload(ctx context.Context, cfg *config, targetUrl string) error { // Mux the subtitles into the file - mkvm := exec.CommandContext(ctx, cfg.mkvmerge, `-o`, filepath.Join(tmpdir, "muxed.mkv"), filepath.Join(tmpdir, "downloaded.mkv"), filepath.Join(tmpdir, "subtitles.srt")) + mkvm := exec.CommandContext(ctx, cfg.mkvmerge, + `--title`, ltc.Title, + `-o`, filepath.Join(tmpdir, "muxed.mkv"), + `--language`, `0:jpn`, `--language`, `1:jpn`, filepath.Join(tmpdir, "downloaded.mkv"), + `--language`, `0:eng`, `--default-track`, `0`, filepath.Join(tmpdir, "subtitles.srt")) if cfg.loglevel >= LogLevelVerbose { mkvm.Stdout = os.Stdout mkvm.Stderr = os.Stderr