I am trying to extract the first frame from an mp4 video. I am running the following command:
/usr/local/bin/convert '/home/joycem6/media/upload/shambala.mp4[1]' -resize 350X450 -quality 80 -colorspace RGB '/home/joycem6/media/upload/preview/preview_498d9da8a455e.jpg'
I get this error:
convert: Delegate failed `"ffmpeg" -v -1 -i "%i" -vcodec pam -an -f rawvideo -y "%u0.pam" 2> "%Z"' @ delegate.c/InvokeDelegate/1015. convert: missing an image filename `/home/joycem6/media/upload/preview/preview_498d9da8a455e.jpg' @ convert.c/ConvertImageCommand/2710.
My web host says the problem is the missing file, but the file mentioned is the output file which, of course, won't exist until the command has completed successfully. My assumption is that "delegate failed" is the real error. What is the real error and how do I (or they) fix it? The web host says that ffmpeg is installed on the server.
Imagemagick ffmpeg delegate error
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Imagemagick ffmpeg delegate error
Can you write to the directory?
as you are using a ISP it sounds like you may be doing from from a web server script. The web server usally runs as a completely different user to the normal account, and as such may not have write access by default (this is on purpose as a security measure).
Try writing the file into /tmp and make sure you clean up afterward or the ISP may not be too happy.
as you are using a ISP it sounds like you may be doing from from a web server script. The web server usally runs as a completely different user to the normal account, and as such may not have write access by default (this is on purpose as a security measure).
Try writing the file into /tmp and make sure you clean up afterward or the ISP may not be too happy.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Imagemagick ffmpeg delegate error
Hi Anthony,
Yes, I can write to the directory. You're right, I am shelling out from a PHP script. I use imagemagick to create other jpegs to the same directory with no problem.
George
Yes, I can write to the directory. You're right, I am shelling out from a PHP script. I use imagemagick to create other jpegs to the same directory with no problem.
George
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Imagemagick ffmpeg delegate error
Ok have you redirected and looked at any errors the command may have produced?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Imagemagick ffmpeg delegate error
Yes, I did redirect. The error I received is what I put in my first post:
convert: Delegate failed `"ffmpeg" -v -1 -i "%i" -vcodec pam -an -f rawvideo -y "%u0.pam" 2> "%Z"' @ delegate.c/InvokeDelegate/1015. convert: missing an image filename `/home/joycem6/media/upload/preview/preview_498d9da8a455e.jpg' @ convert.c/ConvertImageCommand/2710.
convert: Delegate failed `"ffmpeg" -v -1 -i "%i" -vcodec pam -an -f rawvideo -y "%u0.pam" 2> "%Z"' @ delegate.c/InvokeDelegate/1015. convert: missing an image filename `/home/joycem6/media/upload/preview/preview_498d9da8a455e.jpg' @ convert.c/ConvertImageCommand/2710.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Imagemagick ffmpeg delegate error
What version of IM are you using.
I remember reporting and having an error fixed where a delegate recieved the wrong filename. This was fixed for IM 6.4.3-7
I remember reporting and having an error fixed where a delegate recieved the wrong filename. This was fixed for IM 6.4.3-7
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/