I'm trying to know the size more accurately converted video using ffmpeg, I'm getting the actual size of the original video and output video and dividing the size of 2, the logic when I get the size of another video will multiply the value to know the result.
the purpose of this is because I want to make a progress bar using php and ajax, so by my logic would be.
<?
$total = $select_result;// total original file
$video = 'test.mp4';
//loop ajax
$getID3 = new getID3;
$file = $getID3->analyze($video);
$current = $file['filesize'];
$a = $total / $current;
$b = $a * 100;
print number_format($b,0).'%';
?>
ffmpeg command will always be this
exec("ffmpeg -i $video -ar 22050 -ab 32 -f mp4 -s 320x240 teste1.mp4")
but by my logic does not work, each video is a different value, it is possible to do this calculation?