From 803ef27c58cc3aee5ccc2c0c3ab3b667b91f6479 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 3 May 2016 09:41:08 +0200 Subject: [PATCH] addd support libav --- prosopopee/prosopopee.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 5ecca98..4a05f0a 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -25,6 +25,7 @@ SETTINGS = { "resize": None }, "ffmpeg": { + "binary": "ffmpeg", "loglevel": "panic", "format": "webm", "resolution": "1280x720", @@ -61,14 +62,15 @@ class Video(object): "resize": "-vf scale=-1:%s" % options.get("resize"), "bitrate": "-b %s" % options["bitrate"], "format": "-f %s" % options["format"] + "binary": "%s" % options["binary"] } warning("Generation", source) if options.get("resize"): - command = "ffmpeg {loglevel} -i {source} {resize} -vframes 1 -y {target}".format(**ffmpeg_switches) + command = "{binary} {loglevel} -i {source} {resize} -vframes 1 -y {target}".format(**ffmpeg_switches) os.system(command) else: - command = "ffmpeg {loglevel} -i {source} {resolution} {preselect} {bitrate} -pass 1 -an {format} -y {target}".format(**ffmpeg_switches) - command2 = "ffmpeg {loglevel} -i {source} {resolution} {preselect} {bitrate} -pass 2 -acodec libvorbis -ab 100k {format} -y {target}".format(**ffmpeg_switches) + command = "{binary} {loglevel} -i {source} {resolution} {preselect} {bitrate} -pass 1 -an {format} -y {target}".format(**ffmpeg_switches) + command2 = "{binary} {loglevel} -i {source} {resolution} {preselect} {bitrate} -pass 2 -acodec libvorbis -ab 100k {format} -y {target}".format(**ffmpeg_switches) os.system(command) os.system(command2) CACHE.cache_picture(source, target, options)