From cdc0fb6780ff2d86d5f2c1c95d56b75848d0127f Mon Sep 17 00:00:00 2001 From: Tonton Th Date: Thu, 2 Jan 2025 01:23:49 +0100 Subject: [PATCH] brotching the build system --- fonctions.sh | 11 +++++++---- linkfarmer.sh | 8 +++++--- mkloop.sh | 33 ++++++++++++++++++++------------- plot-timing.sh | 2 +- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/fonctions.sh b/fonctions.sh index ee33b96..3f88640 100644 --- a/fonctions.sh +++ b/fonctions.sh @@ -6,10 +6,13 @@ ralentisseur () { temps=$1 -echo "#+++ ralentisseur $temps +++#" | tee -a WS/log - - sleep $temps - +load=$(awk '{print int($1)}' < /proc/loadavg) +# echo " load is $load" | tee -a WS/log +if [ $load -gt 10 ] ; then + attente=$(( $temps + ($RANDOM % 90) )) + echo "ralentir $0 $SEQNAME $attente" | tee -a WS/log + sleep $attente +fi } # -------------------------------------------------------------- diff --git a/linkfarmer.sh b/linkfarmer.sh index 53d8f2c..811e9e4 100755 --- a/linkfarmer.sh +++ b/linkfarmer.sh @@ -22,7 +22,7 @@ linkfarm () SRC="frames/$1" echo "linkfarm $SRC" | tee -a WS/log -local NBRE=36 +local NBRE=30 for foo in $(seq 0 $NBRE) do addfile "$SRC/00000.png" @@ -45,7 +45,7 @@ faire_le_titre () { echo "faire le titre" -local NBRE=80 +local NBRE=90 for foo in $(seq 0 $NBRE) do addfile "datas/cover.png" @@ -54,7 +54,7 @@ done # ------------------------------------------------------- faire_la_fin () { -local NBRE=80 +local NBRE=90 for foo in $(seq 0 $NBRE) do addfile "datas/back.png" @@ -72,6 +72,8 @@ linkfarm passage linkfarm scene linkfarm essai +faire_la_fin + ff_encodage Spool full.mp4 diff --git a/mkloop.sh b/mkloop.sh index 074413c..109603d 100755 --- a/mkloop.sh +++ b/mkloop.sh @@ -15,39 +15,43 @@ esac echo "Running $0 $TYPE $SEQNAME" >> WS/log -POVOPT="+q9 +a0.02 -d ${DIMS} -WT6" +POVOPT="+q9 +a0.01 -d ${DIMS} -WT6" echo $POVOPT ; echo ; sleep 2 TMPIMG=/dev/shm/${SEQNAME}-tmp.png for frame in $(seq 0 $((NBFRAMES-1))) do - figlet -k $frame - img=$(printf "frames/%s/%05d.png" $SEQNAME $frame) + # figlet -k $frame ; sleep 1 + ralentisseur 25 + + img=$(printf "frames/%s/%05d.png" $SEQNAME $frame) debut=$(date +%s) set +e povray ${POVOPT} +K${frame} -i${SEQNAME}.pov -o${TMPIMG} err=$? if [ $err != 0 ] ; then echo "$SEQNAME fail $frame" >> WS/log + mogrify -colorspace gray $img sleep 6 continue fi set -e txt=$(printf "%s %03d" ${SEQNAME} $frame) - echo $frame $img $txt - convert ${TMPIMG} \ - -font Courier \ - -pointsize 14 \ - -fill orange \ - -gravity south \ - -annotate +0+0 "$txt" \ + # echo $frame $img $txt + convert ${TMPIMG} \ + -font Courier-Bold \ + -pointsize 16 \ + -fill turquoise \ + -gravity south \ + -annotate +0+5 "$txt" \ ${img} fin=$(date +%s) - echo - echo $frame $(( fin - debut )) | tee -a WS/${TYPE}.timing - echo + echo ; sleep 1 + echo ${SEQNAME} $frame $(( fin - debut )) | \ + tee -a WS/mp4.timing + echo ; sleep 1 done echo @@ -57,3 +61,6 @@ case $TYPE in -colors 102 frames/* foo.gif ;; "mp4") ff_encodage $SEQNAME wip-${SEQNAME}.mp4 ;; esac + +echo "+------- build of $SEQNAME done" + diff --git a/plot-timing.sh b/plot-timing.sh index 27320cf..c90321d 100755 --- a/plot-timing.sh +++ b/plot-timing.sh @@ -14,7 +14,7 @@ BEGIN { \ } \ } \ -$1=="orbite" { \ +$1=="passage" { \ accu[$2] += $3; \ count[$2]++; \ if (mini[$2] > $3) mini[$2] = $3; \