[ffmpeg] Also look into stderr for extracting the version
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 26 Oct 2014 17:11:31 +0000 (18:11 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 26 Oct 2014 17:11:31 +0000 (18:11 +0100)
At least with avconv 11, it will print 'avconv version 11, ..' to stderr, not stdout.

youtube_dl/postprocessor/ffmpeg.py

index e13deab4b7b1f549a5048dc90c1fb867f69b5b2d..19fc135dc356017e7a540d512f870fe9298f408b 100644 (file)
@@ -26,7 +26,7 @@ def get_version(executable):
     try:
         out, err = subprocess.Popen(
             [executable, '-version'],
-            stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+            stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()
     except OSError:
         return False
     firstline = out.partition(b'\n')[0].decode('ascii', 'ignore')