detect ffmpeg or avconv, use version from ~/.ox/bin if available

This commit is contained in:
j 2014-09-25 23:01:40 +02:00
parent 8e3752cc11
commit b60a685c85

View file

@ -11,7 +11,14 @@ import Image
import numpy as np
import ox
FFMPEG = ox.file.cmd('ffmpeg')
FFMPEG = None
for cmd in ('ffmpeg', 'avconv'):
cmd = ox.file.cmd(cmd)
if subprocess.call(['which', cmd], stdout=subprocess.PIPE) == 0:
FFMPEG = cmd
break
if not FFMPEG:
print "could not find ffmpeg, make sure its installed and available in PATH"
FPS = 25
class Video(object):