Blog

How to install ffmpeg on Windows with PhP

This post will outline how to download and install the ffmpeg video decoding and conversion software, and install the php extensions required to easily utilize it from a web site.  These instructions are for windows users.

For you linux users out there, sorry… but this ain’t no apt-get install ffmpeg :P

ffmpeg is used for lots of reasons such as:

  • converting uploaded video to flv format
  • converting uploaded video to any other format
  • get thumbnails from video
  • remove or edit audio on a video clip
  • enhance or reduce video quality

Requirements:

  • You must have PHP version 5.2.6 or above installed
  • Windows 2003/XP/Vista/7

Installation Steps:

  1. Download the latest build of FFmpeg for windows
    1. http://tripp.arrozcru.org/
    2. Copy it into an easy folder to access (ex. c:ffmpeg)
    3. Test to make it works
      1. Download a sample video
      2. Run the following command to test video conversion

i.      ffmpeg.exe c:ffmpegtest_input_video.mp4 c:ffmpegtest_output_video.flv

  1. You can now convert videos by executing a command via PhP or any other language
    1. $result = exec(‘c:\ffmpeg\ffmpeg.exe -i c:\ffmpeg\test_zone\input.mp4 c:\ffmpeg\test_zone\test_output_video.flv’);
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • HackerNews
  • LinkedIn
  • Ping.fm
  • Reddit
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
This entry was posted in Tech Help and tagged , , , , , . Bookmark the permalink.

2 Responses to How to install ffmpeg on Windows with PhP

  1. Kaedon says:

    Whoa, things just got a whole lot esaeir.

  2. Lyza says:

    This forum ndeeed shaking up and you’ve just done that. Great post!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>