diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-12-21 16:54:38 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-12-21 21:40:03 +0530 |
commit | 1cefca9e440f343281779e47720128e9614cf147 (patch) | |
tree | 268e62fc2e7664083b98c6c34a27d303c26744f5 | |
parent | 5edb8dfec250a41fc199d03336da3957eceb0cb2 (diff) | |
download | hypervideo-pre-1cefca9e440f343281779e47720128e9614cf147.tar.lz hypervideo-pre-1cefca9e440f343281779e47720128e9614cf147.tar.xz hypervideo-pre-1cefca9e440f343281779e47720128e9614cf147.zip |
Add warning when using `-f best`
-rw-r--r-- | yt_dlp/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index ab68f26c0..9acc10c91 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -136,6 +136,11 @@ def _real_main(argv=None): sys.exit(0) # Conflicting, missing and erroneous options + if opts.format == 'best': + warnings.append('.\n '.join( + '"-f best" selects the best pre-merged format which is often not the best option', + 'To let yt-dlp download and merge the best available formats, simply do not pass any format selection', + 'If you know what you are doing and want only the best pre-merged format, use "-f b" instead to suppress this warning')) if opts.usenetrc and (opts.username is not None or opts.password is not None): parser.error('using .netrc conflicts with giving username/password') if opts.password is not None and opts.username is None: |