1、从git上获得VLC源代码,当然你要确定你已经安装好了git:
git clone git://git.videolan.org/vlc.git
vlc源码还是挺大的,我下载下来一共是214M多
2、cd vlc
ls
AUTHORS compat doc m4 po THANKS
autotools configure.ac extras make-alias README
bin contrib include Makefile.am share
bindings COPYING INSTALL modules src
bootstrap COPYING.LIB lib NEWS test
3、./bootstrap
我在这里遇到一个问题:
./bootstrap
NOTE: GNU gettext appears to be missing or out-of-date.
Please install or update GNU gettext.
Also check if you have cvs, a dependency of autopoint.
Otherwise, you will not be able to build a source tarball.
==============================================================
generating modules/**/Makefile.am
.................................
+ autoreconf --install --force --verbose -I m4
./bootstrap: 78: ./bootstrap: autoreconf: not found
最开始的提示说需要更新或者安装GNU gettext,那就安装了gettext
sudo apt-get install gettext;
看下面的提示说autoreconf没有找到,那就安装一下吧:
sudo apt-get install autoconf automake libtool
安装好之后,再试一次:
./bootstrap
root@hlchen-Lenovo-Product:/home/share/mahang/vlc# ./bootstrap
NOTE: GNU gettext appears to be missing or out-of-date.
Please install or update GNU gettext.
Also check if you have cvs, a dependency of autopoint.
Otherwise, you will not be able to build a source tarball.
==============================================================
generating modules/**/Makefile.am
.................................
+ autoreconf --install --force --verbose -I m4
autoreconf: Entering directory `.'
autoreconf: running: true --force
autoreconf: running: aclocal -I m4 --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autotools'.
libtoolize: copying file `autotools/config.guess'
libtoolize: copying file `autotools/config.sub'
libtoolize: copying file `autotools/install-sh'
libtoolize: copying file `autotools/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --include=m4 --force
autoreconf: running: /usr/bin/autoheader --include=m4 --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:64: installing `autotools/compile'
configure.ac:27: installing `autotools/missing'
bin/Makefile.am: installing `autotools/depcomp'
autoreconf: Leaving directory `.'
+ rm -f po/Makevars.template
+ rm -f stamp-h*
+ set +x
Successfully bootstrapped
看最开始还是提示说需要安装或者升级gettext,不知道这是啥原因,不管了,反正“Successfully bootstrapped”
4、安装vlc的依赖包:
sudo apt-get build-dep vlc
这也挺大,122M
5、编译
./configure
make
在make的时候出现错误:
/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: could not read symbols: Bad value
在调用ffmpeg的库函数时出现错误,这是64位系统会出现的问题
已经提示解决方案了:recompile with -fPIC
重新编译ffmpeg
$CFLAGS="-fPIC" ./configure
make
make install
ldconfig
然后重新编译VLC
$CFLAGS="-fPIC" ./configure
make
make install
ldconfig
这样就对了
6、运行
./vlc
VLC media player 2.1.0-pre1 Rincewind (revision 2.1.0-git-15-gb2cce4d)
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() 已返回 true
Failed to stat home directory /home/hangma: 没有那个文件或目录
X11 connection rejected because of wrong authentication.
[0x1eea958] pulse audio output error: PulseAudio server connection failure: 拒绝连接
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() 已返回 true
Failed to stat home directory /home/hangma: 没有那个文件或目录
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
[0x1e15ca8] main interface error: no suitable interface module
[0x1e012a8] main libvlc error: interface "globalhotkeys,none" initialization failed
X11 connection rejected because of wrong authentication.
[0x1e15ca8] dbus interface error: Failed to connect to the D-Bus session daemon: Failed to connect to socket /tmp/dbus-V22Eo9EKfT: 拒绝连接
[0x1e15ca8] main interface error: no suitable interface module
[0x1e012a8] main libvlc error: interface "dbus,none" initialization failed
[0x1e012a8] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
Xlib: extension "XInputExtension" missing on display "localhost:10.0".
X11 connection rejected because of wrong authentication.
"sni-qt/5438" WARN 17:54:10.060 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE
结合网上编译vlc的例子,我又安装了一个包:
sudo apt-get install checkinstall lua50
出现上述错误的原因是:我使用putty远程登录ubuntu,所以在我的windows终端无法显示,后来在ubuntu上运行./vlc,就会出现vlc的界面
7、安装
make install
可以卸载
make uninstall
make distclean
分享到:
相关推荐
讲解如何在Ubuntu下编译vlc的完整流程
windows下编译vlc-qt (最新)。 包内容:vlc-3.0.0-win64.7z、vlc-qt-1.1.1.tar.gz、上述编译后的库(debug、release) 具体可查看 https://blog.csdn.net/automoblie0/article/details/104664327
使用Ubuntu 16.04 64位桌面版本,进行VLC2.2.X 交叉编译,得到windows版exe文件
在ubuntu64位下,MinGW64位交叉编译环境,编译生成32位版本VLC
Ubuntu12.04下交叉编译VLC-2.1.1-Win32程序
ubuntu vlc离线方式 执行vlc.sh 然后执行sudo dpkg -iR vlc 详细在我博客有说明!
Cygwin 编译 VLC 指南.doc Cygwin 编译 VLC 指南.doc Cygwin 编译 VLC 指南.doc
vlc在windows下编译中文版
Cygwin环境的安装并编译vlc,vlc-1.1.11版本编译
解决开发的vlc 的源码开发编译的困难,这是编译后的源码。
VLC源码,播放器,编译指南及源码分享
直接运行下面链接VLC源码,直接用默认v120运行即可,不要改成最新的v140.直接可以编译测试,这个是别人做好的,我分享一下。
利用qtcreator集成开发环境编译并且调试vlc项目源代码,相信对于vlc开发人员来说,螀是极好的资源
如果你在使用ubuntu 编译开发vlc3.0.4 windows 版本,苦于无法调试的时候,这个工具能帮助到你。使得在windows 可以调式vlc dump情况。
msys和mingw下编译vlc的方法和资料
交叉编译的vlc2.05,可运行,播放网络媒体,多媒体播放器
学习vlc源码必备,其他分包从我的资源里找
vlc编译源码,2015年7月编译
vlc android compile 过程中,当运行到sh compile.sh后,会去下载...vlc编译所有需要的第三方库,先下载再编译,这个过程需要很长时间,还可能下载不成功,如果无法下载某些库,就手动下载下来并放到这个目录下即可:
vlc andrid 编译用到的lib,放在android/vlc/contrib/tarballs下