Compare commits

..

No commits in common. "e6382f17470108707edbc39d875da8d9f98aab98" and "a08078fee0764d16846f81c6ff5f69022cc76625" have entirely different histories.

2 changed files with 10 additions and 24 deletions

View File

@ -11,13 +11,14 @@ WIDTH=323
HEIGHT=242 HEIGHT=242
if [[ "${INVERT}" != "" ]]; then if [[ "${INVERT}" != "" ]]; then
INVERT="negate," INVERT="-vf negate"
fi fi
mkdir -p "${OUTPUT}" mkdir -p "${OUTPUT}"
ffmpeg -y -re -i "${INPUT}" \ ffmpeg -re -i "${INPUT}" \
-f image2 \ -f image2 \
-r ${RATE} \ -r ${RATE} \
-vf ${INVERT}crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \ "${INVERT}" \
-vf crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
"${OUTPUT}/image_%06d.png" "${OUTPUT}/image_%06d.png"

View File

@ -1,33 +1,24 @@
#!/bin/bash #!/bin/bash
if [[ "${1}" == "" ]]; then
echo "Please provide a directory of images as the first argument"
exit 1
fi
INPUT=`realpath "${1}"` INPUT=`realpath "${1}"`
OUTPUT=`realpath "${2}"` OUTPUT=`realpath "${2}"`
INVERT="${3}" INVERT="${3}"
if [ ! -d "${INPUT}" ]; then if [[ "${INVERT}" == "" ]]; then
echo "Directory ${1} doesn't exist" INVERT="false"
exit 2 else
INVERT="true"
fi fi
mkdir -p "${OUTPUT}"
WIDTH=404 WIDTH=404
HEIGHT=374 HEIGHT=374
DOTSIZE=4 DOTSIZE=4
MAXGENERATIONS=25 MAXGENERATIONS=25
MAXPARTICLES=400 MAXPARTICLES=500
MINDOTSIZE=0.8 MINDOTSIZE=0.8
LINE=0.8 LINE=0.8
FILL=true FILL=true
MODE="stipple" MODE="stipple"
INVERT="false"
IMAGES="" IMAGES=""
@ -45,7 +36,6 @@ for png in "${INPUT}/"*.png ; do
VIDEO="${OUTPUT}/${part}.mov" VIDEO="${OUTPUT}/${part}.mov"
fi fi
bash stipple_gen.sh \ bash stipple_gen.sh \
--display "false" \
--inputImage "${tmp}" \ --inputImage "${tmp}" \
--outputImage "${OUTPUT}/${name}_rendered.png" \ --outputImage "${OUTPUT}/${name}_rendered.png" \
--outputSVG "${OUTPUT}/${name}.svg" \ --outputSVG "${OUTPUT}/${name}.svg" \
@ -61,11 +51,6 @@ for png in "${INPUT}/"*.png ; do
--maxParticles $MAXPARTICLES \ --maxParticles $MAXPARTICLES \
--mode $MODE \ --mode $MODE \
--invert $INVERT --invert $INVERT
if [[ "${INVERT}" != "" ]]; then
convert "${OUTPUT}/${name}_rendered.png" -channel RGB -negate "${OUTPUT}/${name}_rendered.png"
fi
rm "${tmp}" rm "${tmp}"
cd ~/src/animation/ cd ~/src/animation/
if [ "${MODE}" != "tsp" ]; then if [ "${MODE}" != "tsp" ]; then
@ -75,6 +60,6 @@ for png in "${INPUT}/"*.png ; do
fi fi
done done
ffmpeg -y -r 12 -f image2 -i "${IMAGES}" \ ffmpeg -r 12 -f image2 -i "${IMAGES}" \
-c:v prores_ks -profile:v 3 \ -c:v prores_ks -profile:v 3 \
"${VIDEO}" "${VIDEO}"