diff options
author | Diego Fernando Rodríguez Varón <diegorodriguezv@gmail.com> | 2020-11-14 09:40:51 -0500 |
---|---|---|
committer | Diego Fernando Rodríguez Varón <diegorodriguezv@gmail.com> | 2020-11-14 09:40:51 -0500 |
commit | a2044d57ca89a463a731febd5e95033c36427ab6 (patch) | |
tree | 10a57e386d3bcc6382a813bcbe785eed08fed0eb /youtube_dlc/postprocessor/ffmpeg.py | |
parent | fff50711120b1a1c0477550748768d1e5b1fb755 (diff) | |
parent | d052b9a112fb7ae749a829dceba6e3289663a303 (diff) | |
download | hypervideo-pre-a2044d57ca89a463a731febd5e95033c36427ab6.tar.lz hypervideo-pre-a2044d57ca89a463a731febd5e95033c36427ab6.tar.xz hypervideo-pre-a2044d57ca89a463a731febd5e95033c36427ab6.zip |
Merge branch 'master' of https://github.com/blackjack4494/yt-dlc into fix-tmz
Diffstat (limited to 'youtube_dlc/postprocessor/ffmpeg.py')
-rw-r--r-- | youtube_dlc/postprocessor/ffmpeg.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/youtube_dlc/postprocessor/ffmpeg.py b/youtube_dlc/postprocessor/ffmpeg.py index 5e85f4eeb..c38db3143 100644 --- a/youtube_dlc/postprocessor/ffmpeg.py +++ b/youtube_dlc/postprocessor/ffmpeg.py @@ -412,7 +412,9 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor): for lang, sub_info in subtitles.items(): sub_ext = sub_info['ext'] - if ext != 'webm' or ext == 'webm' and sub_ext == 'vtt': + if sub_ext == 'json': + self._downloader.to_screen('[ffmpeg] JSON subtitles cannot be embedded') + elif ext != 'webm' or ext == 'webm' and sub_ext == 'vtt': sub_langs.append(lang) sub_filenames.append(subtitles_filename(filename, lang, sub_ext, ext)) else: @@ -643,13 +645,18 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor): self._downloader.to_screen( '[ffmpeg] Subtitle file for %s is already in the requested format' % new_ext) continue + elif ext == 'json': + self._downloader.to_screen( + '[ffmpeg] You have requested to convert json subtitles into another format, ' + 'which is currently not possible') + continue old_file = subtitles_filename(filename, lang, ext, info.get('ext')) sub_filenames.append(old_file) new_file = subtitles_filename(filename, lang, new_ext, info.get('ext')) if ext in ('dfxp', 'ttml', 'tt'): self._downloader.report_warning( - 'You have requested to convert dfxp (TTML) subtitles into another format, ' + '[ffmpeg] You have requested to convert dfxp (TTML) subtitles into another format, ' 'which results in style information loss') dfxp_file = old_file |