]> jfr.im git - yt-dlp.git/commitdiff
[FormatSort] Allow user to prefer av01 over vp9
authorpukkandan <redacted>
Mon, 1 Feb 2021 19:38:53 +0000 (01:08 +0530)
committerpukkandan <redacted>
Mon, 1 Feb 2021 21:49:21 +0000 (03:19 +0530)
The default is still vp9

youtube_dlc/extractor/common.py

index 7b2f158e162de2f98f328c466f8917c410a5a19b..e13ba5a3941a324687718969bdb223495b2dc05c 100644 (file)
@@ -1367,12 +1367,12 @@ class FormatSort:
         regex = r' *((?P<reverse>\+)?(?P<field>[a-zA-Z0-9_]+)((?P<seperator>[~:])(?P<limit>.*?))?)? *$'
 
         default = ('hidden', 'has_video', 'extractor', 'lang', 'quality',
-                   'res', 'fps', 'codec', 'size', 'br', 'asr',
+                   'res', 'fps', 'codec:vp9', 'size', 'br', 'asr',
                    'proto', 'ext', 'has_audio', 'source', 'format_id')
 
         settings = {
             'vcodec': {'type': 'ordered', 'regex': True,
-                       'order': ['vp9', '(h265|he?vc?)', '(h264|avc)', 'vp8', '(mp4v|h263)', 'theora', '', None, 'none']},
+                       'order': ['av0?1', 'vp9', '(h265|he?vc?)', '(h264|avc)', 'vp8', '(mp4v|h263)', 'theora', '', None, 'none']},
             'acodec': {'type': 'ordered', 'regex': True,
                        'order': ['opus', 'vorbis', 'aac', 'mp?4a?', 'mp3', 'e?a?c-?3', 'dts', '', None, 'none']},
             'proto': {'type': 'ordered', 'regex': True, 'field': 'protocol',