Let's say that I created a video with something like Camtasia and saved it as .avi
. How would I go about programmatically extracting a subclip let's say from minute 1:00 to 1:50. Is this something PHP can handle?
Edit: I don't mind using libraries, including ffmpeg
if PHP can't handle it alone. But I'm not looking forward to something through the command-line. Ideally it would through PHP.
P.S. I think some video capture programs like Camtasia may have their own codecs (I think Camtiasia calls it TechSmith). Not sure if开发者_运维百科 this makes any difference to the PHP script.
I highly discourage you from using PHP to do this directly. There are plenty of video manipulation tools that you can run from the command-line (ffmpeg, for instance) that would do it far more efficiently. If you want to get somewhat fancy (and want to dramatically increase your site's responsiveness), you could pop the job into a database and have a constantly-running service do the clip extraction, updating the database with the relevant information when it's done.
Just an idea, of course. There may be a module out there with PHP bindings that processes video, but you'd still have the problem of making the user wait (and occupying webserver resources) while the video is chopped up.
精彩评论