only parse avconv major version

This commit is contained in:
j 2014-10-10 15:58:54 +02:00
parent 4c35340f38
commit aacc712869

View file

@ -68,6 +68,10 @@ def avconv_version():
stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
version = stderr.split(' ')[2].split('-')[0] version = stderr.split(' ')[2].split('-')[0]
try:
version = int(version.split('.')[0])
except:
pass
return version return version
def stream(video, target, profile, info, avconv=None, audio_track=0): def stream(video, target, profile, info, avconv=None, audio_track=0):
@ -206,7 +210,7 @@ def stream(video, target, profile, info, avconv=None, audio_track=0):
'-qdiff', '4' '-qdiff', '4'
] ]
''' '''
if settings.AVCONV_VERSION >= '9': if settings.AVCONV_VERSION >= 9:
video_settings += [ video_settings += [
'-vcodec', 'libx264', '-vcodec', 'libx264',
'-preset:v', 'medium', '-preset:v', 'medium',