简体   繁体   中英

Imagick+php UnableToOpenBlob with mp4 file

I'm trying to make a simple Imagick operation on my local environment, like

$im = new Imagick("File.mp4[100]");

to prepare video file frame capture. Unfortunately I get a strange exception:

UnableToOpenBlob `C:/Temp/magick-5924U7hGfaatgEtF.pam': No such file or directory @ error/blob.c/OpenBlob/2657

I've made C:\\Temp directory fully writable to "Everybody" - nothing changes.

When I'm running convert File.mp4[100] File.jpg from command line operation succeeds, JPG file is generated.

My environment: PHP Version 5.6.12 Imagick module version 3.1.2 ImageMagick version ImageMagick 6.8.9-1 Q16 x86 2014-05-08

It's likely to be a permissions thing on running the "delegate" that ImageMagick uses to decode video. The way to find out what delegate ImageMagick is using is by running:

convert -list Delegate

And then finding the one that would be selected for MP4.

I'd suggest trying to run the delegate program through PHP eg something like exec("C:/Program Files (x86)/mp4/bin/mp4converter.exe") or whatever program it actually is from inside PHP, and then figure out if that runs successfully or not...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM