x265下载及编译

8 篇文章 4 订阅
6 篇文章 4 订阅

X265下载及编译

简介

x265是一个用于编码符合高效率视频编码(HEVC/H.265)标准的影片的开源自由软件及函数库。与x264项目类似,x265使用GNU通用公共许可证(GPL)2授权或商业许可证授权提供。

下载

(1) 在终端运使用git获取x265库源码

cd ~/av
git clone https://github.com/videolan/x265.git

(2) 百度云盘获取
链接: https://pan.baidu.com/s/1m6DOOI8dP5wiTDTU5KOaVQ 密码: 2k83

下载后文件如下:
在这里插入图片描述

编译

(1) 在x265下创建build.sh,文件内容如下:

cur_dir=$(cd "$(dirname "$0")"; pwd)
echo $cur_dir

path_build=$cur_dir/../x265_install

cd "$cur_dir/build/linux"
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$path_build" -DENABLE_SHARED:bool=off ../../source

(2) 在avtest路径下创建 x265_install 路径
(3) 执行编译

cd ~/avtest/x265
sh build.sh
cd  build/linux
make 
make install

(4) 编译结果查看
在这里插入图片描述
注意: 我们这里需要修改下pkgconfig,若是不修改在编译ffmpeg时会有问题。
首先查看pkgconfig文件:

在这里插入图片描述
这里我们在Libs.private: -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl后增加线程库,修改后如下:

Libs.private: -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lpthread

在这里插入图片描述

Open Source (GPL) H.265/HEVC video encoder 下载网址:https://bitbucket.org/multicoreware/x265/src x265 developer wiki To compile x265 you must first install Mercurial (or TortoiseHg on Windows) and CMake. Then follow these easy steps: (for the most definitive instructions, consult our build README) Linux Instructions # ubuntu packages: $ sudo apt-get install mercurial cmake cmake-curses-gui build-essential yasm # Note: if the packaged yasm is older than 1.2, you must download yasm-1.2 and build it $ hg clone https://bitbucket.org/multicoreware/x265 $ cd x265/build/linux $ ./make-Makefiles.bash $ make Windows (Visual Studio) Instructions $ hg clone https://bitbucket.org/multicoreware/x265 Then run make-solutions.bat in the build\ folder that corresponds to your favorite compiler, configure your build options, click 'configure', click 'generate', then close cmake-gui. You will be rewarded with an x265.sln file. Also see cmake documentation. Intel Compiler Instructions On Windows, you should open an Intel Compiler command prompt and within it run one of the make-makefiles.bat scripts in build/icl32 or build/icl64, then run nmake. On Linux, you can tell cmake to build Makefiles for icpc directly. This requires you to have configured Intel's compiler environment (by sourcing the appropriate shell script). For example: $ source /opt/intel/composer_xe_2013/bin/compilervars.sh intel64 $ cd repos/x265/build/linux $ export CXX=icpc $ export CC=icc $ ./make-Makefiles $ make Command line interface The Makefile/solution builds a static encoder.lib library and a standalone x265 executable that aims to be similar to x264 in its command line interface. Running without arguments shows you the command line help. Info Mission Statement Road Map TODO HOWTO add a new encoder performance primitive HOWTO Contribute patches to x265 HOWTO cross compile from Linux to Windows Coding Style Helpful links
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值