Move all scripts into scripts directory.

This commit is contained in:
mmcwilliams 2019-04-02 12:44:59 -04:00
parent cf39232d70
commit 6894861ff9
5 changed files with 33 additions and 0 deletions

33
scripts/frameloom.sh Normal file
View File

@ -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