Jump to content

Server-Side FFMPEG Conversion


Recommended Posts

I have a website i am working on that allows you to upload videos to it.

I use FFMPEG to convert the video to an flv, after upload, so the flash player can play it easily.

 

However i have a problem. i run a system command for ffmpeg using exec();. and it does work, but the page is loading for however long the conversion takes, as well as if the user closes the page, it will not fully convert.

 

What i want:

- once the video is uploaded, it sends a request to the server to do the conversion

- the conversion is done server-side and has nothing to do with the client-side (the user can close the browser window)

- code needs to be executed once the conversion is completed

 

now i have had a very hard time trying to figure this out, especially with the part where code is executed after the conversion is finished.

 

can anyone give me some ideas please?

Link to comment
Share on other sites

You could add it to a queue and loop through it with a cron job? By queue, I mean add a reference to the file and user in a table and put together a script that loops through them running the conversion process then remove them from your queue table.

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.