Thanks very much for the prompt replies.<br><br>Is there not a problem handling file uploads of such large files through normal methods? I thought there was a max file size restriction on uploads and it would time out/reach this limit before it was done uploading a few hundred megs... Or is this not the case? Is it possible to upload such a large file in the regular way?
<br><br>I don't think we can get SSH access, their tech support people will install things for us if they meet some sort of requirements they have. As I said, at the moment they won't put ffmpeg on for anyone because of the strain it causes on the server.
<br><br>"A standalone ffmpeg will do the job. You can either bundle it into one<br>big static binary (about 7MB depending on what you include) or you can<br>keep some of it in shared libraries, allowing you to link other things
<br>like PHP plugins against it. I can show you how to do that."<br><br>How would that be done? I'm not sure we could get past notice of their admins using it. We have the ability to schedule jobs, I was thinking that a PHP file could be used to run a batch shell script for converting the video or even call the shell file directly maybe once a day or so.
<br><br>Or if encoding was done after the upload, how can you trigger it and as you say close the connection before it starts? if you redirect before calling the encoding, won' it not be run at all?<br><br>Thanks for the offer of your ruby extenstion however I haven't worked with ruby so I doubt I could get it working just now.
<br><br>Thanks again for replying,<br><br>Chris<br><br><div><span class="gmail_quote">On 08/06/07, <b class="gmail_sendername">James Le Cuirot</b> <<a href="mailto:chewi@aura-online.co.uk">chewi@aura-online.co.uk</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Fri, 8 Jun 2007 01:51:30 +0000<br>"chris wyllie" <<a href="mailto:cgwyllie@googlemail.com">
cgwyllie@googlemail.com</a>> wrote:<br>><br>> It's kinda like a youtube clone in that I need to upload large videos,<br>> create previews of them by converting, watermark them to keep<br>> copyright and create a thumbnail.
<br>><br>> ffmpeg was suggested and evidently it's a widely used option for this<br>> kind of task. The problem is that the hosting plan which has been<br>> bought already(out of my control) have pulled the plug on ffmpeg
<br>> support as it's a shared environment and was causing resource issues.<br><br>A standalone ffmpeg will do the job. You can either bundle it into one<br>big static binary (about 7MB depending on what you include) or you can
<br>keep some of it in shared libraries, allowing you to link other things<br>like PHP plugins against it. I can show you how to do that.<br><br>But whatever you use will consume a lot of juice and it's extremely<br>likely that your host will notice and will take action against it. It's
<br>easy enough to execute ffmpeg remotely through SSH in a batch fashion<br>but is that really what you want to do? The input file would need to be<br>sent to that other server. The output file would be created on that<br>
other server. You might as well just send the whole request to the<br>other server in the first place. What you do with the output file then<br>is up to you. Maybe you could host it from the other server or you could<br>have it sent to the main server afterwards.
<br><br>One of the other problems is what you send back to the browser during<br>the request. If you just let the encoding run first, the browser will<br>probably time out by the time it's finished. You need to send back a
<br>response first and close the connection before you start the encoding.<br>Alternatively, you can try and set up some kind of daemon process to<br>handle the encoding separately. That's what we're doing on our<br>
Rails-based project.<br><br>I needed to get some information from the input file before starting<br>the encoding so I wrote a Ruby extension called FFruby. It gives you<br>easy access to some of a file's properties through FFrubyFile,
<br>FFrubyAudioStream and FFrubyVideoStream objects. It works through<br>ffmpeg's libraries, libavformat and libavcodec, so it could potentially<br>handle encoding as well but that would require quite a bit more work.
<br>If you're interested... <a href="http://rubyforge.org/projects/ffruby">http://rubyforge.org/projects/ffruby</a><br><br>James<br><br>_______________________________________________<br>dundee GNU/Linux Users Group mailing list
<br><a href="mailto:dundee@lists.lug.org.uk">dundee@lists.lug.org.uk</a> <a href="http://dundee.lug.org.uk">http://dundee.lug.org.uk</a><br><a href="https://mailman.lug.org.uk/mailman/listinfo/dundee">https://mailman.lug.org.uk/mailman/listinfo/dundee
</a><br>Chat on IRC, #tlug on <a href="http://dundee.lug.org.uk">dundee.lug.org.uk</a><br></blockquote></div><br>