Don't set the '-aq' option with the opus format (fixes #1263)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 12 Oct 2013 11:29:02 +0000 (13:29 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 12 Oct 2013 11:30:30 +0000 (13:30 +0200)
youtube_dl/PostProcessor.py

index fbf8a7f98ffc67792c48de2cb21a1536ffba08ac..07b6895c0abb5c424edf6345cefae1c08d97f088 100644 (file)
@@ -178,7 +178,8 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
             extension = self._preferredcodec
             more_opts = []
             if self._preferredquality is not None:
-                if int(self._preferredquality) < 10:
+                # The opus codec doesn't support the -aq option
+                if int(self._preferredquality) < 10 and extension != 'opus':
                     more_opts += [self._exes['avconv'] and '-q:a' or '-aq', self._preferredquality]
                 else:
                     more_opts += [self._exes['avconv'] and '-b:a' or '-ab', self._preferredquality + 'k']