Android编译ffmpeg常见错误

1.编译环境
FFmpeg 4.1
NDK android-ndk-r15c

2、错误1少文件

makefile:2: ffbuild/config.mak: no such file or directory

解决方法:
先不要执行make和make install,第一步先在ffmpeg-4.1下执行./configure,该命令会自动生成缺少的文件

3.错误2

../libavutil/libm.h:62: error: static declaration of 'lrint' follows non-static declaration
../libavutil/libm.h:69: error: static declaration of 'lrintf' follows non-static declaration
../libavutil/libm.h:76: error: static declaration of 'round' follows non-static declaration
../libavutil/libm.h:83: error: static declaration of 'roundf' follows non-static declaration
./libavutil/libm.h:90: error: static declaration of 'truncf' follows non-static declaration

解决方法:
config.h搜索lrint、lrintf、round、roundf等对应的字符

#define HAVE_LLRINT 1
#define HAVE_LLRINTF 1
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1

将对应的值改为1即可

3.错误3

ffmpeg yasm not found, use --disable-yasm

解决方法:
下载yasm ,重命名为yasm.exe ,放到MinGW\bin 目录下

4.错误4

libavformat/os_support.c: In function 'ff_gai_strerror':
libavformat/os_support.c:194:10: error: 'ERROR_NOT_ENOUGH_MEMORY' undeclared (first use in this function)

解决方法:

打开libavformat/os_support.h 文件,在其中增加 #include <winerror.h>

5.错误5

 [install-libavdevice-static] Error 127
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容