Page 1 of 1
converting to MPG
Posted: 2011-06-21T08:02:38-07:00
by dognose
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
Re: converting to MPG
Posted: 2011-06-21T10:26:21-07:00
by fmw42
I suspect it is an issue of your web interface/API (such as PHP) not knowing about ffmpeg.
Re: converting to MPG
Posted: 2011-06-22T13:54:41-07:00
by dognose
It's not using an api, just exec call.
How would I tell IM where the ffmpeg is.... or where should I put it?
Re: converting to MPG
Posted: 2011-06-22T14:24:06-07:00
by fmw42
does ffmpeg show up in your list of delegates?
convert -list configure
and look at line starting with DELEGATES.
Re: converting to MPG
Posted: 2011-06-24T12:59:40-07:00
by dognose
#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.
Re: converting to MPG
Posted: 2011-06-24T13:41:27-07:00
by fmw42
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.
Re: converting to MPG
Posted: 2011-06-25T12:14:24-07:00
by dognose
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.
Re: converting to MPG
Posted: 2011-06-25T13:22:52-07:00
by fmw42
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
Posted: 2011-06-26T16:51:04-07:00
by dognose
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.
Re: converting to MPG
Posted: 2011-06-26T17:45:50-07:00
by anthony
Turning off the log is probably an extra option to ffmpeg to be added to the delegate entry.
Re: converting to MPG
Posted: 2011-08-20T01:10:43-07:00
by benleon
Dognose, thanks for sharing. I've got the same issue. Would be great to get some more information about your fix?