From 61227073c38aebda52b234eca5635775e92ebe8d Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 3 May 2016 10:05:49 +0200 Subject: [PATCH] libav works --- prosopopee/prosopopee.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index e73c700..e9dc033 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -163,7 +163,14 @@ class Image(object): def main(): - for i in ['gm', options["binary"]]: + settings = yaml.safe_load(open("settings.yaml", "r")) + if settings["settings"].get("ffmpeg"): + SETTINGS["ffmpeg"].update(settings["settings"]["ffmpeg"]) + conv_video = settings["settings"]["ffmpeg"]["binary"] + else: + conv_video = "ffmpeg" + + for i in ['gm', conv_video]: if os.system("which " + i +" > /dev/null") != 0: sys.stderr.write("ERROR: I can't locate the "+ i +" binary, " "please install the '" + i + "' package.\n") @@ -172,7 +179,6 @@ def main(): 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.safe_load(open("settings.yaml", "r")) for key, value in DEFAULTS.items(): if key not in settings: