I've been learning PHP and MySQL and have been thinking about exercises to help me learn the language better. I've used ffmpeg for a few years now to process video files and thought I could probably work out a way to manage this from the web. I've read up on using ffmpeg from php but I'm wondering how to manage the files on the backend. Algorithmically speaking how does one make it so that a users file stays connected to their account during the processing of the file in the queue? Ideally I would like to have it where people in my small department could submit jobs to it in a queue.
- Would you keep track of the files based on a generated file name and store that in the database?
- If this is the case how does one keep track of whether the file processed correctly?
- What's the best way to do process checking? I've googled around and I haven't found a clear explanation on how one keeps track of the ffmpeg process for reporting purposes.
- Is it best to manage the queuing of encodes from a cron job or is there a better way?