Skip to content

Commit

Permalink
update cmakelists and readme for android libs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnut committed Oct 14, 2024
1 parent e0d1dd1 commit e94ecbc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,23 @@ if (WIN32)
mf mfplat mfuuid bcrypt strmiids.lib
) # windows
elseif (ANDROID)
set(STATIC_LIBS ...) # android
if (ANDROID_ABI STREQUAL "arm64-v8a")
set(STATIC_LIBS
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libavcodec.a
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libavformat.a
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libavutil.a
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libswresample.a
${CMAKE_SOURCE_DIR}/lib/arm64-v8a/libswscale.a
) # android
elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
set(STATIC_LIBS
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libavcodec.a
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libavformat.a
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libavutil.a
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libswresample.a
${CMAKE_SOURCE_DIR}/lib/armeabi-v7a/libswscale.a
) # android
endif()
else ()
set(STATIC_LIBS ...) # macos
endif()
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ void audioRaw() {

## Build instructions
### Windows
To get the needed libraries on Windows, you can use vcpkg
To get the needed libraries on Windows, you can use vcpkg:
```sh
vcpkg install ffmpeg[core,avcodec,avformat,avutil,swscale,swresample,amf,x264,x265,nvcodec]:x64-windows-static --recurse
```

## Android
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:
```sh
git clone https://github.com/EclipseMenu/ffmpeg-android-maker/
cd ffmpeg-android-maker
./ffmpeg-android-maker.sh
```
Read the README in the repository for further instructions.

You can either run it natively on Linux or using WSL on Windows.

0 comments on commit e94ecbc

Please sign in to comment.