CentOS6安装vlc2.x

1、使用yum快速安装(包括vlc,vlc-devel,vlc web plugin)

yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm
yum localinstall --nogpgcheck http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm
yum install vlc vlc-devel npapi-vlc

解决root用户不能使用命令行打开vlc:
打开/usr/bin/vlc,将里面的geteuid修改成getppid保存退出即可


安装QT4相关(本人备用)
cd /etc/yum.repo.d/
wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo
yum install qtcreator qtwebkit qtwebkit-devel

2、使用源码自行编译安装(虚拟机测试)

安装系统依赖库
https://wiki.videolan.org/UnixCompile/#Prepare_your_environment
1、安装gnome桌面&x window system
2、yum install gtk2-devel libxcb-devel xcb-util-devel    ##(VLC 1.1 and later requires XCB libraries to deal with X11 displays. Do not disable XCB or you will not get any video support! )
3、yum install lua lua-devel subversion git
4、yum install libtool pkgconfig
5、yum install wget gcc gcc-c++ make xz
6、yum install nautilus-open-terminal ## 右键添加“打开终端”菜单

安装vbox虚拟工具:
yum install kernel-headers kernel-devel
ln -s /usr/src/kernels/xxxxxxxxxxxxx /usr/src/linux(内核版本使用uname -a查看)
执行安装即可

以上可使用安装光盘离线安装

安装第三方依赖库
https://wiki.videolan.org/Contrib_Status/
yum install speex-devel(在线安装,版本:1.2rc1(要求1.2.rc1))
yum install SDL-devel(在线安装,版本:1.2.14)
yum install gettext

libvorbis-devel(在线安装版本:1.2.3,要求1.3.4,所以需要自行编译)
libogg-devel(在线安装版本:1.1.4,要求1.3.2,所以需要自行编译)
flac-devel(在线安装版本:1.2.1,要求1.3.0,所以需要自行编译)

