0

我的访客将图片上传到服务器。我的网站为这些上传文件提供了一个连续的名称(例如 0001.jpg、0002.jpg、0003.jpg...)我想要做的是,根据用户的要求,我想在服务器端并将此视频发送到客户端。我怎样才能做到这一点?

4

1 回答 1

4

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.

于 2012-12-27T10:02:42.970 回答