1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-30 18:38:32 +00:00

readme using make_readme.py, ffmpeg waring first, option.py update

This commit is contained in:
Rohit 2024-02-04 02:32:31 +05:30
parent 34fa76f93f
commit 54792c9da8
3 changed files with 10 additions and 8 deletions

View File

@ -1001,9 +1001,10 @@ ## Post-Processing Options:
--post-overwrites Overwrite post-processed files (default) --post-overwrites Overwrite post-processed files (default)
--no-post-overwrites Do not overwrite post-processed files --no-post-overwrites Do not overwrite post-processed files
--embed-subs Embed subtitles in downloaded media. --embed-subs Embed subtitles in downloaded media.
This option is available for video (mp4, webm, mkv) Available for video (mp4, webm, mkv) and
and audio (m4a, mp3, ogg, flac). audio (m4a, mp3, ogg, flac). Use --convert-
When embedding subtitles in audio files, use --convert-subtitles lrc subtitles lrc when embedding subtitles in
audio files
--no-embed-subs Do not embed subtitles (default) --no-embed-subs Do not embed subtitles (default)
--embed-thumbnail Embed thumbnail in the video as cover art --embed-thumbnail Embed thumbnail in the video as cover art
--no-embed-thumbnail Do not embed thumbnail (default) --no-embed-thumbnail Do not embed thumbnail (default)

View File

@ -1582,8 +1582,10 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
postproc.add_option( postproc.add_option(
'--embed-subs', '--embed-subs',
action='store_true', dest='embedsubtitles', default=False, 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). ' help=(
'When embedding subtitles in audio files, use --convert-subtitles lrc') '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( postproc.add_option(
'--no-embed-subs', '--no-embed-subs',
action='store_false', dest='embedsubtitles', action='store_false', dest='embedsubtitles',

View File

@ -671,11 +671,10 @@ def run(self, info):
return files_to_delete, info return files_to_delete, info
def embed_lyrics(self, audio_file, sub_dict): 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()): if not all(sub['ext'] == 'lrc' for sub in sub_dict.values()):
raise PostProcessingError('LRC subtitles required. Use "--convert-subs lrc" to convert') 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()] lyrics_list = [sub['data'] for sub in sub_dict.values()]
if audio_file.endswith('.mp3'): if audio_file.endswith('.mp3'):