]> jfr.im git - yt-dlp.git/commitdiff
Add warning when using `-f best`
authorpukkandan <redacted>
Tue, 21 Dec 2021 11:24:38 +0000 (16:54 +0530)
committerpukkandan <redacted>
Tue, 21 Dec 2021 16:10:03 +0000 (21:40 +0530)
yt_dlp/__init__.py

index ab68f26c006e2797cee683d3df50c50a5ea574b3..9acc10c913bc9d0b793552b246289659015dabf3 100644 (file)
@@ -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: