编者注
之前在Mac上简简单单就可以直接使用了,但是迁移到了CentOS,JavaCV获取相同的mov帧数时,总是获取0帧。在CentOS 6尝试编译各种缺少库,编译出现问题。这里仅仅只记录CentOS7
CentOS7
更新到最新环境
yum update
安装git
CentOS7刚刚安装好后是没有git的,需要重新安装git
yum install git -y
安装编译所使用的其他库
yum install -y autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
javacpp-presets
javacpp-presets项目,是由JavaCV作者团队创建的,自动编译OpenCV、ffmpeg等JavaCV所用到的基础类库的自动编译。
根据官方文档让安装java7以上和maven
yum install java -y
yum install maven -y
使用git下载javacpp-presets
cd ~/build
git clone https://github.com/bytedeco/javacpp-presets.git
javacpp-presets自动编译
cd ~/build/javacpp-presets/
./cppbuild.sh -platform linux-x86_64 clean
./cppbuild.sh -platform linux-x86_64 install
使用安装命令会下载各种要