ok7758521ok

人往往因情入圣,因爱入魔,只有瞬时间的顿悟才是至高的境界。

李天华ID:ok7758521ok
34137次访问,排名3318好友6人,关注者10
开发工程师
ok7758521ok的文章
原创 86 篇
翻译 1 篇
转载 31 篇
评论 4 篇
ok7758521ok的公告
人往往因情入圣,因爱入魔,只有瞬时间的顿悟才是至高的境界。
最近评论
世界友好网:同一个世界,同一个理想
(世界友好网www.sjyh.org)
zhousyis66:楼上的请提供程序包
不要贴
heiyeluren:转载不说明出处,哼~~~~嘎嘎
Thaiki:现顶了
文章分类
收藏
    相册
    o m i
    桌面
    php相关链接
    PHPchina国内权威的PHP技术论坛
    php官方网站
    一本书计划
    喜悦国际,专业的phper论坛
    老韩,我的兄弟,HOHO为人yes,做事,yes,文采great!!
    超越php论坛
    黑夜路人(俺兄弟)开源世界
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 FFMPEG 和 FFMPEG-PHP 的安装收藏

    新一篇: SNMP(Simple Network Management Protocol) | 旧一篇: 使用apache模块rewrite_module

     
    FFMPEG 和 FFMPEG-PHP 的安装

    软件:

    FFmpeg
    官方主页: http://ffmpeg.sourceforge.net
    cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg

    FFmpeg-php
    官方主页 http://ffmpeg-php.sourceforge.net
    cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg-php login
    cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg-php co ffmpeg-php

    Lame
    下载地址
    http://www.linuxpackages.net/sea ... ;name=lame&ver=

    Apache v2.0.54
    官方主页: http://www.apache.org
    http://www.apache.org/dist/httpd/httpd-2.0.54.tar.gz

    PHP v4.3.11
    官方主页: http://www.php.net
    http://cn.php.net/distributions/php-5.0.4.tar.gz

    GD Library v2.0.33
    官方主页: http://www.boutell.com/gd/
    http://www.boutell.com/gd/http/gd-2.0.33.tar.gz

    FreeType v2.1.10
    官方主页: http://www.freetype.org
    http://savannah.nongnu.org/downl ... etype-2.1.10.tar.gz

    Jpeg v6b
    官方主页: http://www.ijg.org
    http://www.ijg.org/files/jpegsrc.v6b.tar.gz

    LibPNG v1.2.8
    官方主页: http://sourceforge.net/project/showfiles.php?group_id=5624
    http://voxel.dl.sourceforge.net/ ... 1.2.8-config.tar.gz


    zlib v1.2.2
    官方主页: http://www.gzip.org/zlib/
    http://www.zlib.net/zlib-1.2.2.tar.gz






    开始安装:

    1
    、解压缩,把所有源码压缩包放在一个目录中,解压缩所有 .tar.gz .tar.bz2压缩包
    for i in `ls *.gz`;do tar zxvf $i; done;
    for i in `ls *.bz2`;do tar jxvf $i; done;


    2
    、安装
    ##### lame #####

    lame-CVS20050706-i686-1jto.tgz
    解压后
    复制lame./usr/include ./usr/bin ./usr/lib 三个文件夹到服务器对应地方


    ##### ffmpeg #####

    cd ffmpeg

    ./configure --prefix=/usr/local --enable-memalign-hack --enable-mp3lame --enable-shared
    make
    make install

    cd..

    cp -r /usr/local/lib/libav*.so /usr/lib

    注:
    --prefix=/usr/local
    不得修改,否则ffmpeg-php安装不上
    运行/usr/local/bin/ffmpeg –v测试是否安装成功


    ##### Apache2 #####

    cd httpd-2.0.54

    ./configure --enable-so --prefix=/server/httpd --with-config-file-path=/server/httpd/conf
    make
    make install

    cd ..

    注:
    运行/server/httpd/bin/httpd –k start http://192.168.1.xxx测试是否安装成功
    测试完后要关闭/server/httpd/bin/httpd –k stop


    ##### FreeType #####

    cd freetype-2.1.10

    ./configure --prefix=/usr/local/freetype
    make
    make install

    cd ..


    ##### LibPNG #####

    cd libpng-1.2.8

    ./configure --prefix=/usr/local/libpng --enable-shared --enable-static
    make test
    make install

    cd ..


    ##### Jpeg #####

    cd jpeg-6b

    mkdir /usr/local/jpeg
    mkdir /usr/local/jpeg/bin
    mkdir /usr/local/jpeg/lib
    mkdir /usr/local/jpeg/include
    mkdir /usr/local/jpeg/man
    mkdir /usr/local/jpeg/man/man1

    ./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
    make
    make install

    cd ..


    ##### zlib #####

    cd zlib-1.2.2

    ./configure
    make
    make install

    cd ..


    ##### GD Library #####

    cd gd-2.0.33

    ./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype --with-png --with-zlib

    make
    make install

    cd ..


    ##### ffmpeg-php #####
    按照官方的说法,可以在装php前安装ffmpeg-php
    但是我没成功
    运行不了phpize
    因此此步在装了php后再进行
    有点傻


    ##### PHP #####

    cd php-4.3.11

    ./configure --prefix=/server/php --with-apxs2=/server/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-config-file-path=/server/httpd/conf
    make
    make install

    cp php.ini-dist /server/httpd/conf/php.ini

    cd ..


    ##### ffmpeg-php #####
    mv ffmpeg-php /path/to/php_sources/ext/ffmpeg
    cd /path/to/php_sources
    autoconf
    ./configure --prefix=/server/php --with-apxs2=/server/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-config-file-path=/server/httpd/conf --with-ffmpeg=/user/local/include
    make
    make install


    安装完毕
    运行 /server/httpd/bin/httpd –k start
    测试
    <?
    phpinfo();
    ?>
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    []如何使PHP支持ffmpegffmpeg-php模块的安装)
    下载ffmpeg安装包地址: http://ffmpeg.mplayerhq.hu/download.html

    使用该命令下载ffmpeg: svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

    ./configure --enable-share --prefix=/usr

    make clean && make && make install

    下载ffmpeg-php安装包地址: http://ffmpeg-php.sourceforge.net/

    tar -xvf ffmpeg-php-0.4.9.tar

    mv ffmpeg-php-0.4.9 php-4.3.6/ext/ffmpeg

    cd php-4.3.6/ext/ffmpeg

    phpize

    cd /opt/software/php-4.3.6

    rm configure

    ./buildconf –force

    第二次编译php,让它支持ffmpeg-php

    ./configure --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-freetype --without-gdbm --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-png --enable-ftp --enable-sockets -with-xml --with-dom --with-zlib --enable-track-vars --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs
    --with-ffmpeg=/user/local/include

    make && make install

    红字为需要注意的地方,路径或参数不同会造成无法加载ffmpeg.so的错误.
    错误提示如:


    Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini

    红字为需要注意的地方,路径或参数不同会造成无法加载ffmpeg.so的错误.
    错误提示如:
    Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini
     
     

    发表于 @ 2007年06月29日 21:52:00|评论(loading...)|编辑

    新一篇: SNMP(Simple Network Management Protocol) | 旧一篇: 使用apache模块rewrite_module

    评论:没有评论。

    发表评论  


    登录
    Csdn Blog version 3.1a
    Copyright © ok7758521ok