1. 编译srt
1.1 下载及编译srt代码
git clone https://github.com/Haivision/srt.git
cd srt
./configure
make && make install //或者使用clion的cmake
2. 安装ffmepg之间的准备
依赖ffmpeg动态库,libsrt, libx264, lib265, libfdk_aac等。
2.1 检查是否安装openssl
cmd$ pkg-config --list-all|grep openssl
openssl OpenSSL - Secure Sockets Layer and cryptography libraries and tools
如果已经成功安装,则略过,否则执行
brew install openssl
brew link openssl --force //必须要执行
可能需要执行:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig"
libx264
wget https://johnvansickle.com/ffmpeg/release-source/libx264-git.tar.xz
xz -d libx264-git.tar.xz
tar -xvf libx264-git.tar
cd ./libx264-git
./configure
make -j 2
mak