I need to take any video file uploaded by the user, convert it to flv or webM, and then display it to the user. Now, after some research, I have come to the conclusion that I should use ffmpeg for conversion, but I'm not sure how to care for the entire pipeline. Namely,
- Get the downloaded file by the user.
- Does the django backend somehow send the file for processing?
- After processing is complete, delete the original file downloaded by the user and replace it with the converted file.
I just know about these broad steps, but how about how to connect each step in an optimized way? for example, how to start the ffmpeg system call on the CLI from python and continue to wait for the conversion process to complete. Also, how to update the database to now point to a new converted file and delete the old one. How to inform the user (live) that the file has been converted, in the conversion, etc., As a progress bar?
I know this is kind of a comprehensive question, but help with any / all bits will be great!
source share