Run on dedicated hardware
This commit is contained in:
parent
911d6e2108
commit
8f92cc1787
22
seq.sh
22
seq.sh
|
@ -8,23 +8,41 @@
|
|||
###########################
|
||||
|
||||
MULTIPLE=2
|
||||
RATE=`echo "scale=0;24/${MULTIPLE}" | bc`
|
||||
FPS=24
|
||||
RATE=`echo "scale=0;${FPS}/${MULTIPLE}" | bc`
|
||||
TIMESTR=""
|
||||
|
||||
INPUT="${1}"
|
||||
OUTPUT="${2}"
|
||||
INVERT="${3}"
|
||||
START_FRAME=${4}
|
||||
END_FRAME=${5}
|
||||
|
||||
WIDTH=323
|
||||
HEIGHT=242
|
||||
|
||||
if [[ "${INVERT}" != "" ]]; then
|
||||
if [[ "${INVERT}" != "" ]] && [[ "${INVERT}" == "negative" ]]; then
|
||||
INVERT="negate,"
|
||||
else
|
||||
INVERT=""
|
||||
fi
|
||||
|
||||
if [[ "${START_FRAME}" != "" ]]; then
|
||||
START=`echo "scale=6;${START_FRAME}/${FPS}" | bc`
|
||||
TIMESTR="${TIMESTR} -ss ${START}"
|
||||
fi
|
||||
|
||||
if [[ "${END_FRAME}" != "" ]]; then
|
||||
TIME=`echo "scale=6;(${END_FRAME}-${START_FRAME})/${FPS}" | bc`
|
||||
TIMESTR="${TIMESTR} -t ${TIME}"
|
||||
fi
|
||||
|
||||
mkdir -p "${OUTPUT}"
|
||||
|
||||
ffmpeg -y -re -i "${INPUT}" \
|
||||
${TIMESTR} \
|
||||
-f image2 \
|
||||
-r ${RATE} \
|
||||
-vf ${INVERT}crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
|
||||
-q:v 1 -qmin 1 -qmax 1 \
|
||||
"${OUTPUT}/image_%06d.png"
|
18
stipple.sh
18
stipple.sh
|
@ -27,14 +27,17 @@ mkdir -p "${OUTPUT}"
|
|||
FRAMERATE=12
|
||||
WIDTH=404
|
||||
HEIGHT=374
|
||||
DOTSIZE=4
|
||||
MAXGENERATIONS=25
|
||||
MAXPARTICLES=400
|
||||
MINDOTSIZE=0.8
|
||||
LINE=0.8
|
||||
DOTSIZE=5
|
||||
MAXGENERATIONS=50
|
||||
MAXPARTICLES=1000
|
||||
MINDOTSIZE=0.3
|
||||
LINE=0.3
|
||||
FILL=true
|
||||
MODE="stipple"
|
||||
MODE="stipple" #stipple/tsp
|
||||
|
||||
if [[ "${INVERT}" == "" ]]; then
|
||||
INVERT="false"
|
||||
fi
|
||||
|
||||
IMAGES=""
|
||||
|
||||
|
@ -69,12 +72,13 @@ for png in "${INPUT}/"*.png ; do
|
|||
--mode $MODE \
|
||||
--invert $INVERT
|
||||
|
||||
if [[ "${INVERT}" != "" ]]; then
|
||||
if [[ "${INVERT}" != "false" ]]; then
|
||||
convert "${OUTPUT}/${name}_rendered.png" -channel RGB -negate "${OUTPUT}/${name}_rendered.png"
|
||||
fi
|
||||
|
||||
rm "${tmp}"
|
||||
cd ~/src/animation/
|
||||
|
||||
if [ "${MODE}" != "tsp" ]; then
|
||||
opt=`mktemp`.svg
|
||||
svgsort "${OUTPUT}/${name}.svg" "${opt}"
|
||||
|
|
Loading…
Reference in New Issue