2022-03-08 20:36:32 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
POVOPT=" -d +q9 +a +W1920 +H1080 -v +WT4"
|
|
|
|
PASS=600
|
|
|
|
ERR="/tmp/pov.error"
|
2022-03-19 09:36:56 +11:00
|
|
|
POVINC="WS/pickover.inc"
|
2022-03-08 20:36:32 +11:00
|
|
|
|
2022-03-19 09:36:56 +11:00
|
|
|
./pickover foo.pgm | awk -f pick2pov.awk > $POVINC
|
|
|
|
head $POVINC
|
|
|
|
|
|
|
|
for pass in $(seq 0 $(( PASS-1 )) )
|
2022-03-08 20:36:32 +11:00
|
|
|
do
|
|
|
|
|
|
|
|
dstname=$(printf "frames/pick3d/%05d.png" $pass)
|
|
|
|
echo $dstname
|
|
|
|
|
|
|
|
povray -ipick3d.pov -K${pass} \
|
|
|
|
Declare=NBPASS=${PASS} \
|
|
|
|
$POVOPT -O${dstname} 2> $ERR
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
tail $ERR
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
sleep 16
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
ffmpeg -nostdin \
|
|
|
|
-loglevel warning \
|
|
|
|
-y -r 25 -f image2 -i frames/pick3d/%05d.png \
|
|
|
|
-metadata artist='---[ tTh ]---' \
|
|
|
|
-c:v libx264 -pix_fmt yuv420p \
|
|
|
|
pick3d.mp4
|