android編譯ffmpeg遇到的坑
1,參考https://www.jianshu.com/p/ca7ffd2e5e68
Makefile:2: config.mak: No such file or directory
Makefile:59: /common.mak: No such file or directory
先執行./configure才能生成config.mak檔案 後面就不會報錯了,我剛踩了這個坑
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/@anchor{ <-- HERE (?:[^}]*)}/ at ./doc/texi2pod.pl line 376.
doc/Makefile:66: recipe for target 'doc/ffmpeg.pod' failed
make: *** [doc/ffmpeg.pod] Error 255
doc/texi2pod.pl line 376格式有問題,手動改一下
/bin/sh: ranlib/usr/local/lib/libavdevice.a: No such file or directory
make: *** [install-libavdevice-static] Error 127
出錯後發現這是由於LIB_INSTALL_EXTRA_CMD='$$(RANLIB)"$(LIBDIR)/$(LIBNAME)"'這個命令少打了一個空格的關係= =,應該改為LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"',網路上挺多教程這裡都少了空格,希望大家遇到問題的時候注意
5,3.x的ffmpeg沒有在當前目錄生成so檔案
需要./configure 時加引數 --enable-shared
最後會在/usr/local/lib目錄下生成so檔案