Commit 14dcfeed authored by Michael Murtaugh's avatar Michael Murtaugh
Browse files

removed last cmd string from Sconstruct

parent 6009199e
......@@ -225,16 +225,26 @@ def ffmpeg_get_meta (target, source, env):
FFMPEGMeta = Builder(action=ffmpeg_get_meta)
VideoPoster = Builder(action="""
mkdir -p `dirname $TARGET` && \
ffmpeg -i $SOURCE -ss 3 -vframes 1 $TARGET
""".strip())
VideoThumb = Builder(action="""
mkdir -p `dirname $TARGET` && \
ffmpeg -i $SOURCE -ss 3 -vframes 1 $TARGET && \
mogrify -resize 200x200 $TARGET
""".strip())
# VideoPoster = Builder(action="""
# mkdir -p `dirname $TARGET` && \
# ffmpeg -i $SOURCE -ss 3 -vframes 1 $TARGET
# """.strip())
def make_video_poster (target, source, env):
os.makedirs(os.path.dirname(target[0].path), exist_ok=True)
ret = subprocess.run(["ffmpeg", "-i", source[0].path, "-ss", "3", "-vframes", "1", target[0].path])
VideoPoster = Builder(action=make_video_poster)
# VideoThumb = Builder(action="""
# mkdir -p `dirname $TARGET` && \
# ffmpeg -i $SOURCE -ss 3 -vframes 1 $TARGET && \
# mogrify -resize 200x200 $TARGET
# """.strip())
def make_video_thumb (target, source, env):
os.makedirs(os.path.dirname(target[0].path), exist_ok=True)
ret = subprocess.run(["ffmpeg", "-i", source[0].path, "-ss", "3", "-vframes", "1", target[0].path])
if ret.returncode == 0:
subprocess.run(["mogrify", "-resize", "200x200", target[0].path])
VideoThumb = Builder(action=make_video_thumb)
# ImagePoster = Builder(action="""
# mkdir -p $TARGET.dir && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment