I am trying to encode many videos on my server, but FFMPEG is resource intensive so I would like to setup some form of queueing. The rest of my site is using PHP, but I don’t know if I should use PHP, Python, BASH, etc. I was thinking I might need to use CRON but I am not really sure exactly how to tell ffmpeg to start a new task (from the list) after it finishes the one before it.
Share
We will use FIFO (First In First Out) in a bash script. The script needs to run before
cron(or any script, any terminal that call theFIFO) to sendffmpegcommands to this script :Now (when the script is running), we can send any
ffmpegcommands to the named pipe by using the syntax :And with error checking:
They will be queuing automatically.