cosmetic changes

This commit is contained in:
tTh 2023-04-09 05:28:07 +02:00
parent 6e92252778
commit 11a1e95146
2 changed files with 65 additions and 14 deletions

View File

@ -119,7 +119,7 @@ fprintf(stderr, "\n");
globfree(&globbuf); globfree(&globbuf);
fimg_destroy(&image); fimg_destroy(&image);
single_print_state("end of run", 0); // single_print_state("end of run", 0);
elapsed = fimg_timer_get(0); elapsed = fimg_timer_get(0);
fprintf(stderr, "%s: %ld frames, elapsed %.3f s, %.3f fps\n", fprintf(stderr, "%s: %ld frames, elapsed %.3f s, %.3f fps\n",

View File

@ -6,12 +6,14 @@ SPASS="../Fonderie/singlepass"
SRCDIR=$HOME"/Essais/PS-eye/frames/" SRCDIR=$HOME"/Essais/PS-eye/frames/"
DSTPOL=$HOME"/TMP/" DSTPOL=$HOME"/TMP/"
echo "source = " $SRCDIR " spool = " $DSTPOL echo "source = " $SRCDIR
echo "spool = " $DSTPOL
LINKFARM=$DSTPOL"LinkFarm" LINKFARM=$DSTPOL"LinkFarm"
echo "linkfarm = " $LINKFARM echo "linkfarm = " $LINKFARM
VIDZ="$HOME/BU/vrac/all_effects.mp4" # VIDZ="$HOME/BU/vrac/all_effects.mp4"
VIDZ="foo.mp4"
echo "lolvidz = " $VIDZ echo "lolvidz = " $VIDZ
LINKNUM=0 LINKNUM=0
@ -24,7 +26,7 @@ local effect=$1
local ddir=$2 local ddir=$2
figlet "$effect" ; echo figlet "$effect" ; echo
echo " ===> " $ddir echo " files to ===> " $ddir
rm -f $ddir/?????.png rm -f $ddir/?????.png
@ -35,6 +37,29 @@ $SPASS -F $effect \
} }
# --------------------------------------------
insert_blank()
{
local count=$1
local imgname="$DSTPOL/blank.fimg"
if [ ! -r $imgname ] ; then
mkfimg -v -t black $imgname 640 480
fimg2png -v $imgname $DSTPOL/blank.png
echo "blankimage done" | boxes
# display $DSTPOL/blank.png &
# exit
fi
for foo in $(seq 0 $count)
do
linkname=$(printf "%s/L%05d.png" $LINKFARM $LINKNUM)
ln --force --symbolic $DSTPOL/blank.png $linkname
# file $linkname
LINKNUM=$(( LINKNUM + 1 ))
done
}
# -------------------------------------------- # --------------------------------------------
make_the_linkfarm_from() make_the_linkfarm_from()
@ -47,13 +72,13 @@ echo "====== Linkfarming from " $sdir \
mogrify \ mogrify \
-font Utopia-Bold \ -font Utopia-Bold \
-pointsize 90 \ -pointsize 64 \
-kerning 9 \ -kerning 9 \
-fill Gray80 \ -fill Gray90 \
-stroke Gray20 \ -stroke Gray10 \
-strokewidth 3 \ -strokewidth 2 \
-gravity South-East \ -gravity South-East \
-annotate +45+125 $effname \ -annotate +30+20 $effname \
$sdir/*.png $sdir/*.png
for img in $(ls -1 $sdir/?????.png) for img in $(ls -1 $sdir/?????.png)
@ -74,7 +99,9 @@ echo "linkfarming done"
do_all_the_effects() do_all_the_effects()
{ {
EFFECTS=$( $SPASS -L | sort --reverse ) EFFECTS=$( $SPASS -L | sort )
banner 'FULL RUN'
for effect in $EFFECTS for effect in $EFFECTS
do do
@ -90,19 +117,40 @@ do
do_an_effect_pass $effect $DDIR do_an_effect_pass $effect $DDIR
make_the_linkfarm_from $effect $DDIR make_the_linkfarm_from $effect $DDIR
insert_blank 30
done done
} }
# --------------------------------------------
debug_run()
{
local eff=$1
local DDIR=$DSTPOL"/$eff"
banner 'DEBUG RUN'
echo "DDIR = " $DDIR
do_an_effect_pass $eff $DDIR
make_the_linkfarm_from $eff $DDIR
}
# -------------------------------------------- # --------------------------------------------
# MAIN # MAIN
rm -v -f $LINKFARM/L?????.png echo
rm -v -f $LINKFARM/L*.png ; echo
insert_blank 30
# debug_run 'rndblks'
do_all_the_effects do_all_the_effects
banner encoding banner 'encoding'
ffmpeg -nostdin \ ffmpeg -nostdin \
-loglevel warning \
-y -r 30 -f image2 -i ${LINKFARM}/L%05d.png \ -y -r 30 -f image2 -i ${LINKFARM}/L%05d.png \
-metadata artist='---[ tTh ]---' \ -metadata artist='---[ tTh ]---' \
-metadata title='---[ All the 'Fonderie' effects ]---' \ -metadata title='---[ All the 'Fonderie' effects ]---' \
@ -110,3 +158,6 @@ ffmpeg -nostdin \
-c:v libx264 -pix_fmt yuv420p \ -c:v libx264 -pix_fmt yuv420p \
$VIDZ $VIDZ
echo " encoding of " $VIDZ " . . . . . [done]"