From ba39289d79452650263cc6e7950d41fba8dcef8e Mon Sep 17 00:00:00 2001 From: tfvlrue <35318734+tfvlrue@users.noreply.github.com> Date: Fri, 28 Aug 2020 12:00:30 -0400 Subject: [PATCH] Resolve audio/x-wav to "wav" extension, rather than "x-wav" (which ffmpeg does not recognize) This was causing ffmpeg errors when trying to downloading certain audio files from Soundcloud with the --add-metadata option set. --- youtube_dl/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index d1eca3760..c73f5e0ca 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -4173,6 +4173,7 @@ def mimetype2ext(mt): # Per RFC 3003, audio/mpeg can be .mp1, .mp2 or .mp3. Here use .mp3 as # it's the most popular one 'audio/mpeg': 'mp3', + 'audio/x-wav': 'wav', }.get(mt) if ext is not None: return ext