Skip to content

Commit e94ecbc

Browse files
committed
update cmakelists and readme for android libs
1 parent e0d1dd1 commit e94ecbc

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

CMakeLists.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,23 @@ if (WIN32)
4343
mf mfplat mfuuid bcrypt strmiids.lib
4444
) # windows
4545
elseif (ANDROID)
46-
set(STATIC_LIBS ...) # android
46+
if (ANDROID_ABI STREQUAL "arm64-v8a")
47+
set(STATIC_LIBS
48+
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libavcodec.a
49+
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libavformat.a
50+
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libavutil.a
51+
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libswresample.a
52+
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libswscale.a
53+
) # android
54+
elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
55+
set(STATIC_LIBS
56+
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libavcodec.a
57+
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libavformat.a
58+
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libavutil.a
59+
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libswresample.a
60+
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libswscale.a
61+
) # android
62+
endif()
4763
else ()
4864
set(STATIC_LIBS ...) # macos
4965
endif()

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ void audioRaw() {
5757

5858
## Build instructions
5959
### Windows
60-
To get the needed libraries on Windows, you can use vcpkg
60+
To get the needed libraries on Windows, you can use vcpkg:
6161
```sh
6262
vcpkg install ffmpeg[core,avcodec,avformat,avutil,swscale,swresample,amf,x264,x265,nvcodec]:x64-windows-static --recurse
63+
```
64+
65+
## Android
66+
Clone [this](https://github.com/EclipseMenu/ffmpeg-android-maker/) repository and run ffmpeg-android-maker.sh, this will produce static libraries in the build folder:
67+
```sh
68+
git clone https://github.com/EclipseMenu/ffmpeg-android-maker/
69+
cd ffmpeg-android-maker
70+
./ffmpeg-android-maker.sh
71+
```
72+
Read the README in the repository for further instructions.
73+
74+
You can either run it natively on Linux or using WSL on Windows.

0 commit comments

Comments
 (0)