#!/bin/bash
NOW=$(date +"%m-%d-%Y")
#mplayer tv:// -tv driver=v4l2:device=/dev/video1:width=1280:height=720:outfmt=rgb24 -frames 1 -nosound -vo png:z=0 > /dev/null 2>/dev/null
#mv 00000001.png $NOW.png


for i in 1 2 3 4 5
do
	/usr/local/bin/ffmpeg -y -f video4linux2 -itsoffset -10 -i /dev/video1 -vcodec png -vframes 1 -an -f rawvideo -s 1280x720 $NOW-$i.png
	sleep 10;
done

php twitter-photo.php $NOW.png
php rename.php
