Just a few days ago i had ffmpeg-php working. then i got the bright idea to try to add a codec to ffmpeg. so i re-installed ffmpeg and then ffmpeg-php. i then noticed this error:
Fatal error: Call to a member function togdimage() on a non-object
which i did NOT get before.
PHP Code:
$movie = new ffmpeg_movie("testmovie.wmv");
$cap = $movie->getFrame(1);
$img = $cap->togdimage();
that is my php code. (i have also tried MANY different movie types) now i have figured out that all functions called from $cap return that error, $cap returns false, but am not sure why. i have not changed this code at all, yet it worked before this.
I have the latest ffmpeg, the latest ffmpeg-php, the latest php, and the latest gd library installed.
also, in an outputted phpinfo() page, it says that ffmpeg-php is installed correctly. i also printed out:
get_class_methods("ffmpeg_frame") and get_class_methods("ffmpeg_movie")
and that returns all the functions, they are all there, including togdimage.
when configuring php, i have read mixed ideas. some say to use --with-gd, and some say --with-gd=shared. i have tried both, with no success with either.
here is my configuration command for "ffmpeg"
Code:
TMPDIR="/tmp2" ./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
a) if i don't have the TMPDIR="/tmp2" there, it will say "Unable to create and execute files in /tmp. Set the TMPDIR environment
variable to another directory and make sure that /tmp is not mounted
noexec. Sanity test failed.". but the /tmp2 dir does exist and is chmodded 7777.
b) i have installed libOGG many times but when i have --enable-libogg as an option it says "Unknown option.." so i just take it out.
and for ffmpeg-php i dont use any configuration parameters. once ffmpeg-php is installed, i go to "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/" and copy ffmpeg.so to "/usr/local/lib/php/extensions/" (one directory up), and in my php.ini file i have:
Code:
extension_dir = "/usr/local/lib/php/extensions/"
extension=ffmpeg.so
in my phpinfo(), it DOES recognize ffmpeg-php. but the functions out of the class wont work.
Can anyone further help me debug this problem?