浏览代码

[ffmpeg] Also look into stderr for extracting the version

At least with avconv 11, it will print 'avconv version 11, ..' to stderr, not stdout.
Jaime Marquínez Ferrándiz 11 年之前
父节点
当前提交
5f82b129e0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/postprocessor/ffmpeg.py

+ 1 - 1
youtube_dl/postprocessor/ffmpeg.py

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