centos 编译vlc

环境:CentOS 6.3 + VLC 2.0.5

1、下载源码:

wget http://download.videolan.org/pub/videolan/vlc/2.0.5/vlc-2.0.5.tar.xz

2、检查依赖关系,根据情况安装需要的软件

cd vlc-2.0.5/extras/tools/
./bootstrap
cd ../..
./bootstrap

3、安装autoconf

由于系统默认的autoconf-2.63版本低了,编译vlc最低要2.69的
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure && make && make install && make clean && cd ..

4、安装ffmpeg

安装ffmpeg,而不是libav,ffmpeg中包含libpostproc

wget http://ffmpeg.mplayerhq.hu/releases/ffmpeg-1.2.tar.gz
tar zxvf ffmpeg-1.2.tar.gz
cd ffmpeg-1.2
make distclean  # 防止报"relocation R_X86_64_PC32 against undefined symbo"这样的错误
CFLAGS=-fPIC ./configure --enable-shared --enable-gpl --enable-nonfree  && make && make install

在文件/etc/profile末尾加入:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
注:/usr/local是ffmpeg的默认安装路径
执行:
source /etc/profile   或  ".    /etc/profile"
否则会报如下错误:
...
checking for AVCODEC... no
configure: error: Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.
...

5、安装libmad

wget http://downloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz
tar zxvf libmad-0.15.1b.tar.gz

cd libmad-0.15.1b
sed -i '/-fforce-mem/d' configure && ./configure --prefix=/usr && make && make install

6、安装liba52

wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
tar zxvf a52dec-0.7.4.tar.gz
cd a52dec-0.7.4 && ./configure --prefix=/usr  --mandir=/usr/share/man  --enable-shared --disable-static  CFLAGS="-g -O2 $([ $(uname -m) = x86_64 ] && echo -fPIC)" && make && make install 

5、安装其它依赖包

yum install dbus-devel libcddb-devel libva* libxcb-devel ghc-OpenGL-devel -y
yum install alsa-lib-devel -y  # 相关错误 configure: error: No package 'alsa' found. alsa-lib 1.0.16 or later required
yum install libgcrypt-devel -y  # 相关错误 configure: error: libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt.

6、安装vlc:

cd vlc-2.0.5 && ./configure --enable-run-as-root && make && make install

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值