Create Video thumbnail in slim

2019-03-06 17:38发布

I am creating api's using slim framework.My problem is that i am trying to upload video to localserver but the thumbnails of video are not generating. I have tried ffmpeg but it is not working:

Here is my code:

exec('ffmpeg -itsoffset -4 -i C:\xampp\htdocs\givemethatpic\shared_17008.mp4  -vcodec mjpeg -vframes 1 -an -f rawvideo -ss 620x440  C:\xampp\htdocs\givemethatpic\tdrrsss.jpg');

I used ffmpeg-win32 setup and it installed the ffmpeg to C:\Program Files (x86). I do not know where i am wrong.Please tell why thumbnail is not generating??

标签: video ffmpeg
1条回答
爷的心禁止访问
2楼-- · 2019-03-06 18:11

I changed the command like this exec('ffmpeg -y -i '.$file_path.' -vcodec mjpeg -ss 00:00:01 -vframes 1 -an -s 620x440 -f rawvideo '.$image.'',$thumb_stdout, $retval); and everthing is working fine

查看更多
登录 后发表回答