#!/usr/bin/perl -w

#usage: getAVIInfo.pl format

#parse output of tcprobe to get framecount + fps
#pass back framecount after recalculating at new frame rate

$format = $ARGV[0];

if ($format eq "PAL"){
	$framespersec=25
} else {
	$framespersec=29.97
}

while (<STDIN>) {
	if (/V: (\d+\.*\d*) fps.+frames=(\d+)/) {
		print int $2/$1*$framespersec;
		exit
	}
}




