From 54792c9da84bccfed4425d71ddfcce267f3bf798 Mon Sep 17 00:00:00 2001 From: Rohit Date: Sun, 4 Feb 2024 02:32:31 +0530 Subject: [PATCH] readme using make_readme.py, ffmpeg waring first, option.py update --- README.md | 7 ++++--- yt_dlp/options.py | 6 ++++-- yt_dlp/postprocessor/ffmpeg.py | 5 ++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5d7e1bf2bf..979d10fbe3 100644 --- a/README.md +++ b/README.md @@ -1001,9 +1001,10 @@ ## Post-Processing Options: --post-overwrites Overwrite post-processed files (default) --no-post-overwrites Do not overwrite post-processed files --embed-subs Embed subtitles in downloaded media. - This option is available for video (mp4, webm, mkv) - and audio (m4a, mp3, ogg, flac). - When embedding subtitles in audio files, use --convert-subtitles lrc + Available for video (mp4, webm, mkv) and + audio (m4a, mp3, ogg, flac). Use --convert- + subtitles lrc when embedding subtitles in + audio files --no-embed-subs Do not embed subtitles (default) --embed-thumbnail Embed thumbnail in the video as cover art --no-embed-thumbnail Do not embed thumbnail (default) diff --git a/yt_dlp/options.py b/yt_dlp/options.py index d6cbdaf2bd..3fa52c8ca3 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -1582,8 +1582,10 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs): postproc.add_option( '--embed-subs', action='store_true', dest='embedsubtitles', default=False, - help='Embed subtitles in downloaded media. This option is available for video (mp4, webm, mkv) and audio (m4a, mp3, ogg, flac). ' - 'When embedding subtitles in audio files, use --convert-subtitles lrc') + help=( + 'Embed subtitles in downloaded media. ' + 'Available for video (mp4, webm, mkv) and audio (m4a, mp3, ogg, flac). ' + 'Use --convert-subtitles lrc when embedding subtitles in audio files')) postproc.add_option( '--no-embed-subs', action='store_false', dest='embedsubtitles', diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 996c821f87..9a685c5a53 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -671,11 +671,10 @@ def run(self, info): return files_to_delete, info def embed_lyrics(self, audio_file, sub_dict): - if len(sub_dict) > 1: - self.report_warning('More than one subtitle file found. Your media player will likely be unable to display all of them.') - if not all(sub['ext'] == 'lrc' for sub in sub_dict.values()): raise PostProcessingError('LRC subtitles required. Use "--convert-subs lrc" to convert') + if len(sub_dict) > 1: + self.report_warning('More than one subtitle file found. Your media player will likely be unable to display all of them.') lyrics_list = [sub['data'] for sub in sub_dict.values()] if audio_file.endswith('.mp3'):