1、下载ffmpeg-4.2.3代码
2、配置(编译静态库)
./configure --target-os=linux --prefix=$(pwd)/temp --enable-cross-compile --arch=arm --cc=arm-hisiv300-linux-gcc --cross-prefix=arm-hisiv300-linux- --nm=arm-hisiv300-linux-nm --disable-shared --enable-static --enable-gpl --enable-swscale --enable-avfilter --disable-devices --disable-filters
配置结果:(忽略)
WARNING: arm-hisiv300-linux-pkg-config not found, library detection may fail.
config.h is unchanged
libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged
ffbuild/config.sh is unchanged
3、编译
make -j4
4、安装到指定目录(ffmpeg-4.2.3/temp)
make install
5、生成四个目录
bin
include
lib
share
6、移植
将include lib目录下的内容进行移植即可。