Handling Video using PHP ffmpeg

Source: Internet
Author: User

Work encountered video loading problems, but video cover on the phone can not be taken to the first frame of the video on the phone, video tags can not be taken to the first frame, after a few days of research in search finally found a more useful way, is the PHP ffmped plug-in, the plug-in installation please consult Baidu related information, So here's the specific code that takes the first stitch in the video

extension_loaded(' FFmpeg ');//not to$ffmpegInstance=NewFfmpeg_movie (' E:\php\APMServ5.2.6\www\htdocs\ceshi.com\spcl\cs.mp4 ');//We're going to use absolute paths here .$ff _frame=$ffmpegInstance->getframe (1);//Intercept First frame$GD _image=$ff _frame-togdimage (); Imagejpeg ($GD _image, ' t.jpg '); Imagedestroy ($GD _image);Echo'  ';

Handling Video using PHP ffmpeg

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.