HexaCone/tools/motionblur.sh
2026-02-18 19:19:20 +01:00

44 lines
844 B
Bash
Executable File

#!/bin/bash
#
# a new experiment 2026/02/29
#
##############################
# THIS SOFTWARE IS A MESS #
# TOO SLOW FOR REAL USE #
##############################
set -e ; set -u
source tools/config.sh
source tools/fonctions.sh
START=1
if [ $# == 1 ]
then
START=$1
fi
NB_SRC=$(ls -1 frames/Spool | wc -l)
printf "%s: %d frames\n" $0 $NB_SRC | tee -a WS/log
# -------------------------------------------------------
# MAIN LOOP
for frame in $(seq $START $(( $NB_SRC-1 )) )
do
imgA=$(printf "frames/Spool/%05d.png" $frame)
imgB=$(printf "frames/Spool/%05d.png" $((frame-1)))
imgC=$(printf "frames/TMP/%05d.png" $frame)
# echo $imgA $imgB
printf "%8d" $frame
composite $imgA $imgB \
-blend 50% \
$imgC
done
ff_encodage TMP motion-blurred.mp4
# -------------------------------------------------------