mkvmerge: set track languages and title

This commit is contained in:
mappu 2021-04-12 11:52:03 +12:00
parent 367210ff23
commit 793f3b5900
1 changed files with 5 additions and 1 deletions

View File

@ -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