Images to Video making php script using FFMPEG

Hi Geeks,

This Article is based on

Images to Video making php script using FFMPEG

,  So I am providing you the complete steps to setup the FFMPEG in windows and linux environment.

FFMPEG is very good Extension for php where we can process many type of operations on audio and video like

Images to video convert ,images and audio to video ,Generate Thumbnail file from video. So I have tried it on my windows system .

Steps to install FFMPEG on windows or localhost:

Step 1: Download the Static build for windows from following page

there will be a button for download as in the screenshotdownload_ffmpeg


Step 2: Install prerequisite extensions

Before making any php script please make available the GD2 Library from your php.ini by just uncommenting following lines(removing semicolons from start of these lines


Step 3: Extract the downloaded zip and Inside Bin folder you will find ffmpeg.exe

Copy that file in your project folder in htdocs Eg: slideshow_project

Now we have all images which we need to convert into video are in any folder of this projects like Images:

there should be pattern of images name like pic1.jpg,pic2.jpg as so on…

Step 4: write and execute a command for images to video conversion, following is the command

above command is useful with creating a slideshow video where 2 second images will change and if you want to increase slide change duration for 3 second then you need to replace 1/1 to 1/3   from above command.

Now if you want to mix audio along with images then following command will work

Assuming you have my_recording.mp3 in audio folder of project

Installing FFMPEG in linux servers by following command

In that case you don’t need to follow  Step 1 and Step 3

If you are having any problem then please put your comments below , I would love to help you