exec usr local bin mplayer -identify save_flv -ao null -vo null -frame

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
exec("/usr/local/bin/mplayer -identify {$save_flv} -ao null -vo null -frames 0 2>/dev/null | grep ^ID_", $info);
foreach($info as $v){
$v = explode('=',$v);
$m_info[$v[0]] = $v[1];
}
$step = $m_info['ID_LENGTH'] / THUMBS_COUNT;
$cur_sec = 0;
for($j = 0; $j < THUMBS_COUNT; $j++){
exec("/usr/local/bin/ffmpeg -i {$save_flv} -an -ss {$cur_sec} -r 1 -vframes 1 -y -f mjpeg ".$dir3.'/'.$dirname."/{$j}.jpg");
$cur_sec += $step;
}