【发布时间】:2013-12-20 18:28:27
【问题描述】:
$video_name = $_FILES['video_file']['name'];
$video_tmp_name = $_FILES['video_file']['tmp_name'];
$video_size = $_FILES['video_file']['size'];
// where ffmpeg is located
$ffmpeg = 'C:\\ffmpeg\bin\\ffmepg';
//video dir
$video = $video_tmp_name;
//where to save the image
$image = 'video/image.jpg';
//time to take screenshot at
$interval = 5;
//screenshot size
$size = '640x480';
//ffmpeg command
echo $cmd = $ffmpeg ."-i". $video ." -an -ss".$interval." -s ".$size . "-vcodec mjpeg ".$image ." 2>&1";
shell_exec($cmd);
我写下这段代码。但它不会从视频中创建任何缩略图。我不明白这段代码有什么问题。
【问题讨论】:
-
总是很紧急...您应该包含完整的 ffmpeg 控制台输出,以便我们了解为什么它可能不会产生任何输出图像。
标签: php ffmpeg thumbnails