Answer the question
In order to leave comments, you need to log in
Send command to build video in ffmpeg from website?
There is a site where a person can choose two videos from the list and combine them into one. A file is created with the paths to the video, and then you need to run the command, suppose: ffmpeg -f concat -i video -c copy
final.mpeg and automatically execute the script?
Answer the question
In order to leave comments, you need to log in
In my opinion, you can execute ffmpeg with the exec command, this command launches a third-party program (in your case, ffmpeg)
Post in php script and
php.net/manual/ru/function.shell-exec.php
not?
It is not worth launching from the site, because the browser will wait for the script to complete and the request will fail with a 504 error
. I implemented it like this:
1) web adds information about the task to the database.
2) a separate script in the eternal while (true) {
sleep (check interval);
checks whether there are tasks in the database and executes them.
after execution adds information about the readiness or problems with the video in the database.
}
to run third-party programs, take functions from here
, I also collected all the logs using the output redirection operators >>,1>> ,2>>
to control the output files, I monitored the fallen off workers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question