At least with avconv 11, it will print 'avconv version 11, ..' to stderr, not stdout.
try:
out, err = subprocess.Popen(
[executable, '-version'],
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')
except OSError:
return False
firstline = out.partition(b'\n')[0].decode('ascii', 'ignore')