Skip to content

Commit f2d0404

Browse files
committed
Merge branch 'master' into media-file
# Conflicts: # .github/workflows/compilability_check.yml
2 parents f089f96 + ec66186 commit f2d0404

File tree

10 files changed

+68
-11
lines changed

10 files changed

+68
-11
lines changed

Diff for: .github/workflows/compilability_check.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Compilability check
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
44
build:
55
runs-on: ubuntu-22.04
@@ -18,5 +18,5 @@ jobs:
1818
- name: Executing the script
1919
run: |
2020
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 }}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The script also produces `ffmpeg` and `ffprobe` executables that can be used in
1313

1414
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.
1515

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.
1717

1818
The details of how this script is implemented are described in this series of posts:
1919
* [Part 1](https://proandroiddev.com/a-story-about-ffmpeg-in-android-part-i-compilation-898e4a249422)

Diff for: scripts/libfreetype/download.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ FREETYPE_VERSION=2.13.2
66

77
downloadTarArchive \
88
"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"

Diff for: scripts/libx265/build.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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

Diff for: scripts/libx265/download.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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"

Diff for: scripts/mbedtls/android.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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()

Diff for: scripts/mbedtls/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cd ${CMAKE_BUILD_DIR}
1111
${CMAKE_EXECUTABLE} .. \
1212
-DANDROID_PLATFORM=${ANDROID_PLATFORM} \
1313
-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 \
1515
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
1616
-DENABLE_TESTING=0
1717

Diff for: scripts/mbedtls/download.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source ${SCRIPTS_DIR}/common-functions.sh
44

5-
export MBEDTLS_VERSION=3.4.1
5+
export MBEDTLS_VERSION=3.5.1
66
downloadTarArchive \
77
"mbedtls" \
88
"https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${MBEDTLS_VERSION}.tar.gz" \

Diff for: scripts/parse-arguments.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# Can be overridden with specific arguments.
88
# See the end of this file for more description.
99
ABIS_TO_BUILD=()
10-
API_LEVEL=19
10+
API_LEVEL=21
1111
SOURCE_TYPE=TAR
12-
SOURCE_VALUE=6.0
12+
SOURCE_VALUE=6.1
1313
EXTERNAL_LIBRARIES=()
1414
FFMPEG_GPL_ENABLED=false
1515

@@ -32,6 +32,7 @@ SUPPORTED_LIBRARIES_FREE=(
3232
# All GPL libraries that are supported
3333
SUPPORTED_LIBRARIES_GPL=(
3434
"libx264"
35+
"libx265"
3536
)
3637

3738
for argument in "$@"; do
@@ -113,6 +114,10 @@ for argument in "$@"; do
113114
EXTERNAL_LIBRARIES+=("libx264")
114115
FFMPEG_GPL_ENABLED=true
115116
;;
117+
--enable-libx265 | -x265)
118+
EXTERNAL_LIBRARIES+=("libx265")
119+
FFMPEG_GPL_ENABLED=true
120+
;;
116121
--enable-mbedtls | -mbedtls)
117122
EXTERNAL_LIBRARIES+=("mbedtls")
118123
;;

Diff for: tools/docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM --platform=linux/amd64 ubuntu:22.04
33
# Arguments that can be overridden in 'docker build' command:
44
# Versions of Android SDK and NDK. The CMake is installed via NDK.
55
ARG VERSION_SDK=10406996
6-
ARG VERSION_NDK=25.2.9519653
6+
ARG VERSION_NDK=26.1.10909125
77
ARG VERSION_CMAKE=3.22.1
88

99
# Package to install via pip3
@@ -25,7 +25,7 @@ RUN apt-get --allow-releaseinfo-change update && apt-get install -y --no-install
2525
python3-wheel \
2626
ninja-build \
2727
build-essential \
28-
openjdk-8-jdk-headless \
28+
openjdk-17-jdk-headless \
2929
curl \
3030
unzip \
3131
bash \

0 commit comments

Comments
 (0)