[dundee] ffmpeg and PHP FTP functions

Robert McWilliam rmcw at allmail.net
Fri Jun 8 08:42:06 BST 2007


On Fri, 8 Jun 2007 01:51:30 +0000, "chris wyllie"
<cgwyllie at googlemail.com> said:
> So what I was wondering was, can someone suggest something that would
> perform those three jobs(convert, watermark, thumb) - preferably in
> one package - which could be installed? Or perhaps is there any way to
> create a 'stand-alone' ffmpeg program that could be hosted and called
> from our document root? I don't know about that, doubting the
> possibility and it probably breaches some term agreement anyway...

It is certainly possible from a technical stand point to put binaries
anywhere if you have enough permissions. It really depends on what and
how your hosting provider has restricted your access. Do you have shell
access to the server and is there a compiler etc. on it? Building ffmpeg
could get a bit complicated if you have to do it on your own machine as
there would be a laborious process of getting matching compiler, glibc,
etc. versions set up.

I'd say your best bet is asking the host nicely to put ffmpeg back and
promise to only run it with a high nice number.

> Secondly, the upload of very large video files(a few hundred megs)
> would have to be handled through a web interface and the brief
> stipulates using FTP. Would this be possible using PHP's inbuilt FTP
> functions or would it die before it got close? So far I've had
> problems getting even a simple PHP FTP upload of a text file to work
> although I don't think the problem is with the FTP login, it doesn't
> produce an error, rather that it's something to do with how I'm
> specifying the local file. If PHP is a viable option, could somebody
> kindly explain how I would be able to use a file input browse button
> to upload a file using the FTP connection? I tried givint the fput
> function the $_FILES's name variable as the local path but it doesn't
> like that. I don't understand, sorry for the ignorance.

Is it these FTP functions you are trying to use:
http://uk2.php.net/manual/en/ref.ftp.php

I couldn't find any mention of other FTP functions in the PHP docs
(or think of what they might be). Those functions are for accessing
an FTP server from your PHP scripts and it wouldn't be normal for
people wanting to upload to a site to have an FTP server running on
their computer.

> Again, if PHP FTP isn't a good option, can someone suggest any
> alternative for handling large uploads through the browser using FTP?

Is there a reason that you want to use FTP (other than it being in the
spec)? To use FTP to get things onto your server you would need the
users to be running an FTP client (or a server for you to connect to and
pull from but this is probably more complicated). It might be possible
to get an FTP client in Java (I'm not sure how much freedom the VM has
to send random data).

If you can give up on FTP there are details here of the more normal
approach to file uploads:

http://uk2.php.net/features.file-upload
________________________________________________________
Robert McWilliam     rmcw at allmail.net    www.ormiret.com

Everything should be made as simple as possible - but no simpler.
	-- Albert Einstein




More information about the dundee mailing list