convert image to video on server-side by php [closed]

好久不见. 提交于 2019-12-12 01:33:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!