#!/bin/bash

echo "####### encoding " $1 " to " $2

SDIR="$1"
OUTP="$2"

if [ -r $SDIR/00000.png ]
then
	EXT=".png"
else
	EXT=".tga"
fi

# figlet $EXT

ffmpeg  -nostdin                                                \
        -loglevel error                                         \
        -y -r 25 -f image2 -i $SDIR/%05d$EXT                   \
        -c:v libx264 -pix_fmt yuv420p                           \
	-metadata artist='---[ tTh ]---'			\
	-metadata title='---[ Fusion of technologies ]---'	\
        $OUTP

# ls -lh $OUTP
echo
