1、安装freetype字体库,avfilter添加文字水印的依赖项;
下载freetype:https://www.freetype.org/download.html;
配置、编译、安装、读取版本信息
./configure
make
sudo make install
踩坑
1、gmake 错误
GNU make (>= 3.81) or makepp (>= 2.0) is required to build FreeType2.
Please try
MAKE=<GNU make command name> ./configure
or
MAKE="makepp --norc-substitution" ./configure
解决办法:
sudo apt install make
2、报错 no acceptable C compiler found in $PATH
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
2、x264安装
下载x264https://www.videolan.org/developers/x264.html
配置、编译、安装
./configure
make