@mtd1410/react-native-ffmpegkit
v8.1.2
Published
FFmpegKit for React Native (New Architecture / TurboModule)
Maintainers
Readme
FFmpegKit (community rebuild)
A community-maintained rebuild of
arthenica/ffmpeg-kitfor Android and iOS.
Table of contents
About
The original ffmpeg-kit by Arthenica has been officially retired — the project is no longer maintained and all of its previously released prebuilt binaries are being removed from the package registries.
Because our applications still depend on it, this repository rebuilds and republishes the binaries so they remain installable.
A few important notes:
- No GPL builds. To avoid
GPLlicensing obligations, noGPL-licensed libraries (e.g.x264,x265,xvidcore,vid.stab) are enabled and no-gplpackages are published. Everything here is built underLGPL v3.0. - FFmpeg version. Currently built against FFmpeg 7.1.
- Platforms. Only Android and iOS are supported and published.
Usage
Replace min with whichever package (min, https, audio, video, full) you need.
For the full API (running commands, sessions, callbacks, FFprobe, etc.) see the per-platform guides.
iOS (CocoaPods)
# Podfile
pod 'ffmpeg-mobile-min', '~> 7.1'
# pod 'ffmpeg-mobile-https', '~> 7.1'
# pod 'ffmpeg-mobile-audio', '~> 7.1'
# pod 'ffmpeg-mobile-video', '~> 7.1'
# pod 'ffmpeg-mobile-full', '~> 7.1'See apple/README.md for the iOS API.
Android (Gradle)
Published to Maven Central under the io.github.maitrungduc1410 group.
dependencies {
implementation 'io.github.maitrungduc1410:ffmpeg-kit-min:7.1.5'
// implementation 'io.github.maitrungduc1410:ffmpeg-kit-https:7.1.5'
// implementation 'io.github.maitrungduc1410:ffmpeg-kit-audio:7.1.5'
// implementation 'io.github.maitrungduc1410:ffmpeg-kit-video:7.1.5'
// implementation 'io.github.maitrungduc1410:ffmpeg-kit-full:7.1.5'
}See android/README.md for the Android API.
React Native
For React Native apps, use the @mtd1410/react-native-ffmpegkit package. It is built
for the New Architecture (TurboModule + Codegen) and wraps the same prebuilt binaries published here.
npm install @mtd1410/react-native-ffmpegkitimport { FFmpegKit, ReturnCode } from '@mtd1410/react-native-ffmpegkit';
FFmpegKit.execute('-i file1.mp4 -c:v mpeg4 file2.mp4').then(async (session) => {
const returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
// SUCCESS
}
});See react-native/README.md for installation, selecting a package variant,
and the full JavaScript API usage.
Use the latest published version; the examples above may not reflect the most recent release.
Packages
There are five packages, each enabling a different set of external and system libraries. Pick the smallest one that includes the features you need.
- On
iOS,iconvis provided by the system, solibiconvlisted above applies to theAndroidbuilds only.
Package size
Approximate size each variant adds to your app per platform and FFmpeg version. Pick the smallest variant that has the features you need. Numbers are uncompressed unless noted.
Measurement basis — Android: per-ABI native libs from the
.aar(arm64-v8a); iOS:.xcframeworkdevice slice (arm64). Your final app-download size after store compression/thinning will be smaller.
See more here: https://github.com/maitrungduc1410/ffmpeg-kit/releases
Android
| Variant | v6.0.6 | v7.1.5 |
| ------- | -----: | -----: |
| min | 13.4 MB | 14.3 MB |
| https | 15.5 MB | 16.4 MB |
| audio | 18.4 MB | 19.3 MB |
| video | 21.6 MB | 22.5 MB |
| full | 25.4 MB | 26.2 MB |
iOS
| Variant | v6.0.6 | v7.1.5 |
| ------- | -----: | -----: |
| min | 68 MB | 72.8 MB |
| https | 78.2 MB | 82.9 MB |
| audio | 76.3 MB | 81 MB |
| video | 91.9 MB | 96.4 MB |
| full | 109 MB | 113 MB |
Releasing
For maintainers. The platform builds run automatically on push (
android build scripts/ios build scripts) and upload their artifacts. Releasing is a separate, manual step that reuses those artifacts — nothing is rebuilt.
Run Actions → publish → Run workflow and set:
release_version— e.g.6.0.6(used for the release tags, the CocoaPods version, and the Maven version).publish_ios/publish_android— toggle either platform on/off.ios_build_run_id/android_build_run_id— optional; leave blank to use the latest successful build onmain, or pin a specific build run to publish from.source_repo— optional;owner/repoto pull the prebuilt artifacts from instead of this repo (e.g. a clone repo where CI runs the long builds, so the main repo only spends quota on publishing). Requires aCLONE_REPO_TOKENsecret — a PAT that can read that repo's Actions (a classic PAT withpublic_repo, or a fine-grained PAT created under the source repo's owner with Actions: Read). Leave blank to use this repo.
What it does:
- GitHub Releases — iOS xcframework zips on tag
ios-<version>(consumed by CocoaPods), Android.aars on tagandroid-<version>(direct-download mirror). - CocoaPods — pushes the five
ffmpeg-mobile-*podspecs to trunk. - Maven Central — publishes the five
io.github.maitrungduc1410:ffmpeg-kit-*artifacts.
Required repository secrets: COCOAPODS_TRUNK_TOKEN (iOS) and MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD, GPG_SIGNING_KEY, GPG_SIGNING_KEY_ID, GPG_SIGNING_PASSWORD (Android). Optionally CLONE_REPO_TOKEN when source_repo is used.
