detect ffmpeg or avconv, use version from ~/.ox/bin if available
This commit is contained in:
parent
8e3752cc11
commit
b60a685c85
1 changed files with 8 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue