1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-23 00:07:49 +00:00

[postprocessor/ffmpeg] Embed subtitles with non-standard language codes (refs #18765)

This commit is contained in:
Sergey M․ 2019-01-07 00:57:24 +07:00
parent b7acc83550
commit 04fb6928da
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -384,8 +384,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
opts += ['-c:s', 'mov_text']
for (i, lang) in enumerate(sub_langs):
opts.extend(['-map', '%d:0' % (i + 1)])
lang_code = ISO639Utils.short2long(lang)
if lang_code is not None:
lang_code = ISO639Utils.short2long(lang) or lang
opts.extend(['-metadata:s:s:%d' % i, 'language=%s' % lang_code])
temp_filename = prepend_extension(filename, 'temp')