<?php
set_time_limit(0);
$filename=escapeshellcmd($_GET["filename"]);
$username=escapeshellcmd($_GET["username"]);
$streamPath="../UploadVideo/{$username}/{$filename}";
$imgW ="160"; 
$imgY = "120";
$imgQuality = "70";
$ss=$i+3;
$newName = "../videoimage/{$filename}.jpg";
exec ("ffmpeg.exe -i \"{$streamPath}\" -ss {$ss} -vframes 1 -r 1 -ac 1 -ab 2 -s $imgW*$imgY -f image2 \"{$newName}\"");
header("location:../Hompy/videolist.asp?username={$username}&viewmode=1");
//exec ("ffmpeg -i test.wmv -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 test.flv >1.txt")
//exec ("ffmpeg -an -y -t 0:0:0.001 -i test.wmv -f image2 test%d.jpg");
?>