#!/bin/bash set -e ; set -u IDX=0 SPOOL="frames/Spool" SEQNAME="none" TMP="WS/tmp.png" FONTE="Palatino-Bold" TEXTCOL="orange" STROKOL="darkblue" source tools/fonctions.sh # ------------------------------------------------------- # /!\ this function just copy the # file to the spool dir, so # you can use it for tmp pics. # addfile () { src="$1" dstname=$(printf "%s/%05d.png" $SPOOL $IDX) # echo "$src -> $dstname" # ln --force --symbolic $src $dstname cp -f $src $dstname IDX=$(( IDX + 1 )) } # ------------------------------------------------------- linkfarm () { SRC="frames/$1" echo "linkfarm $SRC" | tee -a WS/log local NBRE=30 for foo in $(seq 0 $NBRE) do addfile "$SRC/00000.png" done for src in "$SRC"/* do addfile $src done for foo in $(seq 0 $NBRE) do addfile "$SRC/00359.png" done } # ------------------------------------------------------- faire_le_titre () { echo "faire le titre" local NBRE=180 for foo in $(seq 0 $NBRE) do Ypos=$(( 210 - ( foo / 3 ) )) convert "WS/negatif.png" \ -gravity north \ -font $FONTE \ -pointsize 172 \ -kerning 6 \ -fill $TEXTCOL \ -strokewidth 3 -stroke $STROKOL \ -annotate +0+${Ypos} "HexaCone" \ ${TMP} # identify ${TMP} addfile ${TMP} printf "." done echo } # ------------------------------------------------------- faire_la_fin () { local NBRE=150 datetime=$(LANG=fr date -u +"%Y/%M/%D") echo $datetime | tee -a WS/log for foo in $(seq 0 $NBRE) do Ypos=$(( foo + 100 )) convert "WS/negatif.png" \ -gravity north \ -font $FONTE \ -pointsize 86 \ -kerning 6 \ -fill $TEXTCOL \ -strokewidth 2 -stroke $STROKOL \ -annotate +0+${Ypos} "tTh des Bourtoulots" \ -pointsize 48 \ -strokewidth 1 \ -gravity south \ -annotate +0+270 "${datetime}" \ ${TMP} # identify ${TMP} addfile ${TMP} printf "." done echo } # ------------------------------------------------------- figlet "Link farmer" rm -f frames/Spool/*.png tools/plot-timing.sh faire_le_titre linkfarm hexabenz linkfarm escadrille linkfarm topview linkfarm passage linkfarm scene linkfarm orbite linkfarm essai tools/plot-timing.sh faire_la_fin ff_encodage Spool full.mp4 echo "linkfarmed $IDX files" | tee -a WS/log