mirror of https://github.com/blackjack4494/yt-dlc
[postprocessor/ffmpeg] Embed subtitles with non-standard language codes (refs #18765)
This commit is contained in:
parent
b7acc83550
commit
04fb6928da
|
@ -384,8 +384,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
|
||||||
opts += ['-c:s', 'mov_text']
|
opts += ['-c:s', 'mov_text']
|
||||||
for (i, lang) in enumerate(sub_langs):
|
for (i, lang) in enumerate(sub_langs):
|
||||||
opts.extend(['-map', '%d:0' % (i + 1)])
|
opts.extend(['-map', '%d:0' % (i + 1)])
|
||||||
lang_code = ISO639Utils.short2long(lang)
|
lang_code = ISO639Utils.short2long(lang) or lang
|
||||||
if lang_code is not None:
|
|
||||||
opts.extend(['-metadata:s:s:%d' % i, 'language=%s' % lang_code])
|
opts.extend(['-metadata:s:s:%d' % i, 'language=%s' % lang_code])
|
||||||
|
|
||||||
temp_filename = prepend_extension(filename, 'temp')
|
temp_filename = prepend_extension(filename, 'temp')
|
||||||
|
|
Loading…
Reference in New Issue