HexaCone/tools/motionblur.sh
2026-02-13 12:11:52 +01:00

44 lines
845 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=50
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 "%d " $frame
composite $imgA $imgB \
-blend 70% \
$imgC
done
ff_encodage TMP motion-blurred.mp4
# -------------------------------------------------------