build ffmpeg2theora for use in PHP?

Imaulle

[H]ard|Gawd
Joined
Jan 13, 2006
Messages
1,213
Hello,

Is it possible to build a custom ffmpeg or ffmpeg2theora binary so that I can upload it via ftp and have PHP execute the binary without having any other dependencies etc?

I'd just like to be able to upload my files via ftp, and then from PHP do something like:

Code:
passthru('ffmpeg2theora file.mp4 file.ogv');

and everything work without needing to install anything via the OS (Centos) ? I guess I'm really asking how do I configure/build the binary...

Thanks...
 
What's wrong with running "yum install ffmpeg"? That will install and configure ffmpeg and make it available for your use on the system.
 
wont be able to do that on all the servers the code will be hosted on.
 
wont be able to do that on all the servers the code will be hosted on.

Mind explaining further?

You can compile a statically-linked version of ffmpeg (try --enable-static --disable-shared when you configure), but installing it properly through the package manager is going to be much less hassle to manage. If this is on shared hosting or something like that you should never use exec() or passthrough() without some sort of scheduler or you risk crashing/overloading the server and getting kicked off your hosting. Beanstalkd can help you with that.
 
yeah this entire thing is a huge hassle I'm not really sure how to go about it anymore... Basically I'm creating a template that needs to allow users to upload mp4 videos, and then convert them to ogv for compatibility with html5 video element. the mp4 won't be too large (around 20 mb) so I don't think it will be too much strain on the servers... I'm starting to think it would be better to just find a JS library that can play any file though...
 
Back
Top