TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   ffmpeg work with PHP (http://www.talkphp.com/advanced-php-programming/3767-ffmpeg-work-php.html)

moiseszaragoza 12-14-2008 06:16 PM

ffmpeg work with PHP
 
does any one know what are the server requayerment for ffmpeg work with php?

Wildhoney 12-14-2008 08:00 PM

Requirements? There are none as such. FFMPEG must be compiled on the server, and has dependencies of its own which will need to be installed on the server also. Once FFMPEG works over SSH, it will work with PHP. Simply choose a PHP function to execute the FFMPEG commands, such as exec().

moiseszaragoza 01-02-2009 05:07 PM

first of all i want to say happy new yrs to every one

i finaly was ebel to get ffmpg installed

What i am doing is making sure i can upload to a directory

PHP Code:


<?php 

function uploadtoDirectory(){
        
$uploaddir     =     '_files/';
            
$uploadfile =     $uploaddir basename($_FILES['file']['name']);
            
#$uploadfile =     $uploaddir . $_SESSION['UserID'] . date("YmdHis"). ".flv";  
            
$filename     =    basename($_FILES['file']['name']);
            
#$filename     =     $_SESSION['UserID'] . date("YmdHis"). ".flv";
            
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
            
#    echo "File is valid, and was successfully uploaded.\n";
            
} else {
            
#    echo "Possible file upload attack!\n";
            
}
            
#echo 'Here is some more debugging info:';
            #print_r($_FILES);
            #echo($uploadfile);
            
YorshffmpegWrapper->YorshffmpegWrapper($filename$ffmpeg_path "ffmpeg");
    }


    
$Submit $_POST['Submit'];
    echo(
$submit);
    if(
$Submit!=NULL){
         
uploadtoDirectory();
    }
?>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <table width="760" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>File Lookup </td>
      <td><input name="file" type="file" size="54" title="browse" /> </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
  </table>
</form>

but i am missing the part where i interface with FFMPG

i think there might me a problem with this line

YorshffmpegWrapper->YorshffmpegWrapper($filename, $ffmpeg_path = "ffmpeg");


All times are GMT. The time now is 04:14 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0