Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Login to participate.

Go Back   TechSpot OpenBoards > OS & Software > Misc. Software & Utilities

Ffmpeg & Php

Reply
Bookmark / Share this page
Thread Tools
  #1  
Old 06-18-2007
Newcomer, in training
 
Location: Bolton, UK
Member since: Feb 2005, 32 posts
Ffmpeg & Php

Ho everyone!

I've found little documentation that'll help me out on that there interweb, so I hope someone here is in the know!

I'm working on a Youtube type system for a local school, so far everything's going fine, but I want it to automatically convert uploaded video files of various types to flv. Currently I have it set to only allow upload of flv files.

FFMPEG, a command line video conversion tool seems to be the solution, unless someone can tell me of a better one.
documentation is here: http://ffmpeg.mplayerhq.hu/
SVNs are here: http://svn.mplayerhq.hu/ffmpeg/trunk/
Windows compiled downloads here : http://ffdshow.faireal.net/mirror/ffmpeg/ (this is what I'm using)

The propram itself works very well, but trying to get it to work on an external server is something quite new to me.

Here are a couple of brief tutorials I've looked at:
http://www.onlamp.com/pub/a/php/2007...hp.html?page=2
http://vexxhost.com/blog/2007/05/20/...ng-ffmpeg-php/
They're brief in that they just provide and explain (to some extent) the code needed but don't talk about files that should be used.

I get no errors and no results (converted files) so I struggle to figure out where I'm going wrong. That is if it's even possible to do since I'm developing on my University's web space; would it be likely that the server restricts executing programs.

I believe that the servers are Linux so would I need a different version to the Windows compiled one? I'm not sure if by Windows compiled it means compiled under Windows or specifically FOR Windows.

Well thanks for reading! Hope someone can help!
Reply With Quote
  #2  
Old 06-18-2007
Mictlantecuhtli's Avatar
TS Special Forces
 
Location: Finland
Member since: Feb 2002, 4,749 posts
System specs
For a Linux server you'd need Linux binaries of ffmpeg (& PHP).

You could check if exec() is disabled with a simple PHP script (unless phpinfo() is disabled too):
<?php phpinfo(); ?>

If phpinfo() is disabled as well, you can see the same (sort of) output from command line with "php -i".

It's also possible (but a bit odd, in my opinion) that PHP error logging is disabled completely on that server, so if something fails, you wouldn't see it.

Also note that servers have a maximum file size for uploading data (in $_POST). The default varies, but the parameters are post_max_size and upload_max_filesize in php.ini.
Reply With Quote
You can remove this banner by registering, join the TS Community for free.
  #3  
Old 06-18-2007
jobeard's Avatar
TechSpot Evangelist
 
Location: Southern Calif.
Member since: Apr 2005, 6,556 posts
also make sure you understand where the converted files will be placed on the
server. you make need to relocate them to your desired location before the
server returns results to the user.
Reply With Quote
Reply
Thread Tools

Forum Jump


All times are GMT -4. The time now is 10:55 AM.