1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05: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)
--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)

View file

@ -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',

View file

@ -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'):