Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0a787c8
update project README
tanersener Nov 8, 2024
6cf36b4
dont run github actions with xcode 14 on sonoma
tanersener Nov 8, 2024
826fbb7
drop macos-11 from github actions
tanersener Nov 9, 2024
ea8e8de
Merge pull request #1061 from arthenica/main-doc-update
tanersener Nov 9, 2024
fb2ebfd
fix weekly builds
tanersener Nov 19, 2024
17ea9e3
Merge pull request #1069 from arthenica/github-actions-fix
tanersener Nov 19, 2024
08c0f60
Add retirement notice to the README.md
tanersener Jan 6, 2025
fbbc6d0
Update index.md
tanersener Jan 6, 2025
35b99c0
Update README.md
tanersener Jan 17, 2025
cd7fabc
add mobileffmpeg side
AliAkhgar Feb 25, 2025
a9f7128
rename mobileffmpeg to ffmpegkit for so files
AliAkhgar Feb 25, 2025
29323dc
remove mobileffmpeg due to incompatibility
AliAkhgar Feb 25, 2025
53c44e4
added 16KB page size flags
AliAkhgar Feb 25, 2025
b2595dd
Update README.md
AliAkhgar Feb 25, 2025
f5f30b6
bump android targetSDK to 35
AliAkhgar May 17, 2025
094de85
bump targetSDK for android
AliAkhgar May 17, 2025
5e266ef
bump targetSDK for LTS
AliAkhgar May 17, 2025
f63df34
Update README.md
AliAkhgar Jun 1, 2025
f69f96e
add package manager links for replacements
tanersener Jun 23, 2025
1036d3c
Merge pull request #1164 from arthenica/doc-update
tanersener Jun 23, 2025
8121bc9
Merge pull request #4 from arthenica/main
AliAkhgar Jul 11, 2025
3aac919
Get android.sh --full to compile
SpiritCroc Jul 29, 2025
2b44324
Merge remote-tracking branch 'AliAkhgar/main' into android-main
SpiritCroc Jul 30, 2025
99bcb70
Add release maven task
SpiritCroc Jul 30, 2025
d9ce4e4
Merge branch 'android'
SpiritCroc Aug 20, 2025
eb3badb
Fix libavutil/emms.h path
SpiritCroc Aug 20, 2025
b935edb
Fix libaom arm64 build
SpiritCroc Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-build-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-macos:
name: android lts on macos
runs-on: macos-11
runs-on: macos-12
strategy:
matrix:
ndk-version: [ 'r22b-darwin-x86_64', 'r23b-darwin' ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-build-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: [ '15.4' ]
xcode: [ '15.4', '16.0' ]
defaults:
run:
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-build-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: [ '14.3.1', '15.3' ]
xcode: [ '15.4', '16.0' ]
defaults:
run:
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/periodic-builds-apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: [ '14.3.1', '15.3' ]
xcode: [ '15.4', '16.0' ]
branches: [ 'main', 'development' ]
defaults:
run:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: [ '14.3.1', '15.3' ]
xcode: [ '15.4', '16.0' ]
branches: [ 'main', 'development' ]
defaults:
run:
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: [ '14.3.1', '15.3' ]
xcode: [ '15.4', '16.0' ]
branches: [ 'main', 'development' ]
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tvos-build-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: [ '14.3.1', '15.3' ]
xcode: [ '15.4', '16.0' ]
defaults:
run:
shell: bash
Expand Down
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
# 16KB Page Size Update
This fork only aims to make ffmpeg-kit compatible with new android versions (API 35) which request all binaries to be rebuilt.
Google request developers to build new with new r27 and r28 ndk but ffmpeg-kit has its own NDK compatibility table which supports only upto r25.</p>
<i>Edit: As original devs said, master branch has been tested upto NDK r27.</i>

</p>
Lucky for us, there is a version of ndk r23 and r25 in CI which supports 16KB page sizes too.
make sure to download this ndk version and compile ffmpeg-kit with this ndk only.<br/>
NDK : <a href="https://ci.android.com/builds/branches/aosp-ndk-release-r23/grid">R23</a> <a href="https://ci.android.com/builds/branches/aosp-ndk-r25-release/grid">R25</a>
</p>
You can find all details related to this update here. https://developer.android.com/guide/practices/page-sizes
</br>

# FFmpegKit ![GitHub release](https://img.shields.io/badge/release-v6.0-blue.svg) ![Maven Central](https://img.shields.io/maven-central/v/com.arthenica/ffmpeg-kit-min) ![CocoaPods](https://img.shields.io/cocoapods/v/ffmpeg-kit-ios-min) ![pub](https://img.shields.io/pub/v/ffmpeg_kit_flutter.svg) ![npm](https://img.shields.io/npm/v/ffmpeg-kit-react-native.svg)

## Notice
FFmpegKit has been officially retired. There will be no further `ffmpeg-kit` releases.

See [Saying Goodbye to FFmpegKit @ medium](https://medium.com/@tanersener/saying-goodbye-to-ffmpegkit-33ae939767e1) to learn why we made this decision.

All previously released `ffmpeg-kit` binaries will be removed according to the following schedule.

| FFmpegKit Version | Available Until |
|:-----------------:|:------------------:|
| Less than 6.0 | February 1st, 2025 |
| 6.0 | April 1st, 2025 |

Thank you for your support and interest in this project.

If you're looking for a replacement, please check out the community-maintained forks available through the package managers below.

| Platform |
|:-------------------------------------------------------:|
| [Android](https://central.sonatype.com/search?q=ffmpeg+kit) |
| [Flutter](https://pub.dev/packages?q=ffmpeg+kit) |
| [React Native](https://www.npmjs.com/search?q=ffmpeg%20kit) |

<img src="https://github.com/arthenica/ffmpeg-kit/blob/main/docs/assets/ffmpeg-kit-icon-v9.png" width="240">

`FFmpegKit` is a collection of tools to use `FFmpeg` in `Android`, `iOS`, `Linux`, `macOS`, `tvOS`, `Flutter` and `React Native` applications.
`FFmpegKit` is a collection of tools to use `FFmpeg`<sup>1</sup> in `Android`, `iOS`, `Linux`, `macOS`, `tvOS`, `Flutter` and `React Native` applications.

It includes scripts to build `FFmpeg` native libraries, a wrapper library to run `FFmpeg`/`FFprobe` commands in
applications and 8 prebuilt binary packages available at [Github](https://github.com/arthenica/ffmpeg-kit/releases),
Expand Down Expand Up @@ -219,11 +254,15 @@ that you seek legal advice first. See [FFmpeg Patent Mini-FAQ](https://ffmpeg.or
distribute that library, then you are subject to pay MPEG LA licensing fees. Refer to
[OpenH264 FAQ](https://www.openh264.org/faq.html) page for the details.

### 16. Contributing
### 16. Trademarks

<sup>1</sup> `FFmpeg` is a trademark of [Fabrice Bellard](http://www.bellard.org/). `FFmpegKit` is an independent project and not affiliated with the `FFmpeg` trademark holder.

### 17. Contributing

See our [CONTRIBUTING](CONTRIBUTING.md) guide.

### 17. See Also
### 18. See Also

- [FFmpeg API Documentation](https://ffmpeg.org/doxygen/4.0/index.html)
- [FFmpeg Wiki](https://trac.ffmpeg.org/wiki/WikiStart)
Expand Down
17 changes: 16 additions & 1 deletion android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ echo -e "INFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1
export GPL_ENABLED="no"
DISPLAY_HELP=""
BUILD_FULL=""
BUILD_RELEASE=""
BUILD_TYPE_ID=""
BUILD_VERSION=$(git describe --tags --always 2>>"${BASEDIR}"/build.log)

Expand Down Expand Up @@ -104,6 +105,10 @@ while [ ! $# -eq 0 ]; do
--full)
BUILD_FULL="1"
;;
--full-release)
BUILD_FULL="1"
BUILD_RELEASE="1"
;;
--enable-gpl)
export GPL_ENABLED="yes"
;;
Expand Down Expand Up @@ -153,7 +158,10 @@ fi
# PROCESS FULL OPTION AS LAST OPTION
if [[ -n ${BUILD_FULL} ]]; then
for library in {0..61}; do
if [ ${GPL_ENABLED} == "yes" ]; then
libname="$(get_library_name $library)"
if [ "$libname" = gnutls ]; then
:
elif [ ${GPL_ENABLED} == "yes" ]; then
enable_library "$(get_library_name $library)" 1
else
if [[ $(is_gpl_licensed $library) -eq 1 ]]; then
Expand Down Expand Up @@ -374,6 +382,13 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then
echo -e "failed\n"
exit 1
fi
if [[ ${BUILD_RELEASE} -eq 1 ]]; then
./gradlew publishReleasePublicationToGitHubPackagesRepository 1>>"${BASEDIR}"/build.log 2>&1
if [ $? -ne 0 ]; then
echo -e "release failed, check build.log for details\n"
exit 1
fi
fi

# COPY ANDROID ARCHIVE TO PREBUILT DIRECTORY
FFMPEG_KIT_AAR="${BASEDIR}/prebuilt/$(get_aar_directory)/ffmpeg-kit"
Expand Down
32 changes: 30 additions & 2 deletions android/ffmpeg-kit-android-lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
if (project.android.hasProperty("namespace")) {
namespace 'com.arthenica.ffmpegkit'
}
compileSdk 33
compileSdk 35
ndkVersion "22.1.7171670"

defaultConfig {
minSdk 24
targetSdk 33
targetSdk 35
versionCode 240600
versionName "6.0"
project.archivesBaseName = "ffmpeg-kit"
Expand Down Expand Up @@ -41,6 +42,7 @@ android {
}
}


publishing {
singleVariant('release') {
withJavadocJar()
Expand All @@ -63,3 +65,29 @@ dependencies {
testImplementation "androidx.test.ext:junit:1.1.5"
testImplementation 'org.json:json:20230618'
}

// GitHub Packages publishing configuration
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release

groupId = 'com.arthenica'
artifactId = 'ffmpeg-kit-full'
version = "6.0-3"
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/beeper/beeper-android")
credentials {
username = System.getenv("GITHUB_USERNAME") ?: providers.gradleProperty("githubUsername")
password = System.getenv("GITHUB_TOKEN") ?: providers.gradleProperty("githubPassword")
}
}
}
}
}
10 changes: 10 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# FFmpegKit

## Notice
FFmpegKit has been officially retired. There will be no further `ffmpeg-kit` releases. All previously released `ffmpeg-kit` binaries will be removed according to the following schedule. Thank you for your support and interest in this project.

Thank you for your support and contributions over the course of this project.

| FFmpegKit Version | Available Until |
|:-----------------:|:------------------:|
| Less than 6.0 | February 1st, 2025 |
| 6.0 | April 1st, 2025 |

<img src="https://github.com/arthenica/ffmpeg-kit/raw/main/docs/assets/ffmpeg-kit-icon-v9.png" width="180">

`FFmpegKit` is a collection of tools to use `FFmpeg` in `Android`, `iOS`, `Linux`, `macOS`, `tvOS`, `Flutter` and `React Native` applications.
Expand Down
2 changes: 1 addition & 1 deletion scripts/android/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/x86/asm.h "${FFMPEG_LIBRARY_PAT
overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/x86/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/x86/timer.h 1>>"${BASEDIR}"/build.log 2>&1
overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/arm/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/arm/timer.h 1>>"${BASEDIR}"/build.log 2>&1
overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/aarch64/timer.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/aarch64/timer.h 1>>"${BASEDIR}"/build.log 2>&1
overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/x86/emms.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/x86/emms.h 1>>"${BASEDIR}"/build.log 2>&1
overwrite_file "${BASEDIR}"/src/ffmpeg/libavutil/emms.h "${FFMPEG_LIBRARY_PATH}"/include/libavutil/emms.h 1>>"${BASEDIR}"/build.log 2>&1

if [ $? -eq 0 ]; then
echo "ok"
Expand Down
11 changes: 5 additions & 6 deletions scripts/android/libaom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ git checkout ${BASEDIR}/src/${LIB_NAME}/aom_ports 1>>"${BASEDIR}"/build.log 2>&1
ASM_OPTIONS=""
case ${ARCH} in
arm-v7a)
ASM_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=0 -DHAVE_NEON=0"
ASM_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=0 -DHAVE_NEON=0 -DAOM_TARGET_CPU=generic"
;;
arm-v7a-neon)
ASM_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
ASM_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1 -DAOM_TARGET_CPU=generic"
;;
arm64-v8a)
ASM_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
ASM_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1 -DAOM_TARGET_CPU=arm64"
;;
x86)
ASM_OPTIONS="-DENABLE_SSE=1 -DHAVE_SSE=1 -DENABLE_SSE3=1 -DHAVE_SSE3=1"
ASM_OPTIONS="-DENABLE_SSE=1 -DHAVE_SSE=1 -DENABLE_SSE3=1 -DHAVE_SSE3=1 -DAOM_TARGET_CPU=generic"
;;
x86-64)
ASM_OPTIONS="-DENABLE_SSE4_2=1 -DHAVE_SSE4_2=1"
ASM_OPTIONS="-DENABLE_SSE4_2=1 -DHAVE_SSE4_2=1 -DAOM_TARGET_CPU=generic"
;;
esac

Expand Down Expand Up @@ -48,7 +48,6 @@ cmake -Wno-dev \
-DENABLE_EXAMPLES=0 \
-DENABLE_TOOLS=0 \
-DCONFIG_UNIT_TESTS=0 \
-DAOM_TARGET_CPU=generic \
-DBUILD_SHARED_LIBS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1

make -j$(get_cpu_count) || return 1
Expand Down
13 changes: 11 additions & 2 deletions scripts/android/libiconv.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#!/bin/bash

# INIT SUBMODULES
# FIX HARD-CODED PATHS
${SED_INLINE} 's|git://git.savannah.gnu.org|https://github.com/arthenica|g' "${BASEDIR}"/src/"${LIB_NAME}"/.gitmodules || return 1
./gitsub.sh pull || return 1
ln -s -f $(which aclocal) ${BASEDIR}/.tmp/aclocal-1.16
ln -s -f $(which automake) ${BASEDIR}/.tmp/automake-1.16
PATH="${BASEDIR}/.tmp":$PATH

if [[ ! -d "${BASEDIR}"/src/"${LIB_NAME}"/gnulib ]]; then

# INIT SUBMODULES
./gitsub.sh pull || return 1
./gitsub.sh checkout gnulib 485d983b7795548fb32b12fbe8370d40789e88c4 || return 1
fi

# ALWAYS CLEAN THE PREVIOUS BUILD
make distclean 2>/dev/null 1>/dev/null
Expand Down
2 changes: 1 addition & 1 deletion scripts/android/openssl.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [[ ${ARCH} == "x86" ]]; then
if [[ ${ARCH} == "x86" ]] && false; then

# openssl does not support 32-bit apple architectures
echo -e "ERROR: openssl is not supported on $ARCH architecture for $FFMPEG_KIT_BUILD_TYPE platform.\n" 1>>"${BASEDIR}"/build.log 2>&1
Expand Down
3 changes: 0 additions & 3 deletions scripts/apple/libogg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libogg} -e
autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1
fi

# FIX INCLUDE PATHS
${SED_INLINE} 's/sys\/types/stdint/g' ${BASEDIR}/src/libogg/include/ogg/os_types.h

./configure \
--prefix="${LIB_INSTALL_PREFIX}" \
--with-pic \
Expand Down
7 changes: 5 additions & 2 deletions scripts/function-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ APP_PLATFORM := android-${API}

APP_CFLAGS := -O3 -DANDROID ${LTS_BUILD_FLAG}${BUILD_DATE} -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable

APP_LDFLAGS := -Wl,--hash-style=both
APP_LDFLAGS := "-Wl,-z,max-page-size=16384,--hash-style=both"
EOF
}

Expand Down Expand Up @@ -390,6 +390,9 @@ get_cxxflags() {
rubberband | srt | tesseract | zimg)
echo "-std=c++11 ${OPTIMIZATION_FLAGS}"
;;
tiff)
echo "-std=gnu99 -fno-exceptions -fno-rtti ${OPTIMIZATION_FLAGS}"
;;
*)
echo "-std=c++11 -fno-exceptions -fno-rtti ${OPTIMIZATION_FLAGS}"
;;
Expand Down Expand Up @@ -482,7 +485,7 @@ get_ldflags() {
fi
local COMMON_LINKED_LIBS=$(get_common_linked_libraries "$1")

echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS} -Wl,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a"
echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS} -Wl,-z,max-page-size=16384,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a"
}

create_mason_cross_file() {
Expand Down
Loading
Loading