处理器:鲲鹏920
NPU:昇腾 310P3
操作系统:Kylin Linux Advanced Server V10
CANN:Ascend-cann-toolkit_8.0.RC1_linux-aarch64.run
FFmpeg:AscendFFmpegPlugin(不要用AscendFFmpeg)
AscendFFmpegPlugin下载地址:
https://gitee.com/ascend/mindxsdk-referenceapps/tree/master/mxVision/AscendFFmpegPlugin
//设置ASCEND_HOME
export ASCEND_HOME=/usr/local/Ascend //根据自己安装的目录,换路径
配置环境变量(方式一)
sudo ${ASCEND_HOME}/ascend-toolkit/set_env.sh
4,编译安装ffmpeg
(1)下载昇腾版ffmpeg扩展
https://gitee.com/ascend/mindxsdk-referenceapps/tree/master/mxVision/AscendFFmpegPlugin
(2)下载FFmpeg官方版本(n4.4.4)
https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.4
(3)开始编译
//首先将AscendFFmpegPlugin和FFmpeg分别下载解压后放在同级目录
cd FFmpeg-n4.4.4
patch -p1 -f < ../AscendFFmpegPlugin/ascend_ffmpeg.patch
//编译
./configure \
--enable-shared \
--extra-cflags=-I/usr/local/include \
--extra-ldflags=-L/usr/local/lib \
--extra-cflags="-I${ASCEND_HOME}/ascend-toolkit/latest/acllib/include" \
--extra-ldflags="-L${ASCEND_HOME}/ascend-toolkit/latest/acllib/lib64" \
--extra-libs="-lacl_dvpp_mpi -lascendcl" \
--extra-libs=-lpthread \
--enable-ascend
make -j8
sudo make install
如果提示找不到gcc, 修改configure文件。