[processor.ffmpeg] shut the f up

This commit is contained in:
Mort Yao 2018-08-10 03:05:14 +02:00
parent c6d71ddf10
commit 3a41c3d22c
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -22,12 +22,10 @@ def get_usable_ffmpeg(cmd):
out, err = p.communicate() out, err = p.communicate()
vers = str(out, 'utf-8').split('\n')[0].split() vers = str(out, 'utf-8').split('\n')[0].split()
assert (vers[0] == 'ffmpeg' and vers[2][0] > '0') or (vers[0] == 'avconv') assert (vers[0] == 'ffmpeg' and vers[2][0] > '0') or (vers[0] == 'avconv')
#set version to 1.0 for nightly build and print warning
try: try:
version = [int(i) for i in vers[2].split('.')] v = vers[2][1:] if vers[2][0] == 'n' else vers[2]
version = [int(i) for i in v.split('.')]
except: except:
print('It seems that your ffmpeg is a nightly build.', file=sys.stderr)
print('Please switch to the latest stable if merging failed.', file=sys.stderr)
version = [1, 0] version = [1, 0]
return cmd, 'ffprobe', version return cmd, 'ffprobe', version
except: except: