> I have compiled ffmpeg with it's default configuration, and based on > the config.h it states: > --enable-swscale software scaler support [default=no]
I also have this issue on a new box intalled with Debian 64bits
ffmpeg had no been compiled with swscale.
both ffmpeg and ffmpeg-php have been compiled against latest svn
version as of yesterday for ffmpeg and today for ffmpeg-php
code is :
ffmovie = new ffmpeg_movie($input_file, false) or die("sorry we cannot
analyse your file");
$duration = $ffmovie->getDuration();
$img = $ffmovie->getFrame(140);
$img_width = $img->getWidth();
$img_height = $img->getHeight();
$ratio = 150 / $img_width;
$img->resize(150, ((int) ($img_height * $ratio / 2)) * 2);
$imgGD = $img->toGDImage();
--> draws an errror : Fatal error: failed to convert frame to gd image
in test.php on line 9
phpinfo returns
ffmpeg support (ffmpeg-php) enabled
ffmpeg-php version 0.5.2.1
libavcodec version Lavc51.54.0
libavformat version Lavf52.13.0
ffmpeg-php gd support enabled
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.2.1
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
On Wed, Apr 9, 2008 at 10:17 PM, Jne <goo...@neuveglise.net> wrote:
> I also have this issue on a new box intalled with Debian 64bits
> ffmpeg had no been compiled with swscale.
> both ffmpeg and ffmpeg-php have been compiled against latest svn > version as of yesterday for ffmpeg and today for ffmpeg-php
> code is :
> ffmovie = new ffmpeg_movie($input_file, false) or die("sorry we cannot > analyse your file"); > $duration = $ffmovie->getDuration(); > $img = $ffmovie->getFrame(140);
> $img_width = $img->getWidth(); > $img_height = $img->getHeight(); > $ratio = 150 / $img_width; > $img->resize(150, ((int) ($img_height * $ratio / 2)) * 2); > $imgGD = $img->toGDImage(); > --> draws an errror : Fatal error: failed to convert frame to gd image > in test.php on line 9
> phpinfo returns > ffmpeg support (ffmpeg-php) enabled > ffmpeg-php version 0.5.2.1 > libavcodec version Lavc51.54.0 > libavformat version Lavf52.13.0 > ffmpeg-php gd support enabled
> GD Support enabled > GD Version 2.0 or higher > FreeType Support enabled > FreeType Linkage with freetype > FreeType Version 2.2.1 > T1Lib Support enabled > GIF Read Support enabled > GIF Create Support enabled > JPG Support enabled > PNG Support enabled > WBMP Support enabled
Any pdate on this? Did you manage to get it working? I've got the
exact same problem and it seems to fail in _php_avframe_to_gd_image()
in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
On Apr 10, 5:49 am, JohnnyWang <ronald.sec...@gmail.com> wrote:
> I have compiled ffmpeg with it's default configuration, and based on
> the config.h it states:
> --enable-swscale software scaler support [default=no]
> Any pdate on this? Did you manage to get it working? I've got the
> exact same problem and it seems to fail in _php_avframe_to_gd_image()
> in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> On Apr 10, 5:49 am, JohnnyWang <ronald.sec...@gmail.com> wrote:
> > Hello,
> > I've tried the solutions found in this group but am still receiving
> > the following error:
> > I have compiled ffmpeg with it's default configuration, and based on
> > the config.h it states:
> > --enable-swscale software scaler support [default=no]
On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> Discovered that using the previous version of ffmpeg-php: 0.5.1 it > worked perfectly.
> On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote: > > Any pdate on this? Did you manage to get it working? I've got the > > exact same problem and it seems to fail in _php_avframe_to_gd_image() > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > On Apr 10, 5:49 am, JohnnyWang <ronald.sec...@gmail.com> wrote:
> > > Hello,
> > > I've tried the solutions found in this group but am still receiving > > > the following error:
> > > I have compiled ffmpeg with it's default configuration, and based on > > > the config.h it states: > > > --enable-swscale software scaler support [default=no]
Exists any update?
Ive got the same error.
ffmpeg compiled without swscale (./configure --enabled-shared --
disabled-swscale)
ffmpeg-php version 5.2.1 compilation ok
> >I've got the
> > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> Can you post the error that you get. I've not seen that one before.
> On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > Discovered that using the previous version of ffmpeg-php: 0.5.1 it
> > worked perfectly.
> > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:
> > > Any pdate on this? Did you manage to get it working? I've got the
> > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > I have compiled ffmpeg with it's default configuration, and based on
> > > > the config.h it states:
> > > > --enable-swscale software scaler support [default=no]
I've tried all available versions of ffmpeg-php. I'm receiving the
same issue with in each version withn PHP 5.2.3-1ubuntu6.3 on mint
4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and
update this thread if I find the issue.
On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:
> ffmpeg-php version 0.5.3
> libavcodec version Lavc51.57.1
> libavformat version Lavf52.14.0
> ffmpeg-php gd support enabled
> I'll attempt a down grade and let you know what happens
> On Apr 25, 2:40 pm, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> > >I've got the
> > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > Can you post the error that you get. I've not seen that one before.
> > On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > > Discovered that using the previous version of ffmpeg-php: 0.5.1 it
> > > worked perfectly.
> > > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:
> > > > Any pdate on this? Did you manage to get it working? I've got the
> > > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > > I have compiled ffmpeg with it's default configuration, and based on
> > > > > the config.h it states:
> > > > > --enable-swscale software scaler support [default=no]
> I've tried all available versions of ffmpeg-php. I'm receiving the
> same issue with in each version withn PHP 5.2.3-1ubuntu6.3 on mint
> 4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and
> update this thread if I find the issue.
> On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:
> > I'm experiencing the same issue:
> > ffmpeg-php version 0.5.3
> > libavcodec version Lavc51.57.1
> > libavformat version Lavf52.14.0
> > ffmpeg-php gd support enabled
> > I'll attempt a down grade and let you know what happens
> > > >I've got the
> > > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > Can you post the error that you get. I've not seen that one before.
> > > On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > > > Discovered that using the previous version of ffmpeg-php: 0.5.1 it
> > > > worked perfectly.
> > > > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:
> > > > > Any pdate on this? Did you manage to get it working? I've got the
> > > > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > > > I have compiled ffmpeg with it's default configuration, and based on
> > > > > > the config.h it states:
> > > > > > --enable-swscale software scaler support [default=no]
> I tried on ffmpeg-php 5.2.1 and 5.3.1, swscale disabled at
> compilation.
> is anyone got an issue ?
> On 13 juin, 11:23, greg <gsidbe...@gmail.com> wrote:
> > I've tried all available versions of ffmpeg-php. I'm receiving the
> > same issue with in each version withn PHP 5.2.3-1ubuntu6.3 on mint
> > 4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and
> > update this thread if I find the issue.
> > On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:
> > > I'm experiencing the same issue:
> > > ffmpeg-php version 0.5.3
> > > libavcodec version Lavc51.57.1
> > > libavformat version Lavf52.14.0
> > > ffmpeg-php gd support enabled
> > > I'll attempt a down grade and let you know what happens
> > > > >I've got the
> > > > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > Can you post the error that you get. I've not seen that one before.
> > > > On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > > > > Discovered that using the previous version of ffmpeg-php: 0.5.1 it
> > > > > worked perfectly.
> > > > > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:
> > > > > > Any pdate on this? Did you manage to get it working? I've got the
> > > > > > exact same problem and it seems to fail in _php_avframe_to_gd_image()
> > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > > > > I have compiled ffmpeg with it's default configuration, and based on
> > > > > > > the config.h it states:
> > > > > > > --enable-swscale software scaler support [default=no]
Hmm so it's not detecting gd when loaded as an extension. There is a configuration option in ffmpeg-php to skip checking for gd at compile time and assume it's installed.
On Tue, Jun 17, 2008 at 7:57 AM, Romain <imp...@gmail.com> wrote:
> Hi
> First sorry for my bad english, but i got a good news
> I was like everybody in this topic, i mean :
> Debian etch, php5 > I tried to install ffmpeg-php 5.1 5.2.1 5.3.1 lots of time with many > configs, it never worked.
> I used to install php and gd with the apt-get. > Today, I tried to install everything from scratch and compile myself > php --with-gd
> I installed the ffmpeg-php 5.3.1 and it works !
> Try to compile php with gd rathert than load it as module.
> I'll try to do it on another station where it didn't work in the past > and i'll keep you informed if it's a real issue.
> Romain
> On 16 juin, 19:51, Romain <imp...@gmail.com> wrote: > > Got the same problem as everybody
> > I tried on ffmpeg-php 5.2.1 and 5.3.1, swscale disabled at > > compilation.
> > is anyone got an issue ?
> > On 13 juin, 11:23, greg <gsidbe...@gmail.com> wrote:
> > > I've tried all available versions of ffmpeg-php. I'm receiving the > > > same issue with in each version withn PHP 5.2.3-1ubuntu6.3 on mint > > > 4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and > > > update this thread if I find the issue.
> > > On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:
> > > > I'm experiencing the same issue:
> > > > ffmpeg-php version 0.5.3 > > > > libavcodec version Lavc51.57.1 > > > > libavformat version Lavf52.14.0 > > > > ffmpeg-php gd support enabled
> > > > I'll attempt a down grade and let you know what happens
> > > > > >I've got the > > > > > > exact same problem and it seems to fail in > _php_avframe_to_gd_image() > > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > > Can you post the error that you get. I've not seen that one > before.
> > > > > On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > > > > > Discovered that using the previous version of ffmpeg-php: 0.5.1 > it > > > > > > worked perfectly.
> > > > > > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote: > > > > > > > Any pdate on this? Did you manage to get it working? I've got > the > > > > > > > exact same problem and it seems to fail in > _php_avframe_to_gd_image() > > > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> Hmm so it's not detecting gd when loaded as an extension. There is a
> configuration option in ffmpeg-php to skip checking for gd at compile time
> and assume it's installed.
> --enable-skip-gd-check
> That may work in this situation.
> -Todd
> On Tue, Jun 17, 2008 at 7:57 AM, Romain <imp...@gmail.com> wrote:
> > Hi
> > First sorry for my bad english, but i got a good news
> > I was like everybody in this topic, i mean :
> > Debian etch, php5
> > I tried to install ffmpeg-php 5.1 5.2.1 5.3.1 lots of time with many
> > configs, it never worked.
> > I used to install php and gd with the apt-get.
> > Today, I tried to install everything from scratch and compile myself
> > php --with-gd
> > I installed the ffmpeg-php 5.3.1 and it works !
> > Try to compile php with gd rathert than load it as module.
> > I'll try to do it on another station where it didn't work in the past
> > and i'll keep you informed if it's a real issue.
> > Romain
> > On 16 juin, 19:51, Romain <imp...@gmail.com> wrote:
> > > Got the same problem as everybody
> > > I tried on ffmpeg-php 5.2.1 and 5.3.1, swscale disabled at
> > > compilation.
> > > is anyone got an issue ?
> > > On 13 juin, 11:23, greg <gsidbe...@gmail.com> wrote:
> > > > I've tried all available versions of ffmpeg-php. I'm receiving the
> > > > same issue with in each version withn PHP 5.2.3-1ubuntu6.3 on mint
> > > > 4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and
> > > > update this thread if I find the issue.
> > > > On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:
> > > > > I'm experiencing the same issue:
> > > > > ffmpeg-php version 0.5.3
> > > > > libavcodec version Lavc51.57.1
> > > > > libavformat version Lavf52.14.0
> > > > > ffmpeg-php gd support enabled
> > > > > I'll attempt a down grade and let you know what happens
> > > > > > >I've got the
> > > > > > > exact same problem and it seems to fail in
> > _php_avframe_to_gd_image()
> > > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > > > Can you post the error that you get. I've not seen that one
> > before.
> > > > > > On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > > > > > > Discovered that using the previous version of ffmpeg-php: 0.5.1
> > it
> > > > > > > worked perfectly.
> > > > > > > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:
> > > > > > > > Any pdate on this? Did you manage to get it working? I've got
> > the
> > > > > > > > exact same problem and it seems to fail in
> > _php_avframe_to_gd_image()
> > > > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
The --enable-skip-gd-check option at compilation does not solve the
problem in my case on that conf :
php5 with gd as module
ffmpeg
ffmpeg support (ffmpeg-php) enabled
ffmpeg-php version 0.5.3.1
libavcodec version Lavc51.57.0
libavformat version Lavf52.14.0
ffmpeg-php gd support enabled
Directive Local Value Master Value
ffmpeg.allow_persistent 0 0
ffmpeg.show_warnings 0 0
gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.2.1
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
When using the toGDimage() methode, get the error "Fatal error: failed
to convert frame to gd image"
On 18 juin, 14:14, Romain <imp...@gmail.com> wrote:
> On 17 juin, 20:17, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> > Hmm so it's not detecting gd when loaded as an extension. There is a
> > configuration option in ffmpeg-php to skip checking for gd at compile time
> > and assume it's installed.
> > --enable-skip-gd-check
> > That may work in this situation.
> > -Todd
> > On Tue, Jun 17, 2008 at 7:57 AM, Romain <imp...@gmail.com> wrote:
> > > Hi
> > > First sorry for my bad english, but i got a good news
> > > I was like everybody in this topic, i mean :
> > > Debian etch, php5
> > > I tried to install ffmpeg-php 5.1 5.2.1 5.3.1 lots of time with many
> > > configs, it never worked.
> > > I used to install php and gd with the apt-get.
> > > Today, I tried to install everything from scratch and compile myself
> > > php --with-gd
> > > I installed the ffmpeg-php 5.3.1 and it works !
> > > Try to compile php with gd rathert than load it as module.
> > > I'll try to do it on another station where it didn't work in the past
> > > and i'll keep you informed if it's a real issue.
> > > Romain
> > > On 16 juin, 19:51, Romain <imp...@gmail.com> wrote:
> > > > Got the same problem as everybody
> > > > I tried on ffmpeg-php 5.2.1 and 5.3.1, swscale disabled at
> > > > compilation.
> > > > > I've tried all available versions of ffmpeg-php. I'm receiving the
> > > > > same issue with in each version withn PHP 5.2.3-1ubuntu6.3 on mint
> > > > > 4 / ubuntu 7.10. I'll do a fresh install on a remote ubuntu server and
> > > > > update this thread if I find the issue.
> > > > > On Jun 9, 6:18 pm, greg <gsidbe...@gmail.com> wrote:
> > > > > > I'm experiencing the same issue:
> > > > > > ffmpeg-php version 0.5.3
> > > > > > libavcodec version Lavc51.57.1
> > > > > > libavformat version Lavf52.14.0
> > > > > > ffmpeg-php gd support enabled
> > > > > > I'll attempt a down grade and let you know what happens
> > > > > > > >I've got the
> > > > > > > > exact same problem and it seems to fail in
> > > _php_avframe_to_gd_image()
> > > > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
> > > > > > > Can you post the error that you get. I've not seen that one
> > > before.
> > > > > > > On Fri, Apr 25, 2008 at 4:48 AM, joh <dewo...@gmail.com> wrote:
> > > > > > > > Discovered that using the previous version of ffmpeg-php: 0.5.1
> > > it
> > > > > > > > worked perfectly.
> > > > > > > > On Apr 25, 2:50 pm, joh <dewo...@gmail.com> wrote:
> > > > > > > > > Any pdate on this? Did you manage to get it working? I've got
> > > the
> > > > > > > > > exact same problem and it seems to fail in
> > > _php_avframe_to_gd_image()
> > > > > > > > > in ffmpeg_frame.c:402 on gdImageBoundsSafeMacro().
static int le_gd; // this is only valid after calling
// FFMPEG_PHP_FETCH_IMAGE_RESOURCE()
@@ -399,7 +400,7 @@
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
- if (gdImageBoundsSafeMacro(dest, x, y)) {
+ if (gdImageBoundsSafeMacroFixed(x, y, dest-