#!/bin/bash

if [ "$#" != 1 ]; then
  echo "usage: $0 <video output filename>"
  echo "Make a video from PNG files in local directory. Supported extensions include MOV, AVI, MPEG, ..."
  exit
fi

video=$1

./convert-images *.png

./encode-video $video

echo -n "Delete all im_*.jpg files [y|n] ?"
read ans
if [ "$ans" == "y" ] || [ "$ans" == "yes" ] ; then
  rm im_*.jpg 
fi

