Use DEFAULT_LANGUAGE for und(efined) streams.

This commit is contained in:
Markus Birth 2020-06-01 14:35:29 +02:00
parent 904059955e
commit 673bf25c60
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

View File

@ -67,7 +67,11 @@ def add_audio_params(params, out_idx, stream):
params["filter_complex"].append("[0:{}]{}".format(stream["index"], NIGHT_MODE)) params["filter_complex"].append("[0:{}]{}".format(stream["index"], NIGHT_MODE))
else: else:
params["filter_complex"].append("[0:{}]{}".format(stream["index"], STEREO)) params["filter_complex"].append("[0:{}]{}".format(stream["index"], STEREO))
params["metadata:s:{}".format(out_idx)] = "language={}".format(stream["tags"]["language"]) lang = stream["tags"]["language"]
if lang in ["und"]:
print("Language fallback from \"{}\" to \"{}\".".format(lang, DEFAULT_LANGUAGE))
lang = DEFAULT_LANGUAGE
params["metadata:s:{}".format(out_idx)] = "language={}".format(lang)
def add_sub_params(params, out_idx, stream): def add_sub_params(params, out_idx, stream):
pass pass