Jump to content

Question regarding server side processing


BoarderLine

Recommended Posts

Hi all.  I have a video upload page utilizing ffmpeg to convert to .flv format via ajax with progress bar.  Currently I am having an issue where the user uploads the video however the same upload script also converts to .flv format (exec("ffmpeg -i etc..")) after the file is uploaded.  This is working fine however if the user selects to move away from the page after the video is uploaded it is causing the users browser to lockup (and sometimes crash).  How can I make the exec() command to convert the video format strictly run server side and allow the user to move away from the page even though the conversion is still processing?  Thanks for any advise on how to handle this issue. 

Link to comment
Share on other sites

Page requests are 'stateless' meaning that any actions are only performed when the user requests them. The script starts and ends with each page request, and therefore the short answer is no you cannot easily have the server process a file while the user leaves the page. However, there are ways around this and in your case I would suggest setting up a cron job that runs a conversion script for uploaded files. That way the user can leave the page without affecting the conversion process (since the cron job is making the request).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.