Switch to m4a by default (Closes #240)
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 1 Feb 2013 17:23:20 +0000 (18:23 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 1 Feb 2013 17:23:20 +0000 (18:23 +0100)
youtube_dl/PostProcessor.py

index 545b6992b4c41c8cc59c260f6eb9faa21e14eb91..70dc010043c84a22dd9635a9b2b171e36c29b203 100644 (file)
@@ -143,10 +143,10 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
 
         more_opts = []
         if self._preferredcodec == 'best' or self._preferredcodec == filecodec or (self._preferredcodec == 'm4a' and filecodec == 'aac'):
-            if self._preferredcodec == 'm4a' and filecodec == 'aac':
+            if filecodec == 'aac' and self._preferredcodec in ['m4a', 'best']:
                 # Lossless, but in another container
                 acodec = 'copy'
-                extension = self._preferredcodec
+                extension = 'm4a'
                 more_opts = [self._exes['avconv'] and '-bsf:a' or '-absf', 'aac_adtstoasc']
             elif filecodec in ['aac', 'mp3', 'vorbis', 'opus']:
                 # Lossless if possible