centos6 编译 安装 vlc

来源:互联网 发布:药品安全网络知识竞赛 编辑:程序博客网 时间:2024/06/06 01:32
安装额外的依赖库
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
yum installhttp://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 
(以上为32位系统, 若为64位需查找相应的两个rpm位置安装即可)


安装依赖
from base (the official CentOS repo):
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig wget opencv zlib-devel dbus-devel lua-devel zvbi libdvdread-devel libdc1394-devel libxcb-devel xcb-util-devel libxml2-devel mesa-libGLU-devel pulseaudio-libs-devel alsa-lib-devel libgcrypt-devel qt-devel ghc-OpenGL-devel

from EPEL:
yum --enablerepo=epel install yasm libva-devel libass-devel libkate-devel libbluray-devel libdvdnav-devel libcddb-devel libmodplug-devel 

from RPMforge:
yum --enablerepo=rpmforge install a52dec-devel libmpeg2-devel 

x264
git clone git://git.videolan.org/x264 
cd x264 
./configure --enable-shared 
make 
make install 

libfdk_aac
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git 
cd fdk-aac
autoreconf -fiv
./configure --enable-shared
make
make install

lame
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz 
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --enable-shared --enable-nasm
make
make install

libogg
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
tar xzvf libogg-1.3.0.tar.gz
cd libogg-1.3.0
./configure --enable-shared
make
make install

libtheora
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --enable-shared
make

libvorbis
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz 
tar xzvf libvorbis-1.3.3.tar.gz 
cd libvorbis-1.3.3 
./configure --enable-shared 
make 
make install

libvpx
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx 
./configure --enable-shared 
make 
make install

wget http://ffmpeg.mplayerhq.hu/releases/ffmpeg-1.2.tar.gz
tar zxvf ffmpeg-1.2.tar.gz
cd ffmpeg-1.2

make distclean  
./configure --enable-gpl --enable-libfdk_aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --disable-static --enable-shared 
make 
make install
在文件/etc/profile末尾加入:
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:$
PKG_CONFIG_PATH
export PKG_CONFIG_PATH
source /etc/profile 或 ". /etc/profile"
libmadwget ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz tar zxvf libmad-0.15.1b.tar.gzcd libmad-0.15.1b./configuremake make installNote:If the configure part doesn’t complete successfully, open the configure file with a text editor such as vim and comment or delete the following line, then re-run ./configure: optimize="$optimize -fforce-mem"
liba52wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gztar zxvf a52dec-0.7.4.tar.gzcd a52dec-0.7.4 ./configure --enable-sharedmake && make install
libdvbpsi-0.2.2
tar libdvbpsi-0.2.2.tar.gz
cd libdvbpsi-0.2.2
./configure
make && make install
vlc wget http://download.videolan.org/pub/videolan/vlc/2.0.5/vlc-2.0.5.tar.xzcd vlc./configure --enable-run-as-root --enable-debug  (gdb调试用, 可在安装是将configure文件中-O2改为-O)make && make install
(以上安装之后是带图形界面可正常使用的, 我的视频输出选的x11, 音频选的alsa, 不过好像有杂音)