H265安装记录
安装 yasm
./configure
make
make install
yasm --version
# yasm 1.3.0
# Compiled on Aug 28 2023.
安装 nasm
./configure
make
make install
/usr/local/bin/nasm --version
# NASM version 2.16.01 compiled on Aug 30 2023
``
### 安装 cmake -version
### 安装 x265
- 下载链接 http://ftp.videolan.org/pub/videolan/x265/
- 安装命令
```bash
cd x265_2.7/build/linux
./make-Makefiles.bash
make && make install
# Installing: /usr/local/lib/libx265.a
# Installing: /usr/local/include/x265.h
# Installing: /usr/local/include/x265_config.h
# Installing: /usr/local/lib/libx265.so.151
# Installing: /usr/local/lib/libx265.so
# Installing: /usr/local/lib/pkgconfig/x265.pc
# Installing: /usr/local/bin/x265
# 查看包安装情况
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
ls /usr/local/lib/pkgconfig
``
### 安装 x264
- 下载链接 https://www.videolan.org/developers/x264.html
- 安装命令
```bash
cd cd x264-master/
./configure --enable-shared --enable-static --disable-asm
make && make install
# 安装后的反馈信息
install -d /usr/local/bin
install x264 /usr/local/bin
install -d /usr/local/include
install -d /usr/local/lib/pkgconfig
install -m 644 ./x264.h x264_config.h /usr/local/include
install -m 644 x264.pc /usr/local/lib/pkgconfig
install -d /usr/local/lib
ln -f -s libx264.so.164 /usr/local/lib/libx264.so
install -m 755 libx264.so.164 /usr/local/lib
install -d /usr/local/lib
install -m 644 libx264.a /usr/local/lib
gcc-ranlib /usr/local/lib/libx264.a
install -d /usr/share/bash-completion/completions
install -m 644 ./tools/bash-autocomplete.sh /usr/share/bash-completion/completions/x264
``
### 编译FFmpeg
```bash
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --prefix="/usr/local/ffmpeg6" --target-os=linux --arch=x86_64 --disable-ffplay --disable-asm --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree
#License: nonfree and unredistributable
make -j 6
make install
vim /etc/ld.so.conf
# 添加一行
- /usr/local/lib
# 重新加载
ldconfig
/usr/local/ffmpeg6/bin/ffmpeg -version
```
### 安装 Zlmiakit
```bash
mkdir /home/myworkspace/vserver/serverkit/MediaKit/build
cd /home/myworkspace/vserver/serverkit/MediaKit/build
/home/myworkspace/vserver/serverkit/cmake-3.25.3/bin/cmake ..
make -j4
cd MediaKit/release/linux/Debug
#通过-h可以了解启动参数
./MediaServer -h
sudo ./MediaServer -d
#以守护进程模式启动
./MediaServer -d &
```