From 316f2650f8b588507159cddcd13941dd67a4f70c Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 7 Apr 2022 16:41:51 +0530 Subject: [PATCH] Ignore `mhtml` formats from `-f mergeall` Closes #3324 --- yt_dlp/YoutubeDL.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index d03229d86..f5ea5a0b5 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2179,7 +2179,8 @@ class YoutubeDL(object): yield from _check_formats(ctx['formats'][::-1]) elif format_spec == 'mergeall': def selector_function(ctx): - formats = list(_check_formats(ctx['formats'])) + formats = list(_check_formats( + f for f in ctx['formats'] if f.get('vcodec') != 'none' or f.get('acodec') != 'none')) if not formats: return merged_format = formats[-1]