VLC播放器安装

From: http://blog.csdn.net/lqrensn/article/details/6179171

想边上班边听歌,可惜办公电脑有点差,所以装的是fedora 10.又用的是代理上网,网速严重受限,同事传了些mp3,居然听不了,没mp3解码器,晕倒。。想到自家电脑装的vlc播放器,不错,就装上耍起,不晓得哪里没有安装好,居然有很多问题,碰巧在网上遇到一哥们,和他问题几乎一致,他刚好写了详细介绍,就转他的吧,备忘一下,感谢这哥们的分享精神:原文网址如下:http://hi.baidu.com/samtao/blog/item/8152ffc8344b3ff153664f4c.html
 
 
Step by step安装vlc-player.
 
1:首先从vlc官方网站下载vlc的最新版。
 
我们下载source code版本。http://www.videolan.org/vlc/download-sources.html
 
本例中所有程序均放到/root/soft目录
 
2:为了让root用户可以执行VLC,我们需要加上 --enable-run-as-root
 
(ps:可以执行如下:[root@tsong vlc-1.0.6]# ./configure --help|grep root )查看该命令怎么写
 
编译命令:./configure --enable-run-as-root --prefix=/root/soft/vlc
 
提示缺少libmad:
 
configure: error: Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.
 
3:编译libmad.
 
按照提示,下载:http://www.underbit.com/products/mad,编译
 
./configure --prifix=/root/soft/libmad
 
make 提示错误
 
cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] Error 1
make[2]: Leaving directory `/home/izhier/download/libmad-0.15.1b'
 
google之,说是gcc版本太高,修改makefile,删除-fforce-mem
 
即可make,然后make install
 
(此时libmad安装在/root/soft/libmad文件夹内)
 
4:继续编译vlc,这时候用如下命令:
 
./configure --enable-run-as-root --prefix=/root/soft/vlc --with-mad=/root/soft/libmad/
 
继续,提示找不到libavcodec,
 
configure: error: Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.
 
5:编译libavcodec.
 
下载,编译:http://www.ffmpeg.org/download.html
 
或者直接用svn下载最新版:svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
 
./configure --prifix=/root/soft/ffmpeg
 
make
 
编译过程极其漫长
 
完成之后输入make install即OK
 
作为一个过来者,我建议用下面这个命令编译:
 
./configure --prefix=/root/soft/ffmpeg --enable-swscale --enable-postproc --enable-gpl
 
否则,你将不得不执行步骤7和步骤8。
 
6:继续编译,不用置疑,一定还是会提示libavcodec找不到,why?因为你放的目录程序找不到。这时候就要用到pkg-config了
 
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/root/soft/ffmpeg/lib/pkgconfig"
 
export完成之后,我们可以测试一下:
 
[root@tsong vlc-1.0.6]# pkg-config --modversion libavcodec
 
52.20.1
 
如果可以打印出版本信息,那么OK,就可以继续编译了
 
7:继续编译。
 
编译命令还是
 
./configure --enable-run-as-root --prefix=/root/soft/vlc --with-mad=/root/soft/libmad/
 
继续提示缺少swscale:
 
checking for SWSCALE... no
 
configure: error: Could not find libswscale. Use --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.
 
google了一下,发现swscale是ffmpeg到一个选项,默认在编译到时候没有启用。
 
[root@tsong ffmpeg-0.5.1]# ./configure --help|grep swscale
 
--enable-swscale enable GPLed software scaler support [no]
 
无奈,只好继续返回步骤5,用如下命令:
 
[root@tsong ffmpeg-0.5.1]# ./configure --prefix=/root/soft/ffmpeg --enable-swscale
 
然后再重复再编译安装ffmpeg
 
make
 
make install
 
8:完成步骤7中到swscale后,继续编译。
 
checking for ffmpeg/swscale.h... no
 
checking for POSTPROC... no
 
configure: error: Could not find libpostproc. Use --disable-postproc to ignore this error.
 
看报错在ffmpeg后面,该不会libpostproc也是ffmpeg到一个配置?
 
[root@tsong ffmpeg-0.5.1]# ./configure --help|grep postproc
 
--enable-postproc enable GPLed postprocessing support [no]
 
[root@tsong ffmpeg-0.5.1]# ./configure --prefix=/root/soft/ffmpeg --enable-swscale --enable-postproc
 
postproc is gpl and --enable-gpl is not specified.
 
If you think configure made a mistake, make sure you are using the latest
 
version from SVN. If the latest version fails, report the problem to the
 
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
 
Include the log file "config.err" produced by configure as this will help
 
solving the problem.
 
[root@tsong ffmpeg-0.5.1]# ./configure --prefix=/root/soft/ffmpeg --enable-swscale --enable-postproc --enable-gpl
 
无语,继续用./configure --prefix=/root/soft/ffmpeg --enable-swscale --enable-postproc --enable-gpl 命令编译ffmpeg
 
这可是第三次编译ffmpeg了!
 
9:继续编译:提示缺少a52
 
checking for a52dec/a52.h... no
 
configure: error: Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.
 
按照提示,从地址 http://liba52.sf.net下载

可是,这个网址却打不开,最后找来找去,在sourceforege.net上找到了,下载地址:http://liba52.cvs.sourceforge.net/viewvc/liba52/a52dec/?view=tar

另外,也发现了另一个下载地址:http://download.videolan.org/pub/videolan/contrib/a52dec-0.7.4.tar.gz

我选的是第一个下载地址进行安装!

 
./configure --prefix=/root/soft/a52dec
 
make
 
make install
 
10:编译好a52dec后,我们继续编译vlc
 
./configure --enable-run-as-root --prefix=/root/soft/vlc --with-mad=/root/soft/libmad/ --with-a52=/root/soft/a52dec/
 
11:
 
继续报错
 
checking for FRIBIDI... configure: error: Package requirements (fribidi) were not met:
 
No package 'fribidi' found
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
installed software in a non-standard prefix.
 
Alternatively, you may set the environment variables FRIBIDI_CFLAGS
 
and FRIBIDI_LIBS to avoid the need to call pkg-config.
 
See the pkg-config man page for more details.
 
从网址:http://fribidi.org/下载fribidi,然后编译安装。
 
[root@tsong fribidi-0.10.9]# ./configure --prefix=/root/soft/fribidi
 
make
 
make install
 
12:如步骤6,还是需要修改PKG_CONFIG_PATH,使之包含刚刚安装的fribidi
 
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/root/soft/ffmpeg/lib/pkgconfig:/root/soft/fribidi/lib/pkgconfig"
 
继续编译
 
13:继续报错
 
----------My god,我快失去耐心了。好在马上就结束了
 
checking for QT4... no
 
configure: WARNING: Qt 4 library not found
 
configure: error: The skins2 module depends on a the Qt4 development package. Without it you won't be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.
 
下载QT4,http://qt.nokia.com/downloads-cn 这又是一个大家伙,将近400MB呢,好在我之前已经下载编译好了,现在要做的就是指定pkg-config就可以了
 
14:还是让pkg-config可以找到qt4就可以了(/opt/qtsdk/qt/lib/pkgconfig)
 
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/root/soft/ffmpeg/lib/pkgconfig:/root/soft/fribidi/lib/pkgconfig:/opt/qtsdk/qt/lib/pkgconfig"
 
15:congratulations!
 
终于要成功了!
 
config.status: creating vlc-config
 
Enabled modules: a52tofloat32 a52tospdif access_alsa access_mmap access_oss adjust alphamask alsa aout_file aout_sdl atmo audio_format audioscrobbler avcodec avformat bandlimited_resampler blend blendbench bluescreen canvas cdda chain clone cmml colorthres converter_float crop croppadd dbus deinterlace dolby_surround_decoder dtstospdif dynamicoverlay equalizer erase extract fake fb float32_mixer folder freetype gaussianblur gestures glx gnutls gradient grain hal headphone_channel_mixer hotkeys http i420_rgb_mmx i420_rgb_sse2 i420_ymga i420_ymga_mmx i420_yuy2 i420_yuy2_mmx i420_yuy2_sse2 i422_i420 i422_yuy2 i422_yuy2_mmx i422_yuy2_sse2 inhibit invert linear_resampler logo magnify marq memcpy3dn memcpymmx memcpymmxext mosaic motion motionblur motiondetect mpgatofixed32 mux_ogg noise normvol notify ogg opengl opengl osd_parser osdmenu oss panoramix param_eq png podcast postproc probe_hal psychedelic puzzle qt4 rc remoteosd ripple rotate rss rv32 sap scale scaletempo scene screensaver sharpen shout showintf signals simple_channel_mixer skins2 spatializer spdif_mixer stream_out_raop swscale telepathy telnet telx transform unzip v4l2 vcd visual vmem vorbis vout_sdl wall wave x11 x11_screen xml xvideo yuv yuvp yuy2_i420 yuy2_i422 zip
 
libvlc configuration
 
--------------------
 
version : 1.0.6
 
system : linux
 
architecture : i686 mmx sse sse2
 
build flavour : devel
 
vlc aliases : cvlc rvlc svlc qvlc
 
plugins/bindings :
 
You can tune the compiler flags in vlc-config.
 
To build vlc and its plugins, type `./compile' or `make'.
 
