Questions about PHP Extension ffmpeg configuration success, screenshots and automatic output of pictures

Source: Internet
Author: User
$fN = "c:/inetpub/wwwroot/", if (extension_loaded (' ffmpeg ')) {//Determines whether ffmpeg is loaded $mov = new Ffmpeg_movie ($fN. " 44.mp4 ");//The path of the video $count = $mov->getframecount (); $ff _frame = $mov->getframe;  Capture 80 frames of the picture if ($ff _frame) {$gd _image = $ff _frame->togdimage ();     


php5.4 version successfully configured FFmpeg, the code as above, video is the local video source, call Imagejpeg ($GD _image); This can be displayed in a test environment browser built by the organization to display a captured picture. However, the imagejpeg ($gd _image, $fN. $img) is called, and images that output local paths cannot be generated. Ask the big God to see what code is missing?


Reply to discussion (solution)

Imagejpeg ($GD _image); OK
Imagejpeg ($gd _image, $fN. $img); You can do it.
See if the permissions are enough

$fN = "c:/inetpub/wwwroot/";
You're using IIS?
IIS-managed directories are not write-privileged by default and need to be set in Manager

Imagejpeg ($GD _image); OK
Imagejpeg ($gd _image, $fN. $img); You can do it.
See if the permissions are enough

$fN = "c:/inetpub/wwwroot/";
You're using IIS?
IIS-managed directories are not write-privileged by default and need to be set in Manager


Yes, well, I'm using IIS. Thank you, thank you, great God.
  • 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.