From 6894861ff9063e20dbbc7f814c148cd1adbe3c8c Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 2 Apr 2019 12:44:59 -0400 Subject: [PATCH] Move all scripts into scripts directory. --- docs.sh => scripts/docs.sh | 0 examples.sh => scripts/examples.sh | 0 .../examples_assemble.sh | 0 .../examples_youtube.sh | 0 scripts/frameloom.sh | 33 +++++++++++++++++++ 5 files changed, 33 insertions(+) rename docs.sh => scripts/docs.sh (100%) rename examples.sh => scripts/examples.sh (100%) rename examples_assemble.sh => scripts/examples_assemble.sh (100%) rename examples_youtube.sh => scripts/examples_youtube.sh (100%) create mode 100644 scripts/frameloom.sh diff --git a/docs.sh b/scripts/docs.sh similarity index 100% rename from docs.sh rename to scripts/docs.sh diff --git a/examples.sh b/scripts/examples.sh similarity index 100% rename from examples.sh rename to scripts/examples.sh diff --git a/examples_assemble.sh b/scripts/examples_assemble.sh similarity index 100% rename from examples_assemble.sh rename to scripts/examples_assemble.sh diff --git a/examples_youtube.sh b/scripts/examples_youtube.sh similarity index 100% rename from examples_youtube.sh rename to scripts/examples_youtube.sh diff --git a/scripts/frameloom.sh b/scripts/frameloom.sh new file mode 100644 index 0000000..bb5c41c --- /dev/null +++ b/scripts/frameloom.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# Simple shell script version of frameloom +# Only creates a 1:1 pattern between 2 videos + +# Usage : sh frameloom.sh examples/A.mp4 examples/B.mp4 examples/OUTPUT.mp4 + +TMPDIR=/tmp/frameloom/ +i=0 + +if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; + then + echo "Not enough arguments supplied" +fi + +mkdir -p $TMPDIR + +ffmpeg -i "$1" -compression_algo raw -pix_fmt rgb24 "${TMPDIR}export-%05d_a.tif" +ffmpeg -i "$2" -compression_algo raw -pix_fmt rgb24 "${TMPDIR}export-%05d_b.tif" + +#rm -r $TMP + +for filename in ${TMPDIR}*.tif; do + value=`printf %05d $i` + #echo $filename + #echo "${TMPDIR}render_${value}.tif" + mv "$filename" "${TMPDIR}render_${value}.tif" + i=`expr $i + 1` +done + +ffmpeg -r 30 -f image2 -s 1920x1080 -i "${TMPDIR}render_%05d.tif" -c:v prores_ks -profile:v 3 -y "$3" + +rm -r $TMPDIR \ No newline at end of file