16:很遗憾,编译的时候再次出现错误提示:
 
ERROR : src/ft2_font.cpp:30: 29: fribidi/fribidi.h: No such file or directory
 
src/ft2_font.cpp: In member function 'virtual GenericBitmap* FT2Font::drawString(const UString&, uint32_t, int) const':
 
ERROR : src/ft2_font.cpp: 157: 'FriBidiCharType' was not declared in this scope
 
google:http://svn.tribler.org/vlc/trunk/modules/gui/skins2/src/ft2_font.cpp
 
查找代码ft2_font.cpp,在目录/root/download/vlc-1.0.6/modules/gui/skins2/src 下,看到了
 
#include <fribidi/fribidi.h>
 
因为我们的fribidi是安装在/root/soft/fribidi目录,不是默认安装在/usr/include目录,那么建立符号链接!
 
[root@tsong include]# ln -s /root/soft/fribidi/include/fribidi/ fribidi
 
[root@tsong include]# pwd
 
/usr/include
 
17:继续
 
make
 
make install
 
18:done
 
19:编辑文件/usr/share/applications /vlc.desktop
 
[Desktop Entry]
 
Version=1.0
 
Name=Vlc Player
 
Comment=vlc player
 
GenericName=vlc
 
Exec=/root/soft/vlc/bin/vlc
 
