x265 download and compile

X265 download and compile

Introduction

x265 is an open source free software and function library used to encode movies that comply with the High Efficiency Video Coding (HEVC/H.265) standard. Similar to the x264 project, x265 is provided under the GNU General Public License (GPL) 2 or commercial license.

download

(1) Use git to get the x265 library source code in the terminal

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

(2) Get Baidu Cloud Disk
Link: https://pan.baidu.com/s/1m6DOOI8dP5wiTDTU5KOaVQ Password: 2k83

The downloaded file is as follows:
Insert picture description here

Compile

(1) Create build.sh under x265, the file content is as follows:

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) Create x265_install path under the avtest path
(3) Execute compilation

cd ~/avtest/x265
sh build.sh

(4) View the compilation results.
Insert picture description here
Note: We need to modify pkgconfig here. If you do not modify it, there will be problems when compiling ffmpeg.
First look at the pkgconfig file:

Insert picture description here
Here we add the thread library after Libs.private: -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl, the modified as follows:

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

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42955871/article/details/111907265