安装Lame Codec(http://lame.sourceforge.net/)
wget  http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar -zxf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix=/usr/local
make && make install

安装Faac Codec(http://www.audiocoding.com/)
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
tar -xzf faac-1.28.tar.gz
cd faac-1.28
./bootstrap
./configure --prefix=/usr/local
make && make install(编译时可能出错,注释掉common/mp4v4/mpeg4ip.h中strcasestr函数的声明)

安装OGG Codec(http://www.xiph.org/downloads/)
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
tar -xzf libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure --prefix=/usr/local
make && make install

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar -zxf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure
make && make install

wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
tar -xjf libtheora-1.1.1.tar.bz2
cd libtheora-1.1.1
./configure --prefix=/usr/local
make && make install

安装yasm,x264要求yasm版本为1.2
wget http://www.torball.com/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -zxvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
make && make install

安装x264
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --prefix=/usr/local
make && make install

安装zvbi
Download the latest atrpms-repo rpm from
http://dl.atrpms.net/el6-i386/atrpms/stable/
Install atrpms-repo rpm:
# rpm -Uvh atrpms-repo*rpm
Install alsa-driver rpm package:
# yum --enablerepo=atrpms-bleeding install zvbi zvbi-devel

install libraw1394-2.0.5.tar.gz (http://tcpdiag.dl.sourceforge.net/project/libraw1394/libraw1394/libraw1394-2.0.5.tar.gz)
install libavc1394-0.5.4.tar.gz (http://softlayer-dal.dl.sourceforge.net/project/libavc1394/libavc1394/libavc1394-0.5.4.tar.gz)
install libdc1394-2.2.1.tar.gz (http://colocrossing.dl.sourceforge.net/project/libdc1394/libdc1394-2/2.2.1/libdc1394-2.2.1.tar.gz)
install libmad-0.15.1b.tar.gz (ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz,configure完成后需要删除Makefile文件中的-fforce-mem)(MEPG AUDIO DECODER,mp1、2、3音频解码器)
以上安装均为:
./configure --prefix=/usr/local
make && make install

安装live555库
下载live.2014.11.12.tar.gz(http://www.live555.com/liveMedia/public/live.2014.11.12.tar.gz,要求2011.12.23以后版本)
tar -zxvf live.2014.11.12.tar.gz
cd live
./genMakefiles linux
打开Makefile文件,将install下
#    cd $(TESTPROGS_DIR) ; $(MAKE) install
#    cd $(MEDIA_SERVER_DIR) ; $(MAKE) install
#    cd $(PROXY_SERVER_DIR) ; $(MAKE) install
3行注释掉,否则会将测试程序也安装到/usr/local/bin下)
make
make install (默认安装在/usr/local目录下)
在/usr/local/include目录下建立live555目录,将BasicUsageEnvironment、groupsock、liveMedia、UsageEnvironment文件夹全部移动到live555目录下(这里只是规整一下目录结构,因为live555没有pkgconfig文件,需要手动指定目录的)

wget http://liquidtelecom.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.3.tar.gz
wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.2.tar.gz
tar xzvf ********.tar.gz
cd ******
./configure --prefix=/usr/local
make
make install

安装Xvid Codec(https://labs.xvid.com/source)
下载xvidcore-1.3.3.tar.gz(http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz)
cd xvidcore/build/generic/
./configure --prefix=/usr/local/
make && make install

安装libvpx(www.webmproject.org/code)
下载libvpx-v1.3.0.tar.bz2(https://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2)
tar -zxvf libvpx-v1.3.0.tar.bz2
cd libvpx-v1.3.0
./configure --prefix=/usr/local --disable-examples
make && make install

安装 amr codec
yum install amrnb-devel amrwb-devel opencore-amr-devel

//要求ffmpeg版本不要太新,avcodec版本56以后的,vlc2.1.5不支持,最好选用53~55之间到版本
ffmpeg-1.1.14.tar.gz    =====> http://www.ffmpeg.org/releases/ffmpeg-1.1.14.tar.gz
tar -zxvf ffmpeg-1.1.14.tar.gz
cd ffmpeg-1.1.14
./configure --prefix=/usr/local --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib" \
--enable-small --disable-debug --enable-shared  \
--extra-libs=-ldl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac \
--enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid \
--enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads
make
make install

yum install patch
yum install *ncurses*
yum install xmlto

//安装新版ALSA驱动(http://www.alsa-project.org/main/index.php/Main_Page),VLC2.1.5对alsa-lib最低版本要求为1.0.24
查看当前ALSA驱动版本
cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.21
为避免安装alsa-utils出错,在安装前,先停止alsa-utils
/sbin/alsa-utils stop
下载:
alsa-driver(ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.25.tar.bz2)
alsa-lib(ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.28.tar.bz2)
alsa-utils(ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.28.tar.bz2)

tar -jxvf alsa-driver-1.0.25.tar.bz2
cd alsa-driver-1.0.25.tar.bz2
./configure --with-kernel=/usr/src/linux --with-redhat=yes #这里由于先前安装虚拟工具的时候将内核源文件夹链接这里
make (编译时会提示/usr/src/linux/include/linux/fs.h中有个错误,注释掉那一行即可,不过在编译完成后,需要取消注释)
tar -jxvf alsa-lib-1.0.28.tar.bz2
cd alsa-lib-1.0.28
./configure
make && make install
tar -jxvf alsa-utils-1.0.28.tar.bz2
cd alsa-utils-1.0.28
./configure
make && make install


yum install a52dec a52dec-devel
yum install faad2 faad2-devel
yum install libgcrypt-devel
yum install libxml2-devel
yum install pulseaudio-libs-devel
yum install dbus-devel

下载vlc2.1.5(http://download.videolan.org/pub/videolan/vlc/2.1.5/vlc-2.1.5.tar.xz)
xz -d vlc-2.1.5.tar.xz
tar -xvf vlc-2.1.5.tar
cd vlc-2.1.5
如果不是使用git从服务器上下载到最新代码,不要执行./bootsharp;一般情况下,从www.videolan.org上下载目前正式发行版的代码就行了,没必要使用git;
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
./configure --prefix=/opt/vlc-2.0.6 --enable-run-as-root=yes --enable-alsa=yes --enable-pulse=yes --enable-merge-ffmpeg=yes --enable-avcodec=yes LIVE555_CFLAGS='-I/usr/local/include/live555/BasicUsageEnvironment  -I/usr/local/include/live555/groupsock  -I/usr/local/include/live555/liveMedia  -I/usr/local/include/live555/UsageEnvironment' LIVE555_LIBS='-L/usr/local/lib -lBasicUsageEnvironment  -lgroupsock  -lliveMedia  -lUsageEnvironment'
编译前先注释掉modules/video_filter/deinterlace/algo_x.c 第L502行XDeintBand8x8MMXEXT函数前的VLC_MMX,否则提示编译器内部错误
make && make install


vim /etc/ld.so.conf
添加动态库路径/usr/local/lib
ldconfig#重新配置动态库缓存

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/vlc-2.1.5/lib/pkgconfig/
安装vlc web插件
VLC自2.1后将web plugin项目独立出来,地址为:
https://code.launchpad.net/npapi-vlc
git地址:
git://git.videolan.org/npapi-vlc.git
http://git.videolan.org/git/npapi-vlc.git




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值