Terminal=false
 
X-MultipleArgs=false
 
Type=Application
 
Icon=vlc48x48
 
Categories=AudioVideo;
 
MimeType=text/html;
 
StartupWMClass=Chromium
 
StartupNotify=true
 
X-Desktop-File-Install-Version=0.15


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/405049.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux安装配置apache

1.获取软件&#xff1a; http://httpd.apache.org/ httpd-2.2.21.tar.gz wget http://apache.fayea.com//httpd/httpd-2.2.31.tar.gz 2.安装步骤&#xff1a; 解压源文件&#xff1a; 1 tar zvxf httpd-2.2.21.tar.gz 2 cd httpd-2.2.213 ./configure --prefix/usr/local/apac…

CM3计算板I/O编程

1、CM3计算板的IO资源 CM3支持的I/O管脚数为54个&#xff0c;每个管脚包括一个或多个复用功能&#xff0c;分别位于ALT0~ALT5&#xff0c;如下表&#xff1a; 2、设备树启用IO外设的方式 通过在/boot/config.txt 文件中描述IO行为&#xff0c;可以在系统启动时&#xff0c;初…

Apt-get使用指南

From: http://bbs.chinaunix.net/thread-2115236-1-1.html 命令 下面将要介绍的所有命令都需要sudo&#xff01;使用时请将“packagename”和“string”替换成您想要安装或者查找的程序。 apt-get update——在修改/etc/apt/sources.list或者/etc/apt/preferences之後运行…

[react] 在JSX中如何写注释?

[react] 在JSX中如何写注释&#xff1f; {/* A JSX comment */} 个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。欢迎大家一起讨论 主目录 与歌谣一起通关前端面试题

重构:改善既有代码的设计(评注版) 评注者序

重构&#xff1a;改善既有代码的设计&#xff08;评注版&#xff09; 评注者序评注者序近十年来&#xff0c;若要讨论如何改进代码的质量&#xff0c;很难绕过Martin Fowler的这本经典著作。这本书已经影响了几代程序员&#xff0c;或许会持续不断地影响未来的一批程序员。遗憾…

BusyBox编译配置

1. 下载Busybox tar包&#xff0c;如busybox-1.23.0.tar.bz2。 官网&#xff1a;http://www.busybox.net/ 2. make distclean&#xff1b;清除原有配置 make menuconfig; 配置命令选项 make&#xff1b;编译 make install&#xff1b;安装编译文件&#xff0c;主要为bin, s…

python类型转换、数值操作

From: http://canofy.iteye.com/blog/298263 python类型转换 Java代码 函数 描述 int(x [,base ]) 将x转换为一个整数 long(x [,base ]) 将x转换为一个长整数 float(x ) 将x转换到一个浮点数 complex(real [,imag ]…

串口字符传输时间计算

