小编Fre*_*man的帖子

FFMPEG在命令行中运行但不在PHP中运行

我正在使用ffmpeg build for windows来制作视频缩略图.该命令在命令行中运行良好,但不适用于PHP exec方法.我正在使用PHP 5.2.11

这是命令.

"E:/Documents and Settings/x/WINDOWS/ffmpeg" -itsoffset -4 -v "E:/Program Files/Apache Software Foundation/Apache2.2/htdocs/bs/files/videogal/c08c3d20eeb9083ed033577bd154cba6.flv" -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 "E:/Program Files/Apache Software Foundation/Apache2.2/htdocs/bs/files/gallery/8ff43b72b932d2a34e7a6733672ad4d6.jpg" 2>&1
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙.我检查了他们看起来很好的权限.GD已安装.

错误消息是 'E:/Documents' is not recognized as an internal or external command, operable program or batch file

我在路径中使用正斜杠,除非转义双引号

PHP函数

function ExtractThumb($in, $out)
{$path=dbconf::FFMPEG_PATH;
    $thumb_stdout;
    $errors;
    $retval = 0;
 echo $in;
    // Delete the file if it already exists
    if (file_exists($out)) { unlink($out); }

    // Use ffmpeg to generate a …
Run Code Online (Sandbox Code Playgroud)

php ffmpeg

10
推荐指数
1
解决办法
5006
查看次数

标签 统计

ffmpeg ×1

php ×1