Firefly开源社区

打印 上一主题 下一主题

[Linux] RK3288 ubuntu16.04 VLC 环境搭建

98

积分

0

威望

0

贡献

技术小白

积分
98

RK3288 ubuntu16.04 VLC 环境搭建

发表于 2019-9-26 19:15:54      浏览:3321 | 回复:1        打印      只看该作者   [复制链接] 楼主
RK3288  ubuntu16.04 VLC 环境搭建
1 安装环境依赖文件
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install -y autoconf automake libtool
sudo apt-get install lua5.1 liblua5.1-dev
sudo apt-get install liba52-dev
sudo apt-get install libxcb-shm0-dev
sudo apt-get install libxcb-composite0-dev libxcb-glx0-devlibxcb-dri2-0-dev libxcb-xf86dri0-dev libxcb-xinerama0-devlibxcb-render-util0-dev
sudo apt-get install libxcb-xv0-dev
sudo apt-get install libxcb-randr0-dev
sudo apt-get install libalsa-ocaml-dev
sudo apt-get install yasm
sudoapt-get install libxml2-dev libvlc-dev
sudo apt-get install libavcodec-dev
sudo apt-get install libavformat-dev
sudo apt-get install libswscale-dev
sudo apt-get install liba52-0.7.4-dev
2 ffmpeg 安装
第一步:
$ tar -vxf ffmpeg-4.1.tar.bz2 ffmpeg-4.1/
或者GitHub上下载安装
cd ./ffmpeg
第二步:
$ ./configure --prefix=/usr/vlc --extra-cflags=-fPIC
firefly@firefly:~/vlc/ffmpeg-4.1$./configure --prefix=/usr/vlc --extra-cflags=-                                                      fPIC
install prefix            /usr/vlc
source path               .
C compiler                gcc
C library                 glibc
ARCH                     arm (armv7-a)
big-endian                no
runtime cpu detection     yes
ARMv5TE enabled           yes
ARMv6 enabled             yes
ARMv6T2 enabled           yes
VFP enabled               yes
NEON enabled              yes
THUMB enabled             yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
network support           yes
threading support         pthreads
safe bitstream reader     yes
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          no
makeinfo supports HTML    no
第三步:
编译
$ make -j4
第四步:
安装
$ sudo make install
安装完成,可以切到usr/vlc/bin目录下执行一下”./ffmpeg”确认库版本。
第五步:
环境变量配置
I am trying to build the most recent development version ofvlc-3.0 (git cloned) from source, but running ./configure givesme the following error:
configure: error: Missing libav orFFmpeg
Make sure that "pkg-config--modversion libavcodec" works.
If not, then FFmpeg is essentially notinstalled.
$  sudovim /etc/profile
在最后一行增加环境变量:
$  exportPKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/vlc/lib/pkgconfig
$  sudoreboot
$  pkg-config --modversionlibavcodec
firefly@firefly:~$  pkg-config --modversion libavcodec
58.35.100
2 工具安装
git、automake、libtool等,相信大家都有,没有的按照如下命令行自行安装。
sudo apt-get update
sudo apt-get install gitbuild-essential pkg-config libtool automake autopoint gettext
注意,安装完以后检查一下 gettext 版本。
vlc-3.0 要求 gettext>=0.19.8,但是 ubuntu 官方源只更新到了 0.19.7
gettext –version
如果正常会显示:gettext (GNU gettext-runtime) 0.19.8
如果版本小于规定版本,则需要单独安装 gettext,如下
$  tar -Jxvfgettext-0.19.8.tar.xz
$  cd gettext-0.19.8/
$  ./configure --prefix=/usr
$  sudo make && sudomake install
安装完成后再确认一下 gettext,如果仍为旧版,则按照本机环境修改 “prefix=path”指定的路径重新编译安装,直到版本正确。
3  vlc 安装
第一步:
$  tar -vxf vlc-3.0.6.tar.xz
$  cd vlc-3.0.6
或者GitHub上面下载源码
$  cd vlc-3.0/
这里最好选择一个打了 tag 版本,即官方发布版,暗坑相对其他版本会相对少一些。
笔者编译时最新的版本是 3.0.6
$  git tag
$  git branch -b 3.0.1 3.0.1
第二步:
按照 Wiki 教程,此处应该执行 ./bootstrap。但实际是新版是不能通过的,需要先安装 flex 和 bison
$  sudo apt-get install flexbison
$  ./bootstrap
命令行显示:
Successfully bootstrapped
firefly@firefly:~/vlc/vlc-3.0.6$./bootstrap
-rwxr-xr-x 1 firefly firefly 1763 Dec  3  2017bootstrap*
firefly@firefly:~/vlc/vlc-3.0.6$./bootstrap
NOTE: autopoint (GNU gettext-tools) appearsto be missing or out-of-date.
Please install or update GNU gettext tools.
Otherwise, you will not be able to build asource tarball.
==========================================================================
autoreconf: Entering directory `.'
autoreconf: running: true --force
autoreconf: running: aclocal -I m4 --force-I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy--force
libtoolize: putting auxiliary files inAC_CONFIG_AUX_DIR, 'autotools'.
libtoolize: copying file'autotools/ltmain.sh'
libtoolize: putting macros inAC_CONFIG_MACRO_DIRS, '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:46: installing'autotools/compile'
configure.ac:27: installing'autotools/missing'
bin/Makefile.am: installing 'autotools/depcomp'
autoreconf: Leaving directory `.'
Successfully bootstrapped
第三步:
先安装 wayland-protocols,不然之后的步骤会失败。
$ sudo apt-get install wayland-protocols
$ ./configure --prefix=/usr/vlc CC=arm-linux-gnueabihf-gccCXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar--host=arm-linux-gnueabihf --disable-chromecast   
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating modules/Makefile
config.status: creating m4/Makefile
config.status: creating po/Makefile.in
config.status: creating share/Makefile
config.status: creating compat/Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating bin/Makefile
config.status: creating test/Makefile
config.status: creating modules/hw/mmal/Makefile
config.status: creating share/vlc.appdata.xml.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
libvlc configuration
--------------------
version               : 3.0.6
system                : linux
architecture          : armv7l
optimizations         : yes
vlc aliases           : cvlcrvlc
第四步:
$make -j4
$sudo make install
4 环境变量的配置
vlc 安装完毕
vlc 环境变量的配置:
命令框执行: sudo vim /etc/profile
添加以下配置(根据自己的编译路径而定):
exportLD_LIBRARY_PATH=/usr/vlc/lib:$LD_LIBRARY_PATH
大功告成,编译完成之后可以去刚在指定的编译输出目录 ./bin/vlc 运行 vlc 了。

回复

使用道具 举报

98

积分

0

威望

0

贡献

技术小白

积分
98
发表于 2019-9-26 19:18:21        只看该作者  沙发
链接:https://pan.baidu.com/s/1VGzVosH3KQa_qepLERMLtg
提取码:58ob
复制这段内容后打开百度网盘手机App,操作更方便哦
链接:https://pan.baidu.com/s/1f0cp7HjqxWdfzo5GY3n37Q
提取码:l0mg
复制这段内容后打开百度网盘手机App,操作更方便哦
链接:https://pan.baidu.com/s/16iGJXN0Gn1bOh37ctuGMCA
提取码:uwk1
复制这段内容后打开百度网盘手机App,操作更方便哦
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表