From b0b8f87d437ebd37f2bcad06a7790c98359efce1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 21 Mar 2012 23:45:19 +0100 Subject: [PATCH] fail if ffmpeg2theora is not up to date --- ox/file.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ox/file.py b/ox/file.py index 9ddc4c1..45f3591 100644 --- a/ox/file.py +++ b/ox/file.py @@ -66,6 +66,11 @@ def avinfo(filename): local = os.path.expanduser('~/.ox/bin/ffmpeg2theora') if os.path.exists(local): ffmpeg2theora = local + p = subprocess.Popen([ffmpeg2theora], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + info, error = p.communicate() + version = info.split('\n')[0].split(' ')[-1] + if version < '0.27': + raise EnvironmentError('version of ffmpeg2theora needs to be 0.27 or later, found %s' % version) p = subprocess.Popen([ffmpeg2theora, '--info', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE) info, error = p.communicate()