“晚风吹人醒 万事藏于心 
        我没说不公平 也没说苦 我说我知道了”
// $file = $_SERVER["DOCUMENT_ROOT"]."/uploadfile/ffmpeg/input.mp4";
$file = "http://116.163.31.159/om.tc.qq.com/AQq6bDOa9vF_tPmPZLUiAjcplILN-9YQaJntd-06zgeM/uwMROfz2r5zCIaQXGdGnC2dfhzk_jigLCkkLvI0zErHWpl3G/n09527myd1d.m701.mp4?vkey=BEF4C6ADBF15538598A12D60533441347556F5188D0D1FB42AC1F5F39881E94968827722ACBC02A23BF1CC2286D0BB99C7E4B8DADDBDF10B02645592BE64FB09AF5AD134FDF3DD032EC65BFEA676D5DFDC1F2223094DB0BC2932F95BA5B51B7086F5D29D80BB057FF59810FE8C95FE9401BACF5321051452107FF16532E0BF49";
$gif = $_SERVER["DOCUMENT_ROOT"]."/uploadfile/ffmpeg/output.gif";
$res = $this->getGif($file,$gif);

public function getGif($input,$output){
$cmd = "ffmpeg -y -ss 00:00:7.000 -i ".$input." -pix_fmt rgb8 -r 5 -s 300*390 -t 00:00:5.000 ".$output;
$res = exec($cmd); 
}

 视频截取gif动图为封面

posted on 2020-05-08 17:04  诗里刻画的影子  阅读(156)  评论(0编辑  收藏  举报