- 如果你还没有FFmpeg.so文件,前请往获取:FFmpeg编译Android端so文件纪要(附资源下载)
前言: 在这个过程中请尽量克制你的小心思,按照步骤走通后再展现你的骚操作。
1、AndroidStudio创建C++工程
2、拷贝include文件夹(跟ffmpeg一起生成的)以及ffmpeg.so文件到工程中
3、打开CMakeLists文件,加入ffmpeg,如下:
- ${CMAKE_SOURCE_DIR} 标识CMakeLists所在目录地址
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.4.1)
#Creates and names a library, sets it as eith