converting to MPG
converting to MPG
I'm trying to convert an animated gif to a mpg movie
convert anim.gif movie.mpg
doing it on the command line, it works fine... however, when run from a webpage, it produces:
convert: delegate failed `"ffmpeg" -v -1 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2 -i "%M%%d.jpg" "%u.%m" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1058.
So, it seems like a permissions or environment problem with the ffmpeg delegate..
Any ideas on how to trace / fix this ?
convert --version
Version: ImageMagick 6.7.0-0 2011-05-24 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
convert anim.gif movie.mpg
doing it on the command line, it works fine... however, when run from a webpage, it produces:
convert: delegate failed `"ffmpeg" -v -1 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2 -i "%M%%d.jpg" "%u.%m" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1058.
So, it seems like a permissions or environment problem with the ffmpeg delegate..
Any ideas on how to trace / fix this ?
convert --version
Version: ImageMagick 6.7.0-0 2011-05-24 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: converting to MPG
I suspect it is an issue of your web interface/API (such as PHP) not knowing about ffmpeg.
Re: converting to MPG
It's not using an api, just exec call.
How would I tell IM where the ffmpeg is.... or where should I put it?
How would I tell IM where the ffmpeg is.... or where should I put it?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: converting to MPG
does ffmpeg show up in your list of delegates?
convert -list configure
and look at line starting with DELEGATES.
convert -list configure
and look at line starting with DELEGATES.
Re: converting to MPG
#convert -list configure | grep DEL
DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg png rsvg tiff x11 xml wmf zlib
Says it supports mpeg? no ffmpeg listed.
DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg png rsvg tiff x11 xml wmf zlib
Says it supports mpeg? no ffmpeg listed.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: converting to MPG
the fact that it lists mpeg may be an indication you have ffmpeg installed
try
which ffmpeg
to see where it is installed.
also try
man ffmpeg
to get usage information.
try
which ffmpeg
to see where it is installed.
also try
man ffmpeg
to get usage information.
Re: converting to MPG
Well, I know ffmpeg is installed.
/usr/bin/ffmpeg
Like I said, the convert to mpg works on the command line, but not from exec in php.
/usr/bin/ffmpeg
Like I said, the convert to mpg works on the command line, but not from exec in php.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: converting to MPG
then I suspect php needs to be configured to know where it is. unfortunately I don't know how to do that.
Re: converting to MPG
Ok. I think I found out what was happening.
combination of two things.. which make it all the more difficult.
It wasn't seeing the ffmpeg in the path...
and it tries to create a log file, but didn't have permissions in the directory it's trying to do that.
The log seems sort of unnecessary, not sure if it's only in my version, but it probably could be turned off by IM.
combination of two things.. which make it all the more difficult.
It wasn't seeing the ffmpeg in the path...
and it tries to create a log file, but didn't have permissions in the directory it's trying to do that.
The log seems sort of unnecessary, not sure if it's only in my version, but it probably could be turned off by IM.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: converting to MPG
Turning off the log is probably an extra option to ffmpeg to be added to the delegate entry.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: converting to MPG
Dognose, thanks for sharing. I've got the same issue. Would be great to get some more information about your fix?