Changes between Version 1 and Version 2 of PHP


Ignore:
Timestamp:
Sep 24, 2012, 10:46:43 PM (5 years ago)
Author:
burek
Comment:

minor change

Legend:

Unmodified
Added
Removed
Modified
  • PHP

    v1 v2  
    6262Running ffmpeg command-line tool in the background is easy when you know all these little things, mentioned above. Many people have decided to use a PHP's extension named [http://ffmpeg-php.sourceforge.net/ ffmpeg-php] that "adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files" (quoted from their web site). The fact that this extension is not developed since 2007 (and requires "ffmpeg-0.4.9_pre1 or higher") tells that you are restricted to using a very old version of ffmpeg, without possibility to update to the latest version, since a lot of changes have been made inside ffmpeg's code, which make ffmpeg-php incompatible with latest ffmpeg. 
    6363 
    64 The thing is, most of the people don't really need this kind of API to accomplish usual tasks like generating a thumbnail, resize a video, convert it to another format, etc (also getting some info about your media, using FFmpeg's command-line tool named "ffprobe"). All of that can also be achieved using FFmpeg's command-line tools. Also, using ffmpeg-php implies that you need some kind of real-time processing of your audio/video media, which is an overkill for web scripts in terms of execution time and bored people, waiting for the web page to complete the loading. 
     64The thing is, most of the people don't really need this kind of API to accomplish usual tasks like generating a thumbnail, resize a video, convert it to another format, etc. All of that can also be achieved using FFmpeg's command-line tools (ffmpeg and ffprobe mostly). Also, using ffmpeg-php implies that you need some kind of real-time processing of your audio/video media, which is an overkill for web scripts in terms of execution time and bored people, waiting for the web page to complete the loading. 
    6565 
    6666In the end, the choice is yours. If you really need to use ffmpeg-php, you'll be restricted to the old version of ffmpeg which doesn't have a lot of cool things and bug fixes implemented lately. Not to mention you will have a hard time getting the support for it. And if you decide to change your web application model a little bit and introduce all the changes, mentioned in this article, you'll be able to run the ffmpeg command-line tool from within your web scripts in no time, having all the benefits of using the latest (and greatest) version of ffmpeg.