Install PHP extension ffmpeg-php

Source: Internet
Author: User
Tags install php



First download the expansion pack



Extension: http://nchc.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2



Enter the ffmpeg-php directory to compile the extension



/usr/local/php/bin/phpize



./configure--with-php-config=/usr/local/php/bin/php-config



Make error



Error condition


Make: * * [Ffmpeg-php.lo] Error 1

Solve:

# MV Ffmpeg-php.lot Ffmpeg-php.lo


Make: * * [Ffmpeg_movie.lo] Error 1

Solve:

# MV Ffmpeg_movie.lot Ffmpeg_movie.lo


Make: * * [Ffmpeg_frame.lo] Error 1

Solve:

# MV Ffmpeg_frame.lot Ffmpeg_frame.lo


Make: * * [Ffmpeg_errorhandler.lo] Error 1

Solve:

# MV Ffmpeg_errorhandler.lot Ffmpeg_errorhandler.lo


Make: * * [Ffmpeg_tools.lo] Error 1

Solve:

# MV Ffmpeg_tools.lot Ffmpeg_tools.lo


As follows:



Error:



Make: * * * [Ffmpeg_movie.lo] Error 1



Solve:



Vim ffmpeg_movie.c



Row 311:list_entry *le; instead of Zend_rsrc_list_entry *le;



Row 346:list_entry New_le; changed to Zend_rsrc_list_entry New_le;



Row:hashkey_length+1, (void *) &new_le, sizeof (list_entry), changed to Hashkey_length+1, (void *) &new_le,sizeof ( Zend_rsrc_list_entry),



After the change, recompile the PHP ffmpeg extension






Run FFmpeg error as follows:
Ffmpeg:error while loading shared libraries:libavdevice.so.52:cannot open Shared object file:no such file or directory
Solve:
Vim/etc/ld.so.conf
Add a line:/usr/local/lib
Then execute Ldconfig



Add extension=ffmpeg.so to PHP.ini






Restart PHP. In Phpinfo (), see if there is any ffmpeg information.



Some words will be OK



or perform



/usr/local/php/bin/php-i |grep FFmpeg



If there's an output, OK.



Workaround, and then recompile the installation ffmpeg-php



Install PHP extension ffmpeg-php


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.