|
@@ -549,7 +549,7 @@ if (!function_exists('getVideoCover')) {
|
|
|
function getVideoCover($file, $time, $name)
|
|
|
{
|
|
|
// 视频宽高 -- 开始
|
|
|
- $command = sprintf('/www/wwwroot/yanyuan.lanmaonet.com/ffmpeg -i "%s" 2>&1', $file);
|
|
|
+ $command = sprintf(config('project_path') . '/ffmpeg -i "%s" 2>&1', $file);
|
|
|
ob_start();
|
|
|
passthru($command);
|
|
|
$info = ob_get_contents();
|
|
@@ -568,7 +568,7 @@ if (!function_exists('getVideoCover')) {
|
|
|
// 视频宽高 -- 结束
|
|
|
|
|
|
if (empty($time)) $time = 0.1;//默认截取第一秒第一帧
|
|
|
- $str = "/www/wwwroot/yanyuan.lanmaonet.com/ffmpeg -i " . $file . " -y -f mjpeg -ss 3 -t " . $time . " -s ".$resolution." " . $name;
|
|
|
+ $str = config('project_path') . "/ffmpeg -i " . $file . " -y -f mjpeg -ss 3 -t " . $time . " -s ".$resolution." " . $name;
|
|
|
exec($str.' 2>&1',$result);
|
|
|
return $result;
|
|
|
}
|