2021-03-16 10:48:07 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SPOOL="$HOME/TMP"
|
|
|
|
mkdir "$SPOOL"
|
|
|
|
|
2021-03-23 19:55:20 +11:00
|
|
|
NBRE=599
|
|
|
|
POVOPT=" -w1280 -h960 +q9 -a -d "
|
2021-03-16 10:48:07 +11:00
|
|
|
SRCFILE="train.pov"
|
|
|
|
|
|
|
|
for idx in $(seq 0 $NBRE)
|
|
|
|
do
|
|
|
|
|
|
|
|
outfile=$(printf "%s/%04d.png" $SPOOL $idx)
|
|
|
|
horloge=$(echo "$idx / $NBRE" | bc -l)
|
|
|
|
|
2021-03-23 19:55:20 +11:00
|
|
|
printf "%-20s %.4f\n" $outfile $horloge
|
2021-03-16 10:48:07 +11:00
|
|
|
|
|
|
|
povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
ffmpeg -nostdin \
|
|
|
|
-loglevel error \
|
2021-03-23 19:55:20 +11:00
|
|
|
-y -r 25 -f image2 -i $SPOOL/%04d.png \
|
2021-03-16 10:48:07 +11:00
|
|
|
-c:v libx264 -pix_fmt yuv420p \
|
|
|
|
$SPOOL/foo.mp4
|