【fedora12】vlc-2.0.0编译

来源:互联网 发布:akgy50淘宝哪家是真货 编辑:程序博客网 时间:2024/06/05 09:50

From: http://www.zhouwenyi.com/node/1348

1.     官网下载  VLC 源码 (vlc- 2.0.0.tar.xz)

下载地址为:

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

 

2.     解压VLC源码:

xz -dvlc-2.0.0.tar.xz

tar -xvfvlc-2.0.0.tar

 

3.     cdvlc-2.0.0

./configure

 

接下来就是根据提示安装vlc需要的第三方lib.

Vlc提供了其编译需要的第三方lib的下载地址:

http://download.videolan.org/pub/videolan/contrib/

 

可根据错误一个个安装!

 

错误<1>:

configure: error: Could not findlua on your system: you may get it from http://www.lua.org/.Alternatively you can use --disable-lua to disable the luaplugin.

解决方法:

下载lua-5.1.tar.gz,解压后安装,

#make linux;makeinstall

【说明】

 

Lua 是一个小巧的脚本语言。是巴西里约热内卢天主教大学(Pontifical Catholic University of Rio deJaneiro)里的一个研究小组,由Roberto Ierusalimschy、WaldemarCeles 和 Luiz Henrique deFigueiredo所组成并于1993年开发。 其设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能。Lua由标准C编写而成,几乎在所有操作系统和平台上都可以编译,运行。Lua并没有提供强大的库,这是由它的定位决定的。所以Lua不适合作为开发独立应用程序的语言。Lua 有一个同时进行的JIT项目,提供在特定平台上的即时编译功能。

错误<2>:

configure: error: Could not findlibmad on your system: you may get it fromhttp://www.underbit.com/products/mad/. Alternatively you can use--disable-mad to disable the mad plugin.

解决方法:

下载libmad-0.15.1b.tar.gz,解压后安装
#./configure
#make;make install
【说明】
MAD (libmad)是一个开源的高精度 MPEG 音频解码库,支持 MPEG-1(Layer I, Layer II 和 LayerIII(也就是 MP3)。LIBMAD 提供 24-bit 的 PCM 输出,完全是定点计算,非常适合没有浮点支持的平台上使用。使用 libmad 提供的一系列 API,就可以非常简单地实现 MP3 数据解码工作。在 libmad 的源代码文件目录下的mad.h 文件中,可以看到绝大部分该库的数据结构和 API 等。

错误<3>:

configure: error: Could not find liba52 on your system: youmay get it from http://liba52.sf.net/. Alternatively you can use--disable-a52 to disable the a52 plugin.

解决方法:

下载a52dec-0.7.4.tar.gz ,解压后安装
 

错误<4>:

checking for XCB... no
configure: error: Package requirements (xcb >= 1.6) were not met:
 
Requested 'xcb >= 1.6' but version of XCB is 1.4
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
 
Alternatively, you may set the environment variables XCB_CFLAGS
and XCB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

 

解决方法:

下载xcb-proto-1.6.tar.gz、libxcb-1.6.tar.gz,解压后安装

安装时如果出现:

 

No package 'xcb-proto' found

在终端里执行:

#exportPKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

其中的/usr/local/lib/pkgconfig 是 xcb-proto.pc安装路径

错误<5>:

checking forQT4... no

configure:WARNING: No package 'QtCore' found

No package 'QtGui'found.

configure: error:The skins2 module depends on a the Qt4 development package. Withoutit you will not be able to open any dialog box from the interface,which makes the skins2 interface rather useless. Install the Qt4development package or alternatively you can also configure with:--disable-qt4 --disable-skins2.

解决方法:

暂时先disable掉./configure --disable-qt4--disable-skins2

最终configure成功!

libvlcconfiguration

--------------------

version              : 2.0.0

system               : linux

architecture         : i686 mmx sse sse2

optimizations        : yes

vlcaliases          : cvlc rvlc

 

To build vlc andits plugins, type `make', or `./compile' if you like nicecolors.

 

4.      编译vlc-2.0.0

#make

可能会出错!

   #warning Please update Video4Linux2 headers!

  v4l2/controls.c:75: error: 'V4L2_CID_BAND_STOP_FILTER' undeclaredhere (not in a function)

  

  用的fedora12的/usr/include/linux/videodev2.h版本太旧,需要linux kernel 3.2以上的

  到网上下载一个:

  http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/include/linux/videodev2.h

  替换/usr/include/linux/videodev2.h

  之后再次make,就能成功编译!

 

  #make install

 

5.      验证VLC - 2.0.0

#vlc play/mnt/hgfs/share/17597.flv

由于没有安装qt4,启动的是x11.

【fedora12】vlc-2.0.0编译

 

 

6.      验证fedora安装qt4后,再次./configure ; make ; makeinsatall

   <1>.安装qt4方法 

    sudo yum install qt qt-devel qt-x11 qt-docqt-demos qt-examples qt-assistant qt-creatorqt-config  

 

    <2>.测试效果 

    启动界面!  

【fedora12】vlc-2.0.0编译

  播放17597.flv!
【fedora12】vlc-2.0.0编译

播放“手机”DVD FOLDER!

 

【fedora12】vlc-2.0.0编译
原创粉丝点击