37 lines
766 B
Bash
Executable File
37 lines
766 B
Bash
Executable File
#!/bin/bash
|
|
|
|
POVOPT=" -d +q9 +a +W1920 +H1080 -v +WT4"
|
|
PASS=600
|
|
ERR="/tmp/pov.error"
|
|
POVINC="WS/pickover.inc"
|
|
|
|
./pickover foo.pgm | awk -f pick2pov.awk > $POVINC
|
|
head $POVINC
|
|
|
|
for pass in $(seq 0 $(( PASS-1 )) )
|
|
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
|