I want the users to only upload a video, then write a code that splits this video into user-defined segments, then convert those segments to .flv and .mp4 videos.
Is there any way I can do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think there is any way to do this directly within PHP. Even if there was, it wouldn’t be the most sensible thing to do.
Your best bet is to hook your web application up to a command line program, such as ffmpeg, and call your system commands from the PHP script.
I’d approach this by building a job queue with your web application adding jobs to the queue and dedicated worker processes pulling from the queue, performing the task and recording the completion of the task somewhere else.
This means that your users won’t have to wait for the video to be re-encoded in real time.