ffmpeg2.1 install centos5.1
来源:互联网 发布:徐州网络 编辑:程序博客网 时间:2024/06/11 22:17
在linux 上安装ffmpeg 简直就是一种折磨,它会把你搞的精皮历经,版本高了不行,最关键有时候你还装不上,自己vm安装半天时间,服务器安装用了两天。不说了
1、先把git 工具安装上 ,网上找
2、git clone git://git.videolan.org/ffmpeg.git ffmpeg 源码down 下来
3、ffmpeg 所需包(如果有的链接不能用了,自己在找找)
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
wget http://downloads.sourceforge.net/project/libraw1394/libraw1394/libraw1394-2.0.5.tar.gz
wget http://downloads.sourceforge.net/project/libdc1394/libdc1394-2/2.1.2/libdc1394-2.1.2.tar.gz
wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.4.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
yum install yasm nasm
注:libvpx1.0.0这个包要安装低版本的,高版本ffmpeg编译不通过(希望你不要挑战它,如果你挑战成功告诉我下怎么搞定@@)
tar -zxf lame-3.98.4.tar.gz
tar -zxf xvidcore-1.2.2.tar.gz
tar -jxf ffmpeg-php-0.6.0.tbz2
tar -zxf a52dec-0.7.4.tar.gz
tar -zxf faad2-2.7.tar.gz
tar -zxf faac-1.28.tar.gz
tar -zxf libraw1394-2.0.5.tar.gz
tar -zxf libdc1394-2.1.2.tar.gz
tar -zxf opencore-amr-0.1.2.tar.gz
tar -jxf essential-20071007.tar.bz2
tar -jxf libtheora-1.1.1.tar.bz2
tar -zxf libogg-1.1.4.tar.gz
tar -zxf libvorbis-1.2.3.tar.gz
mkdir /usr/local/lib/codecs/
cp ./essential-20071007/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
##############
# For 64 Bit Systems ALSO do this:
#
mkdir /usr/local/lib64/codecs/
cp ./essential-20071007/* /usr/local/lib64/codecs/
chmod -R 755 /usr/local/lib64/codecs/
##############
cd x264
./configure --enable-shared
make
make install
cd ..
cd xvidcore/build/generic
./configure
make
make install
cd ../../../
cd lame-3.98.4
./configure
make
make install
cd ..
cd a52dec-0.7.4
./configure --enable-shared=PKGS
make
make install
cd ..
cd faad2-2.7
autoreconf -vif
./configure
make
make install
cd ..
cd faac-1.28
./bootstrap
./configure
make
make install
cd ..
cd libraw1394-2.0.5
./bootstrap
./configure
make
make install
cd ..
cd libdc1394-2.1.2
./configure
make
make install
cd ..
cd opencore-amr-0.1.2
./configure
make
make install
cd ..
cd libogg-1.1.4
./configure
make
make install
cd ..
cd libvorbis-1.2.3
./configure
make
make install
cd ..
cd libtheora-1.1.1
./configure
make
make install
cd ..
export LD_LIBRARY_PATH=/usr/local/lib/
echo /usr/local/lib > /etc/ld.so.conf.d/custom-libs.conf
ldconfig
cd ffmpeg
./configure --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC
make
make install
cd ..
ldconfig
//============================在编译过程中遇到问题===========================================
报错:libavcodec/libxvid.c: In function ‘xvid_encode_init’:libavcodec/libxvid.c:362: 错误:‘xvid_plugin_lumimasking_t’ 未声明 (在此函数内第一次使用)libavcodec/libxvid.c:362: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其libavcodec/libxvid.c:362: 错误:所在的函数内只报告一次。)libavcodec/libxvid.c:362: 错误:expected ‘;’ before ‘masking_l’libavcodec/libxvid.c:363: 错误:expected ‘;’ before ‘masking_v’libavcodec/libxvid.c:364: 错误:‘xvid_plugin_ssim_t’ 未声明 (在此函数内第一次使用)libavcodec/libxvid.c:364: 错误:expected ‘;’ before ‘ssim’libavcodec/libxvid.c:365: 警告:ISO C90 不允许混合使用声明和代码libavcodec/libxvid.c:539: 错误:‘masking_l’ 未声明 (在此函数内第一次使用)libavcodec/libxvid.c:550: 错误:‘masking_v’ 未声明 (在此函数内第一次使用)libavcodec/libxvid.c:563: 错误:‘xvid_plugin_ssim’ 未声明 (在此函数内第一次使用)libavcodec/libxvid.c:564: 错误:‘ssim’ 未声明 (在此函数内第一次使用)make: *** [libavcodec/libxvid.o] 错误 1去掉--enable-libxvid 问题就好了
- ffmpeg2.1 install centos5.1
- ffmpeg2
- centos5+VirturalBox install Mac
- centos5.1安装注意事项
- Install Zabbix Server On CentOS5
- CentOS5.1 上安装 Oracle10g
- linux centos5.1 学习过程
- CentOS5.6安装openoffice4.1
- iOS ffmpeg kxmovie 编译 调试 /最新 ffmpeg2.5.3/iOS SDK8.1/XCODE6.1/
- ffmpeg2.1对HEVC/H.265视频进行解码的例子
- 裁剪ffmpeg2.7.2,支持H264以及Udp(大小在1M左右,已验证可用)
- install erlang on linux (centos5.5)
- install 1
- Centos5.1 搭建Lamp修正版
- centos5装php5+apache2.2+mysql5.1
- 在centos5.1下使用xen虚拟机
- CentOS5.1下安装gaim的方法
- win7+vmware7.1+centos5.5安装
- java 线程死锁模拟
- 程序员浪费生命的几种方式
- 物联网十二五规划,智能家居前景广阔
- WP8 电话本编程
- UnicodeEncodeError: 'gbk' codec can't encode character
- ffmpeg2.1 install centos5.1
- PL/SQL 表函数, Cursor Variable, pipelined table function
- 归并排序
- ThinkAndroid 1.1版本的简介及基本使用方法
- ASPxTreeList的右键按钮事件
- cocos2dx 动作详解
- Java第六课
- 程序员的心理疾病
- 多线程和同步