Images to Video?

Is it possible to convert images to videos? if so please give me rough idea how to achieve it.

Everyone, i successfully installed ffmpeg binaries on shared hostgator account. I tested video conversion also. Everything working fine. Here is the link to download binaries.

http://video-conversion-blog.com/static-ffmpeg-binaries/binary-downloads

I am sure you can accomplish this through imagemagick. (a great tool!) but you will need this installed on the server/computer that you are executing the script.

convert -quiet -delay 1 plane.avi +map plane_cgc.gif
http://www.imagemagick.org/Usage/video/

any code sample plz…

Yes it is possible but its not just PHP, you need to have ffmpeg installed on your server, you will just execute the console command from your PHP code and ffmpeg will do the trick.

You may want to check out this site: http://electron.mit.edu/~gsteele/ffmpeg/

i have a social networking site. i m planning to add feature for users to create videos using images.

I am not aware of a PHP class able to do this… i’m not even sure i’d ever WANT PHP generating a video file dynamically. What are you trying to accomplish?

sorry, what i mean is to convert set of images to a video using php.

An image is a single frame; a video is several dozen frames a second. What are you trying to do?

If you are interested in using the ffmpeg to create the video, you need to install it first on your machine, and then you can do something like this in your php code

<?php exec('ffmpeg -r 10 -b 1800 -i %03d.jpg test1800.mp4'); ?>

what the command inside the exec function does is to create an mp4 video (it could be other format) from a series of jpeg images (001.jpg, 002.jpg … and so on) so basically this is outside php but you can execute the ffmpeg program from your php code

To install ffmpeg on Windows, check this link: http://www.ehow.com/how_4716678_install-ffmpeg-windows.html

To install ffmpeg on Linux, just use “apt-get install ffmpeg” or “yum install ffmpeg”

any binaries for cent os? i m using hostgator shared hosting.

I think you’ll need to look into some dedicated or virtual hosting. Generating videos is processor-intensive, and I doubt HostGator will allow you to do that.

any suggestions?