Compare commits

...

3 Commits

3 changed files with 23 additions and 3 deletions

View File

@ -1,6 +1,9 @@
#!/bin/bash
#field guide
if [[ "${1}" == "" ]]; then
echo "Please provide a directory as the first argument"
exit 1
fi
if [ "${2}" == "" ]; then
name=`basename "${1}"`

View File

@ -1,15 +1,24 @@
#!/bin/bash
MULTIPLE=2
RATE=`echo "scale=0;24/${MULTIPLE}" | bc`
INPUT="${1}"
OUTPUT="${2}"
INVERT="${3}"
WIDTH=323
HEIGHT=242
if [[ "${INVERT}" != "" ]]; then
INVERT="-vf negate"
fi
mkdir -p "${OUTPUT}"
ffmpeg -re -i "${INPUT}" \
-f image2 \
-r 12 \
-r ${RATE} \
"${INVERT}" \
-vf crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
"${OUTPUT}/image_%06d.png"

View File

@ -2,6 +2,13 @@
INPUT=`realpath "${1}"`
OUTPUT=`realpath "${2}"`
INVERT="${3}"
if [[ "${INVERT}" == "" ]]; then
INVERT="false"
else
INVERT="true"
fi
WIDTH=404
HEIGHT=374
@ -42,7 +49,8 @@ for png in "${INPUT}/"*.png ; do
--line $LINE \
--fill $FILL \
--maxParticles $MAXPARTICLES \
--mode $MODE
--mode $MODE \
--invert $INVERT
rm "${tmp}"
cd ~/src/animation/
if [ "${MODE}" != "tsp" ]; then