I have scenario for creating a video files using diff. assets like images, audio file.
What I want to do is, Find audio files from the particular folder and set it as background music, and fetch images from particular folder and show those images one by one.
So basically I have images and audio files and I want create a video file using those assets using PHP.
Can any one please suggest the start up point for this? Have done image capture from video and converting the video using Ffmpeg so I have think of Ffmpeg but, I think it will not allow to create a video.
Phil's solution is the correct approach. Work out what needs to be done by documenting yourself on ffmpeg (it's messy, and I can't blame him for not wanting to do your homework), and then call it from within php.
Cursory googling reveals php wrappers (e.g. http://ffmpeg-php.sourceforge.net/). If none are recent/complete enough, stick to issuing the needed shell commands from php.
Under Ubuntu you need PHP5, ffmpeg and access to ffmpeg binary, this can be easy achieved with:
I'm using this php function to generate an mp4 video from one gif image and one mp3 file, both source image and output video files are 720x576 pixels:
example use:
ffmpeg will allow you to create videos from still images.
For example, to create a video with a 10fps frame rate, from images 001.jpg .... 999.jpg:
You can mux streams (audio and video) like (add relevant codec options for bitrate, etc)
I'm not going to go into more detail, as ffmpeg is a pain (args change in incompatible ways between versions, and depending on how it was compiled), and finding a rate/compression/resolution setting that is good for you is trial-and-error.
Or