PHP FFMPEG open_basedir限制生效

时间:2017-09-21 12:00:33

标签: php laravel ffmpeg centos

我遇到ffmpeg问题。如果我想从视频中创建一个拇指,我会收到以下错误消息:

  

file_exists():open_basedir限制生效。文件(/tmp/frame59c41921d102f6.99590608.jpg)不在允许的路径中:(/ home / admin / web / faplink.net / public_html:/ home / admin / tmp)

代码:

$video_thumb_path = "thumbs/" . md5($request->file("file")->getClientOriginalName() . time()) . ".png";
          $mov = new \ffmpeg_movie(storage_path("app/public/") . $post->media);
          $frame = $mov->getFrame(10);
          if ($frame) {
              $gd_image = $frame->toGDImage();
              if ($gd_image) {
                  imagepng($gd_image, $video_thumb_path);
                  imagedestroy($gd_image);
                  $post->thumb = $video_thumb_path;
              }
          }
          break;

我使用CentOS7

0 个答案:

没有答案