2020-12-03 05:24:54 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-01-09 08:57:45 +11:00
|
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------
|
2021-01-11 08:52:33 +11:00
|
|
|
essai_filtres ()
|
2021-01-09 08:57:45 +11:00
|
|
|
{
|
2021-01-11 08:52:33 +11:00
|
|
|
FILTRES=$(./t -L | awk 'NR>1 { print $1 }' | sort)
|
2020-12-07 14:45:51 +11:00
|
|
|
|
|
|
|
rm /tmp/fstack*.png
|
2020-12-03 05:24:54 +11:00
|
|
|
|
2021-02-25 18:23:27 +11:00
|
|
|
SRC=$(ls -rt1 $HOME/Essais/FondageDePlomb/capture/* | tail -1)
|
|
|
|
# SRC=mire.fimg
|
2021-01-11 08:52:33 +11:00
|
|
|
|
2020-12-05 09:14:44 +11:00
|
|
|
for F in $FILTRES
|
|
|
|
do
|
2020-12-07 14:45:51 +11:00
|
|
|
I="/tmp/fstack-"$F".png"
|
2021-01-11 08:52:33 +11:00
|
|
|
echo ; echo ======== $I
|
|
|
|
./t -v -i $SRC -F $F -o foo.png
|
|
|
|
txt=$(printf "( %-10s )" $F)
|
|
|
|
convert foo.png -pointsize 48 -kerning 0 \
|
2020-12-07 14:45:51 +11:00
|
|
|
-fill Gray80 -undercolor Gray20 \
|
2020-12-05 09:14:44 +11:00
|
|
|
-font Courier-Bold \
|
2021-01-11 08:52:33 +11:00
|
|
|
-annotate +10+50 "$txt" \
|
2020-12-05 09:14:44 +11:00
|
|
|
$I
|
|
|
|
done
|
2021-01-11 08:52:33 +11:00
|
|
|
|
|
|
|
echo ; echo "making gif89a..."
|
|
|
|
convert -delay 200 /tmp/fstack*.png foo.gif
|
2021-01-09 08:57:45 +11:00
|
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
2021-01-14 02:09:27 +11:00
|
|
|
essai_singlepass ()
|
2021-01-09 08:57:45 +11:00
|
|
|
{
|
|
|
|
MP4="/home/tth/Essais/FondageDePlomb/foo.mp4"
|
2021-01-16 21:29:40 +11:00
|
|
|
INPUT="/home/tth/Essais/FondageDePlomb/capture/02[0123]??.fimg"
|
2021-02-23 21:30:49 +11:00
|
|
|
FILTRE="multidots:liss3x3:nothing:liss3x3:liss3x3"
|
2021-01-14 02:09:27 +11:00
|
|
|
OUTDIR="/tmp/x8/"
|
2021-01-12 08:22:03 +11:00
|
|
|
|
|
|
|
echo '********* essai single *********'
|
2020-12-05 09:14:44 +11:00
|
|
|
|
2021-01-14 02:09:27 +11:00
|
|
|
rm $OUTDIR/*.png
|
2020-12-09 01:51:07 +11:00
|
|
|
|
2021-01-14 02:09:27 +11:00
|
|
|
time ./singlepass -v -g "$INPUT" -F $FILTRE -O $OUTDIR -s
|
2021-01-09 08:57:45 +11:00
|
|
|
|
2021-01-14 02:09:27 +11:00
|
|
|
echo ; echo "encoding picz to " $MP4
|
2021-01-09 08:57:45 +11:00
|
|
|
|
|
|
|
ffmpeg -nostdin \
|
|
|
|
-loglevel error \
|
2021-01-14 02:09:27 +11:00
|
|
|
-y -r 25 -f image2 -i /tmp/x8/%05d.png \
|
2021-01-09 08:57:45 +11:00
|
|
|
-c:v libx264 -pix_fmt yuv420p \
|
|
|
|
$MP4
|
|
|
|
|
|
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
# MAIN
|
|
|
|
|
2021-02-23 13:22:14 +11:00
|
|
|
essai_filtres
|
2021-01-09 08:57:45 +11:00
|
|
|
|
|
|
|
# ------------------------------------------------------------
|