oh
in my script, I run the exec () function to make a movie file with ffmpeg.
the problem is that ffmpeg can only work once on the server,
if 2 people are online on the server and the first one is already running ffmpeg, I want the second to wait for the first end of the process
how to encode it?
Thank you
Set the lock somewhere.
ffmpeg, , . , ffmpeg, , "1", , 5 10 . , , "0". , , script , "0".
ffmpeg .
. , .
exec
, ( linux box ), :
, . java, . github.
You can use an asynchronous queue. Each new request is added to the queue as a message. Your process reads one message at a time and processes the conversion request.
For the PHP queue, you can try Dropr or similar.
Source: https://habr.com/ru/post/1736750/More articles:Will thread.join () block other clients? - multithreadingПоведение с использованием значений примитивных типов данных вне диапазона и макросов C99 PRI * - cWhat is the relationship between programming and math? - mathDjango: Band? - pythonDjango GROUP BY field value - pythonHow to execute GROUP BY ... COUNT or SUM in Django ORM? - pythonDjango Model Group - pythonRegex breaks into overlapping lines - javalink to the application in the iTunes store - iphoneHow to use ORM for equivalent SQL query, group and join? - pythonAll Articles