A
A
Alexander2014-05-21 20:48:11
PHP
Alexander, 2014-05-21 20:48:11

What is the best way to decode the video after uploading to the site?

There is a site, ffmpeg, ffmpeg-php is installed on the server.
Users upload videos to the site (in various popular formats), and after any action, it is laid out for public viewing.
But as you know, quite a few formats are normally reproduced in the browser.
In this case, for example, let it be mp4.
Now I have written some kind of conversion that starts immediately after loading and naturally loads the processor.
But in the end it converts.
How can I run this process in the "background" so that the user downloads the video, he was told that it was successfully uploaded and let him wait.
Except the crown.
I apologize if the question is stupid, but I'm not strong in the video, and even more so in its conversion.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stepan, 2014-05-21
@L3n1n

Why doesn't cron work for you? And why invent bicycles?
Once a minute, we check if there are new unconverted files, if there are, we add them to the queue..

A
Alexander Kubintsev, 2014-05-22
@akubintsev

Your best bet in such cases is to use a queue server such as RabbitMQ or Gearman.

A
Alexander Zelenin, 2014-05-21
@zelenin

These issues are resolved by the crown. everything alternative is just an alternative to the crown.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question