First you have to download all the required files which can be found here

 

FFMPEG
click to download
(download the zip,rar or 7z extension file)

MENCODER
click here to download
(download the zip,rar or 7z extension file)

CODECS FOR MPLAYER
click here to download
(download the zip,rar or 7z extension file)

PHP-FFMPEG
click here to download
(download the zip,rar or 7z extension file. this will not work on php 5.3)

extract all the files you have download in separate folders in a temp directory.

1) copy ffmpeg to c:\ffmpeg (you can choose any path)
2) copy mencoder to c:\mencoder (you can choose any path)
3) copy mplayer codecs in c:\mencoder\codecs (all the codecs should be in that codecs folder of mencoder)
4) copy all php-ffmpeg to windows\system32 and php\ext (extension folder)
5) open php.ini and add extension=php_ffmpeg.dll (to locate php.ini file loaded make a temp php file and put run that file in the webserver and look for php.ini file)