Compare commits
3
Commits
2f97671726
...
30c12ebecb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30c12ebecb | ||
|
|
6f31e80873 | ||
|
|
26269bae0c |
No files matched your search
@@ -13,6 +13,7 @@ WS/*timing
|
||||
WS/log*
|
||||
WS/*.done
|
||||
WS/*.log
|
||||
WS/*.last
|
||||
|
||||
*.png
|
||||
*.gif
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
source tools/config.sh
|
||||
|
||||
# traitement des arguments
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "need the seq name"
|
||||
exit 1
|
||||
fi
|
||||
shortseq=$1
|
||||
framedir="frames/$shortseq"
|
||||
|
||||
figlet "Seq $shortseq"
|
||||
echo
|
||||
|
||||
# a few molly guards
|
||||
|
||||
if [ ! -d $framedir ] ; then
|
||||
echo "NO DIR $framedir FOUND"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
voidfile="/dev/shm/void-filler.tga"
|
||||
# export TGA_OUTILS_VERBOSE="yes"
|
||||
# tga_tools environ
|
||||
tga_tools mk_hgrad $voidfile $Img_Width $Img_Height
|
||||
tga_effects $voidfile water $voidfile 666
|
||||
tga_applymap 1 $voidfile neon.map $voidfile
|
||||
# display $voidfile ; exit
|
||||
|
||||
# ---------- main loop
|
||||
|
||||
compte=0
|
||||
for idx in $(seq 0 $((NBFRAMES-1)) )
|
||||
do
|
||||
|
||||
image=$(printf "%s/%05d.png" $framedir $idx)
|
||||
|
||||
if [ -r $image ] ; then
|
||||
echo "$image is OK"
|
||||
else
|
||||
echo "make $image"
|
||||
txt=$(printf "%s ~ %03d" $shortseq $idx)
|
||||
|
||||
convert $voidfile \
|
||||
-font Courier-Bold \
|
||||
-pointsize 110 \
|
||||
-kerning -1 \
|
||||
-gravity center \
|
||||
-fill $TEXTCOL \
|
||||
-annotate +0+0 "$txt" \
|
||||
-fill $STROKOL \
|
||||
-annotate +5+5 "$txt" \
|
||||
$image
|
||||
compte=$(( compte + 1 ))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
echo "$shortseq gen $compte picz"
|
||||
+20
-14
@@ -6,27 +6,32 @@ source tools/config.sh
|
||||
source tools/fonctions.sh
|
||||
|
||||
SEQNAME="$1"
|
||||
START=0
|
||||
LAST="WS/$SEQNAME.last"
|
||||
|
||||
if [ $# == 2 ]
|
||||
if [ ! -r $LAST ]
|
||||
then
|
||||
START=$2
|
||||
echo 0 > $LAST
|
||||
fi
|
||||
|
||||
echo "$0 $SEQNAME from $START" >> WS/log
|
||||
NEXT=$(head -1 $LAST)
|
||||
|
||||
echo "MakeOneSeq $SEQNAME : $NEXT" >> WS/log
|
||||
|
||||
DIMS="-W$Img_Width -H$Img_Height"
|
||||
NBFR=" Declare=NbFrames=$NBFRAMES "
|
||||
POVOPT="+q9 +A0.02 -d ${DIMS} ${NBFR} -WT4"
|
||||
POVOPT="+q9 +A -v -d ${DIMS} ${NBFR} -WT4"
|
||||
echo $NBFR "frames."
|
||||
echo $POVOPT ; echo ; sleep 2
|
||||
# echo $POVOPT ; echo ; sleep 2
|
||||
|
||||
TMPIMG=/dev/shm/${SEQNAME}-tmp.png
|
||||
TMPIMG=/dev/shm/hc-${SEQNAME}-tmp.png
|
||||
# echo "TMPIMG" ${TMPIMG} | tee -a WS/log # DEBUG !
|
||||
INC=1
|
||||
for frame in $(seq $START $INC $((NBFRAMES-1)))
|
||||
do
|
||||
|
||||
count=$(( ($RANDOM % 33) + 50 ))
|
||||
printf "cout : %3d\n" $count | tee -a WS/log
|
||||
|
||||
for idx in $(seq 0 $count)
|
||||
do
|
||||
frame=$(( $idx + $NEXT ))
|
||||
img=$(printf "frames/%s/%05d.png" $SEQNAME $frame)
|
||||
debut=$(date +%s)
|
||||
set +e
|
||||
@@ -35,7 +40,7 @@ do
|
||||
if [ $err != 0 ] ; then
|
||||
echo "$SEQNAME fail $frame" >> WS/log
|
||||
mogrify -colorspace gray -blur 5x5 -colors 8 $img
|
||||
visual_sleep "render fail" 12
|
||||
visual_sleep "render fail" 30
|
||||
continue
|
||||
fi
|
||||
set -e
|
||||
@@ -44,8 +49,8 @@ do
|
||||
# echo $frame $img $txt
|
||||
convert ${TMPIMG} \
|
||||
-font Courier-Regular \
|
||||
-pointsize 52 \
|
||||
-kerning 4 \
|
||||
-pointsize 56 \
|
||||
-kerning 7 \
|
||||
-strokewidth 1 \
|
||||
-fill ${STROKOL} -stroke ${TEXTCOL} \
|
||||
-gravity south-west \
|
||||
@@ -58,7 +63,8 @@ do
|
||||
printf "%-12s %5d %5d\n" \
|
||||
${SEQNAME} $frame $(( fin-debut )) | \
|
||||
tee -a WS/mp4.timing
|
||||
echo
|
||||
echo $(( $NEXT + 1)) > $LAST
|
||||
|
||||
done
|
||||
|
||||
date --utc > WS/$SEQNAME.done
|
||||
|
||||
Reference in new issue
Block a user