Page 1 of 1

Fatal error Cannot instantiate non-existent class

Posted: Fri Oct 20, 2006 8:22 am
by amir
Hi Guys
I have a script that converts any video format into a flv file using ffmpeg,
the issues is I have installed it, here is the config

running on windows , apache, php and mysql.

I can open the website fine, I can login, when I try to upload a video i get the following error.

"Fatal error: Cannot instantiate non-existent class: ffmpeg_movie in C:\Program Files\Apache Group\Apache2\htdocs\testtube\upload.php on line 83"

here is the section of upload.php that has line 83.
--------------------------------------------------------------------------------------------------------------------------------------------------

Code: Select all

if(isset($_FILES['field_uploadfile']['tmp_name']) && is_uploaded_file($_FILES['field_uploadfile']['tmp_name']))
                    {
                              $ff = $config[vdodir]."/".$vdoname;
                         if(move_uploaded_file($_FILES['field_uploadfile']['tmp_name'], $ff))
(THIS IS LINE 83)------------------->>>       {     $mov = new ffmpeg_movie($ff);
                                   video_to_frame($ff,$vid,&$mov,$listch[0]);
                                   $duration=$mov->getDuration();
                                   //exec("$config[ffmpeg] -i $config[vdodir]/$vdoname -acodec mp3 -ar 22050 -ab 32 -f flv $config[flvdodir]/".$vid.".flv");
                                   exec("c:/ffmpeg/ffmpeg -i $config[vdodir]/$vdoname -acodec mp3 -ar 22050 -ab 32 -f flv $config[flvdodir]/".$vid.".flv");
----------------------------------------------------------------------------------------------------------------------------------------------------

All help is appreiciated.

Thanks

Posted: Fri Oct 20, 2006 9:33 am
by JayBird
Have you got the ffmpeg-php extension installed?

Posted: Fri Oct 20, 2006 11:40 am
by s.dot
did you require the class into the page?

require 'ffmpeg.class.php';

Posted: Fri Oct 20, 2006 4:43 pm
by amir
I have looked all over, can you give me exact step by step instruction on how to install ffmpeg-php. I assumed the script came with the extension installed.
I am new to php that is why if you can give detailed info for setting that up on a windows machine atleast I will be able to check if it is installled or not and if it is not I can install it.

Thanks

Posted: Fri Oct 20, 2006 6:46 pm
by Jade
They should have instructions on php.net if you search for ffmpeg-php

Posted: Fri Oct 20, 2006 6:52 pm
by volka
Jade wrote:They should have instructions on php.net if you search for ffmpeg-php
sure? A short google search "only" found a project hosted at sourceforge.
http://ffmpeg-php.sourceforge.net/ wrote:Compatibility
Some users have posted Windows builds to the ffmpeg-php google group. I hear from folks that they work great but I haven't had time to test them personally yet.