Results 1 to 2 of 2

Thread: How to install FFMPEG-PHP Extension

  1. #1
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default How to install FFMPEG-PHP Extension

    FFmpeg-php is a very good extension and wrapper for PHP which can pull useful information about video through API interface. In order to install it you will need to download the source file and then compile and install the extension in your server.

    You can download the source tarball :

    ffmpeg-php

    Code:
    wget {download link to ffmpeg-latest_release.tbz2}
    Code:
    tar -xjf ffmpeg-latest_release.tbz2
    Code:
    cd ffmpeg-latest_release
    phpize
    ./configure
    make
    make install
    Common Errors

    1. If you get command not found error for phpize, then you will need to do
    Code:
    yum install php-devel
    2. If you get error like "ffmpeg headers not found" while configuring the source.

    configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option

    then it means you have not installed ffmpeg-devel packages.

    To Fix: Just install ffmpeg-devel using

    Code:
    yum install ffmpeg-devel
    3. If you get an error like shared libraries not found problem and the program halts in the middle, then you must specify the ffmpeg installed path explicitly to the ./configure.

    configure: error: ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option

    To Fix:

    1. First find out the ffmpeg path with ffmpeg --help command. The prefix default path should be like /usr/local/cpffmpeg
    2. Configure the FFmpeg-php with --with-ffmpeg option

    Code:
    ./configure --with-ffmpeg=/usr/local/cpffmpeg
    That should resolve the problem!


    Editing PHP.INI

    Once you have done that without any problems then you will see the php extension file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so and you will need mention that extension in php.ini file

    Code:
    nano -w /usr/local/lib/php.ini
    Put the below two lines at the end of the php.ini file

    Code:
    [ffmpeg]
    extension=ffmpeg.so
    Then restart the server service httpd restart

    To check whether ffmpeg enabled with php, point your browser to test.php file. It should show the confirmation of installed ffmpeg php extension

    phpinfo.php

    Code:
    <?
    phpinfo()
    ?>
    You should see something like:
    ffmpeg
    ffmpeg-php version 0.6.0-svn
    ffmpeg-php built on Jun 1 2010 22:55:19
    ffmpeg-php gd support enabled
    ffmpeg libavcodec version Lavc52.20.0
    ffmpeg libavformat version Lavf52.31.0
    ffmpeg swscaler version SwS0.7.1

    Directive Local Value Master Value
    ffmpeg.allow_persistent 0 0
    ffmpeg.show_warnings 0 0
    If any case the ffmpeg does not show in the phpinfo() test make sure that php.ini path to ffmpeg.so is correct.

    Easy huh! Good luck!

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  2. #2
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    If you are a Dolphin user, and you want to use System FFMPEG, you will need to search your files for ffmpeg.exe , and do some editing (remove the .exe) and fix the paths, so the system FFMPEG will be used.

    Just a heads up on that.... I did this mod for someone, and posted about it here:
    http://www.modmysite.com/boonex-dolp...ancements.html

    but I have not gotten around to releasing it (been busy with other things).

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to install system FFMPEG
    By Smoge in forum Security / Server Administration
    Replies: 0
    Last Post: 06-01-2010, 09:50 PM
  2. Destinations extension
    By seven in forum Boonex Dolphin 7
    Replies: 0
    Last Post: 05-14-2010, 03:15 PM
  3. Any ffmpeg alternatives?
    By webster76 in forum General Issues, Comments, Questions
    Replies: 1
    Last Post: 11-26-2007, 03:33 PM
  4. BSD set FFMPEG
    By merun in forum Dolphin General Discussion v6.00 and above
    Replies: 0
    Last Post: 11-06-2007, 03:58 PM
  5. ffmpeg
    By jackparr in forum General Issues, Comments, Questions
    Replies: 0
    Last Post: 10-20-2007, 09:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •