From e464e56115ae3f8859eb43a7200ce83ae98b821d Mon Sep 17 00:00:00 2001 From: ClosedPort22 <44864697+ClosedPort22@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:48:20 +0800 Subject: [PATCH] [SubtitleConvertor] Do not attempt to convert unsupported formats --- yt_dlp/postprocessor/ffmpeg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 164c46d143..0f64a9b94e 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -972,9 +972,9 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor): if ext == new_ext: self.to_screen(f'Subtitle file for {new_ext} is already in the requested format') continue - elif ext == 'json': + elif ext not in self.SUPPORTED_EXTS: self.to_screen( - 'You have requested to convert json subtitles into another format, ' + f'You have requested to convert {ext} subtitles into another format, ' 'which is currently not possible') continue old_file = sub['filepath']