1、字符时间 串口字符发送时间可根据串口参数配置计算&#xff0c;计算示例如下&#xff1a; e.g.1. 固定起始位1位&#xff0c;数据位8位&#xff0c;奇校验位1位&#xff0c;停止位1位&#xff0c;波特率9600bps&#xff0c;计算单个字符传输时间为&#xff1a; &#xff…

[react] React什么是有状态组件?

[react] React什么是有状态组件&#xff1f; 有状态的组件总是一个类组件,并且拥有一个在构造函数中初始化的state 个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。欢迎大家一起讨论 主目录 与歌谣一起通关前端面试题…

Bloomfilter 的应用场景

Bloomfilter 一般用于检测某元素是否在集合中存在&#xff0c;它的目标是解决在大数据量情况的元素判定。它的优点是它提供的数据结构具有非常高的时间查询和空间存储效率&#xff0c;缺点是可能造成误判&#xff0c;就是说&#xff0c;它判定某元素在集合中&#xff0c;但是其…

运放搭建的窗口电压比较器电路

1、窗口比较器 设输入电压为Vin&#xff0c;输入范围为&#xff08;-V1~V2&#xff09;&#xff0c;要求设计电路识别输入是否在给定的电压区间&#xff08;Vd~Vt&#xff09;。 可以设计为一个电压窗口比较电路&#xff0c;窗口电压VwVsδ&#xff0c;Vs为窗口基准电压&…

ImageView倒影效果

先看下效果图&#xff1a;import android.app.Activity; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.LinearGradient; import android.graphi…

在浏览器地址栏按回车、F5、Ctrl+F5刷新网页的区别

转自&#xff1a;http://blog.csdn.net/zoohouse/article/details/7552594 概述&#xff1a; “刷新”是在你现有页面的基础上&#xff0c;检查网页是否有更新的内容。在检查时&#xff0c;会保留之前的一些变量的值&#xff0c;因此有可能会造成刷新后网页出现错误&#xff0c…

[react] 为什么建议Fragment包裹元素?它的简写是什么?

[react] 为什么建议Fragment包裹元素&#xff1f;它的简写是什么&#xff1f; 为一个组件添加多个元素,可以讲你的子组件列表添加到一个分组中(<></>),并且不会再DOM增加额外节点 个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&…

uboot开机logo

From: http://blog.chinaunix.net/uid-9688646-id-1998453.html 参考资料&#xff1a; 【1】U-boot开机logo的制作方法&#xff08;Tekkaman Ninja&#xff09;&#xff1a;http://blog.chinaunix.net/u1/34474/showart_2085233.html 【2】U-Boot中的Splash Screen&#xff0…

USB连接TF卡 SD卡硬件电路

1、电路芯片 TF卡芯片选择&#xff1a;GL823K。USB2.0 SD/MMC闪存读卡器单芯片。支持USB2.0高速传输&#xff0c;并符合通用串行总线规范。 它的引脚设计适合卡插口提供更容易的PCB布局。 TF卡防静电芯片&#xff1a;SMF05C。 2、电路 分享实际项目中用到的接口电路&#…

R语言-Kindle特价书爬榜示例 输出HTML小技巧

20170209更新&#xff1a; 根据回复提示&#xff0c;rvest包更新&#xff0c;原用函数html作废&#xff0c;需改用read_html 并后续amazon网页改版等 因此此文章代码失效&#xff01;各位可看评论内容了解详情 等以后有空再重写一遍代码&#xff0c;抱歉。果然代码还是放在gith…

【原创】指针和下标的10条对比

【原创】指针和下标的10条对比摘要&#xff1a;在编程语言中&#xff0c;指针和下标都是访问数据的有效手段&#xff0c;本文以C/C语言为例&#xff0c;讲解它们之间的区别。要想完全理解本文&#xff0c;读者可能需要&#xff1a;1.至少熟悉一门含有指针和下标语义的编程语言值…

[react] constructor和getInitialState有不同?

[react] constructor和getInitialState有不同&#xff1f; constructor用在class组件中getInitialState用在createReactClass实现的组件中 个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。欢迎大家一起讨论 主目录 与…

求数组中数对的最大值

题目&#xff1a; 在数组中&#xff0c;每个数字减去它右边的所有数字得到一个数对之差。求所有数对之差的最大值。 例如在数组{2, 4, 1, 16, 7, 5, 11, 9}中&#xff0c;数对之差的最大值是9&#xff0c;是16减去5的结果。 分析&#xff1a; 要使 a-b要最大&#xff0c;只有…