<?php
set_time_limit(0);
$flvname=escapeshellcmd($_GET["flvname"]);
$streamPath="../record/streams/_definst_/{$flvname}.flv";
$imgW ="160"; 
$imgY = "120";
$imgQuality = "70";
$ss=$i+3;
$newName = "../videoimage/{$flvname}.jpg";
exec ("ffmpeg.exe -i \"{$streamPath}\" -ss {$ss} -vframes 1 -r 1 -ac 1 -ab 2 -s $imgW*$imgY -f image2 \"{$newName}\"");
header("location:../videosave.asp?flvname={$flvname}");
//echo "ffmpeg.exe -i \"{$streamPath}\" -ss {$ss} -vframes 1 -r 1 -ac 1 -ab 2 -s $imgW*$imgY -f image2 \"{$newName}\"";
?>