aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-12-30 15:30:56 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-12-30 15:32:47 +0530
commitfbb73833067ba742459729809679a62f34b3e41e (patch)
tree2fcd738c21f1e8b5c5155593ca6c129785face3f /yt_dlp/utils.py
parentec54bd43f374cee429d67078ac61b75e66afb3fa (diff)
downloadhypervideo-pre-fbb73833067ba742459729809679a62f34b3e41e.tar.lz
hypervideo-pre-fbb73833067ba742459729809679a62f34b3e41e.tar.xz
hypervideo-pre-fbb73833067ba742459729809679a62f34b3e41e.zip
Add `weba` to known extensions
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 64c83a77a..ee5340cd2 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -3656,7 +3656,7 @@ def get_compatible_ext(*, vcodecs, acodecs, vexts, aexts, preferences=None):
COMPATIBLE_EXTS = (
{'mp3', 'mp4', 'm4a', 'm4p', 'm4b', 'm4r', 'm4v', 'ismv', 'isma', 'mov'},
- {'webm'},
+ {'webm', 'weba'},
)
for ext in preferences or vexts:
current_exts = {ext, *vexts, *aexts}
@@ -5962,7 +5962,7 @@ MEDIA_EXTENSIONS = Namespace(
common_video=('avi', 'flv', 'mkv', 'mov', 'mp4', 'webm'),
video=('3g2', '3gp', 'f4v', 'mk3d', 'divx', 'mpg', 'ogv', 'm4v', 'wmv'),
common_audio=('aiff', 'alac', 'flac', 'm4a', 'mka', 'mp3', 'ogg', 'opus', 'wav'),
- audio=('aac', 'ape', 'asf', 'f4a', 'f4b', 'm4b', 'm4p', 'm4r', 'oga', 'ogx', 'spx', 'vorbis', 'wma'),
+ audio=('aac', 'ape', 'asf', 'f4a', 'f4b', 'm4b', 'm4p', 'm4r', 'oga', 'ogx', 'spx', 'vorbis', 'wma', 'weba'),
thumbnails=('jpg', 'png', 'webp'),
storyboards=('mhtml', ),
subtitles=('srt', 'vtt', 'ass', 'lrc'),
@@ -6094,9 +6094,9 @@ class FormatSorter:
'vext': {'type': 'ordered', 'field': 'video_ext',
'order': ('mp4', 'mov', 'webm', 'flv', '', 'none'),
'order_free': ('webm', 'mp4', 'mov', 'flv', '', 'none')},
- 'aext': {'type': 'ordered', 'field': 'audio_ext',
- 'order': ('m4a', 'aac', 'mp3', 'ogg', 'opus', 'webm', '', 'none'),
- 'order_free': ('ogg', 'opus', 'webm', 'mp3', 'm4a', 'aac', '', 'none')},
+ 'aext': {'type': 'ordered', 'regex': True, 'field': 'audio_ext',
+ 'order': ('m4a', 'aac', 'mp3', 'ogg', 'opus', 'web[am]', '', 'none'),
+ 'order_free': ('ogg', 'opus', 'web[am]', 'mp3', 'm4a', 'aac', '', 'none')},
'hidden': {'visible': False, 'forced': True, 'type': 'extractor', 'max': -1000},
'aud_or_vid': {'visible': False, 'forced': True, 'type': 'multiple',
'field': ('vcodec', 'acodec'),