[Ffmpeg-php-user] Problems using php-ffmpeg
Brought to you by:
tkirby
|
From: Antonio F. <af...@ne...> - 2007-05-22 17:06:07
|
Hello
=20
I am a new user of FFMPEG-PHP. I am trying to create an animated-gif =
using php-ffmpeg, but i am getting some errors.
I have tried the ffmpeg command line version to do the some task and it =
worked well.
=20
I am getting the following problems:
1 - The call $vi->getframerate(); returns 0.0010... instead of real =
frame rate of 25fps
2 - The call to $frame =3D $vi->getframecount(); returns 1 instead of =
the real number of frames
3 - Some times the call to "$gif =3D new ffmpeg_animated_gif()" return =
the "codec not found" error
any tip about wath is happning?
=20
best Regards
Ant=C3=B3nio
=20
THE CODE I AM USING
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<?
function create_gif_video($src_path , $dest_path )
{
=20
$vi =3D new ffmpeg_movie( $src_path );
$w =3D $vi->getframewidth() ;
$h =3D $vi->getframeheight() ;
$rate =3D $vi->getframerate() ;
$frame =3D $vi->getframecount();
=20
$gif =3D new ffmpeg_animated_gif( $thumb_path , $w , $h , 10 , 0 );=20
=20
for( $cont=3D1 ; $cont<100 ; $cont++ )
{
$gif->addframe( $vi->getframe($cont) );
}
}
?>
=20
THE INSTALLED SOFTWARE
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Linux 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 EDT 2006 i686
Apache 2.2.3 (Mandriva Linux/PREFORK-1mdv2007.0)
PHP Version 5.1.6
ffmpeg-php version 0.4.6.0
libavcodec version Lavc51.9.0
libavformat version Lavf50.4.0
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
=20
|