问题
My visitors upload pictures to server. My website gives a sequencial name for these uploads (e.g. 0001.jpg, 0002.jpg, 0003.jpg...) What I want to do is, on request from user, I want to create a movie (preferably not flash) on server-side and send this video to client. How can I do this?
回答1:
You have to use ffmpeg for creatiion video on serverside. It is very flexible and really powerful tool for working with video, audio and images.
for example, to convert images image1.jpg, image2.jpg,.. into video use this command
ffmpeg -f image2 -i image%d.jpg video.mpg
To execute this command from php use exec or system function.
PS. There are other command line utilites can be used to create video from images ogg-slideshow and dvd-slideshow. They very convenient if you want to add some predefined transition effects or titles.
来源:https://stackoverflow.com/questions/14052540/convert-image-to-video-on-server-side-by-php