PHP从远程URL创建视频缩略图

时间:2017-03-23 17:56:18

标签: php ffmpeg video-thumbnails

我在google cloud上的视频存储空间中,我需要为我的视频创建thumbnail它才会远程,我尝试使用FFmpeg来创建和获取拇指的内容,但它不起作用,它只为我返回null。

public function create_video_thumb($video){

        $ffmpeg = '/usr/bin/ffmpeg';

        try{

            $cmd = "ffmpeg -i $video -deinterlace -an -ss 00:00:10 -vframes 1 -f image2 'test.jpg' ";

            $return = array(
                'success'=>true,
                'content' => $cmd
            );

        }catch (Exception $e){
            $return = $e->getMessage();
        }


        return   $return;
    }

返回:

{
      "sucess":true,
      "content":null
}

0 个答案:

没有答案
相关问题