PHP script for convert video format to flv(flash) format file

Convert any video format to .flv format using php script

Developers often need to convert/encode files from any video format to FLV (flash format) using FFMPEG & PHP.


As this is the most commonly requested feature that is asked of web developers is to convert existing video’s to another format. As flash has found its home in providing players, it has become most common to convert video’s into flash video’s. The ffmpeg library can convert most any existing video format, to any other format.


Convert video file to flv in php


In PHP, the ffmpeg library is typically called using the exec() or system() functions. This provides the fastest method of video conversion without reading the whole video, or multiple video’s into memory.


FFMPEG is a PHP extension that is used to convert audio, video and images from one format to another one and also supports grabbing and encoding in real time from a TV card.


For execution of conversion script successfully, you must have ffmpeg extension loaded in your php. You can check this by the below code.




echo ‘Loaded ffmpeg’;
echo ‘Failed loading ffmpeg’;





You can also check this by viewing phpinfo();

Download the full (video file format conversion) code by the link below.


3 thoughts on “PHP script for convert video format to flv(flash) format file”

  1. Dont waste the time of programer.

    Your code is not working.

    Its show wrong result. :@@@

    1. Abhijeet.. Can you let me know whats the issues you are facing with current code?
      It will help to update myself and thousands of guys also who are visiting my site and using the code.

Comments are closed.