Guys & Gals.. Am wondering if anyone has any code to generate Movies ( avi,mov,mpeg) on the fly from images & content etc ? This is more out of curiousity more than anything... Nearly everything is possible with PHP Cheers!
You mean like take a bunch of images and merge them together to make a movie? I don't think it's possible in php, atleast not without a 3rd party app playing a role.
I've used ffmpeg quite a few times in the past but never for what you want. I'm not sure if it's possible or not using ffmpeg. I used ffmpeg to convert wmv to flv. I've also used it to pull images from a video and use as a thumbnail.
I've never used ffmpeg but it's a command line tool which makes me think there's a good possibility of being able to do what you want through PHP, as long as ffmpeg or similar program is installed. If it is possible you'll be using one of the program execution functions.
This is possible with ffmpeg, but you have to name the files sequentially (001.jpg, 002.jpg, 003.jpg, etc.) Then you can do it with the following command: ffmpeg -r framerate -b bitrate -i %03d.jpg movie.avi Of course you can use png, etc. images instead of jpegs, and you can output in formats other than avi.
Try mencoder, it can do it. exec('mencoder "mf://*.jpg" -mf fps=30000/1001 -o test.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800'); PHP:
You need to install mencoder on your server first, would require atleast a VPS or dedicated server. Hop on to your shell, then issue the following commands, which ever works for your distribution. sudo apt-get update && sudo apt-get install mencoder apt-get update && apt-get install mencoder yum update && yum install mencoder rpm -i mencoder pacman -Sy mencoder A complete mencoder manual can be found at http://linux.die.net/man/1/mencoder You can then use mencoder via exec(); from php.