File tree 10 files changed +68
-11
lines changed
10 files changed +68
-11
lines changed Original file line number Diff line number Diff line change 1
1
name : Compilability check
2
- on : [push, pull_request]
2
+ on : [ push, pull_request ]
3
3
jobs :
4
4
build :
5
5
runs-on : ubuntu-22.04
18
18
- name : Executing the script
19
19
run : |
20
20
export ANDROID_SDK_HOME=$ANDROID_HOME
21
- export ANDROID_NDK_HOME=$ANDROID_NDK
22
- ./ffmpeg-android-maker.sh -dav1d -android=19 - abis=${{ matrix.abi }}
21
+ export ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME
22
+ ./ffmpeg-android-maker.sh -dav1d -abis=${{ matrix.abi }}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ The script also produces `ffmpeg` and `ffprobe` executables that can be used in
13
13
14
14
The main focus of ffmpeg-android-maker is to prepare shared libraries for seamless integration into an Android project. The script prepares the ` output ` directory that is meant to be used. And it's not the only thing this project does.
15
15
16
- By default this script downloads and builds the FFmpeg ** 6.0 ** , but the version can be overridden.
16
+ By default this script downloads and builds the FFmpeg ** 6.1 ** , but the version can be overridden.
17
17
18
18
The details of how this script is implemented are described in this series of posts:
19
19
* [ Part 1] ( https://proandroiddev.com/a-story-about-ffmpeg-in-android-part-i-compilation-898e4a249422 )
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ FREETYPE_VERSION=2.13.2
6
6
7
7
downloadTarArchive \
8
8
" libfreetype" \
9
- " https://nav.dl.sourceforge.net/project /freetype/freetype2/ ${FREETYPE_VERSION} /freetype-${FREETYPE_VERSION} .tar.gz"
9
+ " https://download.savannah.gnu.org/releases /freetype/freetype-${FREETYPE_VERSION} .tar.gz"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # libaom doesn't support building while being in its root directory
4
+ CMAKE_BUILD_DIR=libx265_build_${ANDROID_ABI}
5
+ rm -rf ${CMAKE_BUILD_DIR}
6
+ mkdir ${CMAKE_BUILD_DIR}
7
+ cd ${CMAKE_BUILD_DIR}
8
+
9
+ EXTRA_CMAKE_ARG=" "
10
+ case $ANDROID_ABI in
11
+ arm64-v8a|x86)
12
+ # Disabling assembler optimizations for certain ABIs. Not a good solution, but it at least works
13
+ EXTRA_CMAKE_ARG=" -DENABLE_ASSEMBLY=OFF"
14
+ ;;
15
+ esac
16
+
17
+ ${CMAKE_EXECUTABLE} ../source \
18
+ -DANDROID_PLATFORM=${ANDROID_PLATFORM} \
19
+ -DANDROID_ABI=${ANDROID_ABI} \
20
+ -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME} /build/cmake/android.toolchain.cmake \
21
+ -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
22
+ -DENABLE_PIC=ON \
23
+ -DENABLE_SHARED=OFF \
24
+ -DENABLE_CLI=OFF \
25
+ $EXTRA_CMAKE_ARG
26
+
27
+ EXTRA_SED_ARG=" "
28
+ if [[ " $OSTYPE " == " darwin" * ]]; then
29
+ EXTRA_SED_ARG=" ''"
30
+ fi
31
+ sed -i $EXTRA_SED_ARG ' s/-lpthread/-pthread/' CMakeFiles/cli.dir/link.txt
32
+ sed -i $EXTRA_SED_ARG ' s/-lpthread/-pthread/' CMakeFiles/x265-shared.dir/link.txt
33
+ sed -i $EXTRA_SED_ARG ' s/-lpthread/-pthread/' CMakeFiles/x265-static.dir/link.txt
34
+
35
+ export FFMPEG_EXTRA_LD_FLAGS=" ${FFMPEG_EXTRA_LD_FLAGS} -lm -lc++"
36
+
37
+ ${MAKE_EXECUTABLE} -j${HOST_NPROC}
38
+ ${MAKE_EXECUTABLE} install
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ source ${SCRIPTS_DIR} /common-functions.sh
4
+
5
+ LIBX265_VERSION=3.5
6
+
7
+ downloadTarArchive \
8
+ " libx265" \
9
+ " https://bitbucket.org/multicoreware/x265_git/downloads/x265_${LIBX265_VERSION} .tar.gz"
Original file line number Diff line number Diff line change
1
+ include ("$ENV{ANDROID_NDK_HOME} /build/cmake/android.toolchain.cmake" )
2
+
3
+ if ("${CMAKE_SYSTEM_PROCESSOR} " STREQUAL "i686" )
4
+ set (CMAKE_C_FLAGS "-mpclmul -msse2 -maes" )
5
+ endif ()
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ cd ${CMAKE_BUILD_DIR}
11
11
${CMAKE_EXECUTABLE} .. \
12
12
-DANDROID_PLATFORM=${ANDROID_PLATFORM} \
13
13
-DANDROID_ABI=${ANDROID_ABI} \
14
- -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME} /build/cmake/ android.toolchain .cmake \
14
+ -DCMAKE_TOOLCHAIN_FILE=${SCRIPTS_DIR} /mbedtls/ android.cmake \
15
15
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
16
16
-DENABLE_TESTING=0
17
17
Original file line number Diff line number Diff line change 2
2
3
3
source ${SCRIPTS_DIR} /common-functions.sh
4
4
5
- export MBEDTLS_VERSION=3.4 .1
5
+ export MBEDTLS_VERSION=3.5 .1
6
6
downloadTarArchive \
7
7
" mbedtls" \
8
8
" https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${MBEDTLS_VERSION} .tar.gz" \
Original file line number Diff line number Diff line change 7
7
# Can be overridden with specific arguments.
8
8
# See the end of this file for more description.
9
9
ABIS_TO_BUILD=()
10
- API_LEVEL=19
10
+ API_LEVEL=21
11
11
SOURCE_TYPE=TAR
12
- SOURCE_VALUE=6.0
12
+ SOURCE_VALUE=6.1
13
13
EXTERNAL_LIBRARIES=()
14
14
FFMPEG_GPL_ENABLED=false
15
15
@@ -32,6 +32,7 @@ SUPPORTED_LIBRARIES_FREE=(
32
32
# All GPL libraries that are supported
33
33
SUPPORTED_LIBRARIES_GPL=(
34
34
" libx264"
35
+ " libx265"
35
36
)
36
37
37
38
for argument in " $@ " ; do
@@ -113,6 +114,10 @@ for argument in "$@"; do
113
114
EXTERNAL_LIBRARIES+=(" libx264" )
114
115
FFMPEG_GPL_ENABLED=true
115
116
;;
117
+ --enable-libx265 | -x265)
118
+ EXTERNAL_LIBRARIES+=(" libx265" )
119
+ FFMPEG_GPL_ENABLED=true
120
+ ;;
116
121
--enable-mbedtls | -mbedtls)
117
122
EXTERNAL_LIBRARIES+=(" mbedtls" )
118
123
;;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM --platform=linux/amd64 ubuntu:22.04
3
3
# Arguments that can be overridden in 'docker build' command:
4
4
# Versions of Android SDK and NDK. The CMake is installed via NDK.
5
5
ARG VERSION_SDK=10406996
6
- ARG VERSION_NDK=25.2.9519653
6
+ ARG VERSION_NDK=26.1.10909125
7
7
ARG VERSION_CMAKE=3.22.1
8
8
9
9
# Package to install via pip3
@@ -25,7 +25,7 @@ RUN apt-get --allow-releaseinfo-change update && apt-get install -y --no-install
25
25
python3-wheel \
26
26
ninja-build \
27
27
build-essential \
28
- openjdk-8 -jdk-headless \
28
+ openjdk-17 -jdk-headless \
29
29
curl \
30
30
unzip \
31
31
bash \
You can’t perform that action at this time.
0 commit comments