[enh] make ffmpeg dependancy recommanded
This commit is contained in:
parent
5f8c3958d4
commit
35d2b54c8a
@ -52,6 +52,8 @@ class Video(object):
|
|||||||
return self.options["name"]
|
return self.options["name"]
|
||||||
|
|
||||||
def ffmpeg(self, source, target, options):
|
def ffmpeg(self, source, target, options):
|
||||||
|
error(SETTINGS["ffmeg"], "I couldn't find a binary to convert video and I ask to do so, abort")
|
||||||
|
|
||||||
if not CACHE.needs_to_be_generated(source, target, options):
|
if not CACHE.needs_to_be_generated(source, target, options):
|
||||||
okgreen("Skipped", source + " is already generated")
|
okgreen("Skipped", source + " is already generated")
|
||||||
return
|
return
|
||||||
@ -190,11 +192,14 @@ def main():
|
|||||||
else:
|
else:
|
||||||
conv_video = "ffmpeg"
|
conv_video = "ffmpeg"
|
||||||
|
|
||||||
for i in ['gm', conv_video]:
|
error(os.system("which gm > /dev/null") == 0, "I can't locate the gm binary, "
|
||||||
if os.system("which " + i +" > /dev/null") != 0:
|
"please install the 'graphicsmagick' package.\n")
|
||||||
sys.stderr.write("ERROR: I can't locate the "+ i +" binary, "
|
|
||||||
"please install the '" + i + "' package.\n")
|
if os.system("which " + conv_video +" > /dev/null") != 0:
|
||||||
sys.exit(1)
|
warning("I can't locate the "+ conv_video +" binary, "
|
||||||
|
"please install the '" + conv_video + "' package.\n")
|
||||||
|
warning("I won't be able to encode video and I will stop if I encounter a video to convert")
|
||||||
|
SETTINGS["ffmpeg"] = False
|
||||||
|
|
||||||
error(os.path.exists(os.path.join(os.getcwd(), "settings.yaml")), "I can't find a "
|
error(os.path.exists(os.path.join(os.getcwd(), "settings.yaml")), "I can't find a "
|
||||||
"settings.yaml in the current working directory")
|
"settings.yaml in the current working directory")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user