|
@ -393,7 +393,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor): |
|
|
sub_ext = sub_info['ext'] |
|
|
sub_ext = sub_info['ext'] |
|
|
if ext != 'webm' or ext == 'webm' and sub_ext == 'vtt': |
|
|
if ext != 'webm' or ext == 'webm' and sub_ext == 'vtt': |
|
|
sub_langs.append(lang) |
|
|
sub_langs.append(lang) |
|
|
sub_filenames.append(subtitles_filename(filename, lang, sub_ext)) |
|
|
|
|
|
|
|
|
sub_filenames.append(subtitles_filename(filename, lang, sub_ext, ext)) |
|
|
else: |
|
|
else: |
|
|
if not webm_vtt_warn and ext == 'webm' and sub_ext != 'vtt': |
|
|
if not webm_vtt_warn and ext == 'webm' and sub_ext != 'vtt': |
|
|
webm_vtt_warn = True |
|
|
webm_vtt_warn = True |
|
@ -606,9 +606,9 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor): |
|
|
self._downloader.to_screen( |
|
|
self._downloader.to_screen( |
|
|
'[ffmpeg] Subtitle file for %s is already in the requested format' % new_ext) |
|
|
'[ffmpeg] Subtitle file for %s is already in the requested format' % new_ext) |
|
|
continue |
|
|
continue |
|
|
old_file = subtitles_filename(filename, lang, ext) |
|
|
|
|
|
|
|
|
old_file = subtitles_filename(filename, lang, ext, info.get('ext')) |
|
|
sub_filenames.append(old_file) |
|
|
sub_filenames.append(old_file) |
|
|
new_file = subtitles_filename(filename, lang, new_ext) |
|
|
|
|
|
|
|
|
new_file = subtitles_filename(filename, lang, new_ext, info.get('ext')) |
|
|
|
|
|
|
|
|
if ext in ('dfxp', 'ttml', 'tt'): |
|
|
if ext in ('dfxp', 'ttml', 'tt'): |
|
|
self._downloader.report_warning( |
|
|
self._downloader.report_warning( |
|
@ -616,7 +616,7 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor): |
|
|
'which results in style information loss') |
|
|
'which results in style information loss') |
|
|
|
|
|
|
|
|
dfxp_file = old_file |
|
|
dfxp_file = old_file |
|
|
srt_file = subtitles_filename(filename, lang, 'srt') |
|
|
|
|
|
|
|
|
srt_file = subtitles_filename(filename, lang, 'srt', info.get('ext')) |
|
|
|
|
|
|
|
|
with open(dfxp_file, 'rb') as f: |
|
|
with open(dfxp_file, 'rb') as f: |
|
|
srt_data = dfxp2srt(f.read()) |
|
|
srt_data = dfxp2srt(f.read()) |
|
|