mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
merge: Map video and audio tracks only once
When dealing with multiple subtitles, the singular video and audio tracks is added with each subtitle. This of course results in a multiplied file size which we don't want.
This commit is contained in:
parent
f06d3a85c2
commit
b64dbf3c3e
@ -181,11 +181,11 @@ class postprocess(object):
|
|||||||
audio_filename = u"{0}.m4a".format(name)
|
audio_filename = u"{0}.m4a".format(name)
|
||||||
cmd = [self.detect, "-i", orig_filename, "-i", audio_filename]
|
cmd = [self.detect, "-i", orig_filename, "-i", audio_filename]
|
||||||
|
|
||||||
|
arguments += ["-map", "{}".format(videotrack), "-map", "{}".format(audiotrack)]
|
||||||
if self.config.get("merge_subtitle"):
|
if self.config.get("merge_subtitle"):
|
||||||
langs = self.sublanguage()
|
langs = self.sublanguage()
|
||||||
for stream_num, language in enumerate(langs, start=audiotrack + 1):
|
for stream_num, language in enumerate(langs, start=audiotrack + 1):
|
||||||
arguments += ["-map", "{}".format(videotrack), "-map", "{}".format(audiotrack),
|
arguments += ["-map", str(stream_num), "-c:s:" + str(stream_num - 2), "mov_text",
|
||||||
"-map", str(stream_num), "-c:s:" + str(stream_num - 2), "mov_text",
|
|
||||||
"-metadata:s:s:" + str(stream_num - 2), "language=" + language]
|
"-metadata:s:s:" + str(stream_num - 2), "language=" + language]
|
||||||
if self.subfixes and len(self.subfixes) >= 2:
|
if self.subfixes and len(self.subfixes) >= 2:
|
||||||
for subfix in self.subfixes:
|
for subfix in self.subfixes:
|
||||||
|
Loading…
Reference in New Issue
Block a user