ijkplayer: A Hard Look at Bilibili's FFmpeg-Based Player for Android and iOS
Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
At a glance
- What is it?
- ijkplayer wraps FFmpeg's ffplay into a MediaPlayer-like API for Android and iOS, with hardware decoding via MediaCodec and VideoToolbox. It is powerful but dated, with a README licence of LGPLv2.1 or later (GitHub metadata reports GPL-2.0) and a build process that demands patience.
- Who is it for?
- Adopt ijkplayer if you need a low-level, FFmpeg-based player with hardware decoding on both Android and iOS, and you can handle a manual build and a LGPLv2.1 license that may require legal review. Do not use it if you need native subtitle rendering, avfilter support, or a maintained project with regular releases.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Probably not. The repository last received commits 27 months ago, on August 13, 2024.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 17, 2026, and from our analysis. They are not legal advice.
Star history
- bilibili/ijkplayer33,235 ★ · +39
| Repository | 2026-08-18 | 2026-11-17 |
|---|---|---|
| bilibili/ijkplayer | 33.2k | 33.2k |
39 Stars in the last 91 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What ijkplayer Actually Solves
ijkplayer addresses a specific gap: developers who want a video player that behaves like the platform's native MediaPlayer or AVPlayer but need more codec and format coverage than those APIs provide. It is built directly on ffplay, FFmpeg's reference player, which means it inherits FFmpeg's broad format and codec support. The target user is an Android or iOS engineer who needs to play streams or files that the stock player rejects, such as certain online video formats with quirks. The README mentions a workaround for 'some buggy online video', which hints at real-world streaming problems. It is not for someone who wants a drop-in UI component; it is a library that gives you a MediaPlayer-like interface over FFmpeg.
How the Player Is Put Together
The architecture is split by platform. On Android, the core is a Java interface called IMediaPlayer, which mirrors the android.media.MediaPlayer API. The actual decoding happens in native C code, with FFmpeg doing the heavy lifting. Video output goes through NativeWindow or OpenGL ES 2.0, and audio through AudioTrack or OpenSL ES. Hardware decoding uses MediaCodec on API 16 and above, which covers Android 4.1 and later. On iOS, the API is IJKMediaPlayback, which is described as MediaPlayer.framework-like. Video output is OpenGL ES 2.0, audio goes through AudioQueue or AudioUnit, and hardware decoding uses VideoToolbox on iOS 8 and later. The player also supports alternative backends: you can swap in android.media.MediaPlayer or ExoPlayer on Android, and AVPlayer or the now-obsolete MPMoviePlayerController on iOS. That gives you a fallback if FFmpeg's software decoding is too slow or if a codec is not supported.
Getting It Running: Build Steps and Config Options
The build process is not a single command. It starts with cloning the repository and checking out the k0.8.8 branch. On Android, you run ./init-android.sh, then cd into android/contrib and run ./compile-ffmpeg.sh clean and ./compile-ffmpeg.sh all, followed by ./compile-ijk.sh all back in the android directory. Before that, you need to set ANDROID_SDK and ANDROID_NDK environment variables, and install Homebrew, git, and yasm on macOS. The README gives a specific NDK version: r10e. For iOS, the steps are similar with ./init-ios.sh and the same compile-ffmpeg.sh script in the ios directory. A key part of the build is the module configuration. The default is module-lite.sh, which removes rarely used FFmpeg components to reduce binary size. There is also module-lite-hevc.sh for HEVC support with a smaller binary, and module-default.sh for more codecs and formats. You choose by creating a symlink from module.sh to one of these files before compiling. This is a real decision point: the lite module may not include the codec you need, and the default module will produce a larger binary. The README warns that ARMv5 is not tested on real devices, so if you target old ARM hardware, you are on your own.
What the Repository Does Not Give You
The README is explicit about what is not planned. There is no native subtitle renderer, no avfilter support, and no support for obsolete platforms like Android API 8 and below or iOS pre-6.0. It also skips ARMv5, ARMv6, and MIPS CPUs. That means if your use case involves subtitles, you must render them yourself, likely in an overlay. If you need video filters, you cannot use FFmpeg's filter chain through ijkplayer; you would have to pre-process the video or use a different player. The lack of avfilter is a significant limitation for anyone wanting to do real-time effects or transformations. Also, the README notes that the iOS armv7s architecture is obsolete, so you won't get that slice. These are hard boundaries, not omissions that can be configured around.
The License Situation Is Not Simple
The project's own license is LGPLv2.1 or later, which the README says is free for commercial use. But the README also lists many dependencies with different licenses: FFmpeg and libVLC under LGPL, SDL under zlib, libyuv under a BSD-style license, and x86inc.asm under ISC. The ExoPlayer module is Apache 2.0, and the Android example uses a GPL component (android-ndk-profiler) that is not included by default. The README's author explicitly says they have no idea whether these licenses are compatible with each other or with your product, and advises asking a lawyer. That is a red flag for any commercial project. You are not just adopting ijkplayer; you are adopting a pile of open-source components with different terms. The LGPL itself has obligations for dynamic linking and providing source code, and the GPL component in the example could infect your app if you include it. You need to review this carefully before shipping anything.
Maintenance and Upgrade Cost
The repository has no GitHub releases, and the last push was on 2024-08-13. The README references a NEWS.md for latest changes, but the version in the dependency examples is 0.8.8, which suggests the project has been stable for a long time. The build scripts are tied to specific toolchain versions: NDK r10e, Android Studio 2.1.3, Gradle 2.14.1, and Xcode 7.3. These are old. If you use a modern NDK or Xcode, you may hit compilation errors. The README even mentions a Cygwin build path that is 'unmaintained'. Upgrading FFmpeg to a newer version would require modifying the build scripts, which are based on external projects like yixia/FFmpeg-Android and kewlbear/FFmpeg-iOS-build-script. That is not a trivial task. The cost of maintaining this player is high if you need to keep up with Android or iOS platform changes. The alternative-backend support (ExoPlayer, AVPlayer) gives you an escape hatch: you can use those for modern codecs and fall back to ijkplayer only when needed.
Alternatives and When to Choose Them
The obvious alternative is to use the platform's native player plus a library like ExoPlayer on Android or AVPlayer on iOS. ExoPlayer is built on MediaCodec and supports a wide range of formats, and it is actively maintained by Google. AVPlayer is Apple's player and handles most common formats. The difference is that these alternatives do not give you FFmpeg's full codec list. If you need to play a niche format that the platform players do not support, ijkplayer is the tool. But if your content is H.264 or H.265 in MP4 or HLS, ExoPlayer or AVPlayer will be easier to integrate and maintain. The README itself lists ExoPlayer and AVPlayer as alternative backends, so you can have both: use ijkplayer as a fallback. That hybrid approach is probably the most practical use of this project.
Who Should Adopt It and What to Verify First
Adopt ijkplayer if you are building a video app that must play unusual or buggy streams, and you have the C and build expertise to handle a custom FFmpeg compile. Do not adopt it if you need a quick solution with modern platform support, or if your legal team is not prepared to review the license stack. Before you commit, verify three things. First, check the module configuration: run the build with module-lite-hevc.sh if you need HEVC, or module-default.sh if you need more codecs, and confirm your target formats are included. Second, test on your actual devices, especially if you target ARMv5, which is untested. Third, check the NEWS.md file for any recent changes or known issues, because the README's feature list may be stale. The project is frozen in time, so treat it as a stable but aging tool, not something to build a long-term strategy on.
Editorial conclusion
Adopt ijkplayer if you need a low-level, FFmpeg-based player with hardware decoding on both Android and iOS, and you can handle a manual build and a LGPLv2.1 license that may require legal review. Do not use it if you need native subtitle rendering, avfilter support, or a maintained project with regular releases. Before adopting, verify the exact FFmpeg version (n3.4) and the module configuration (module-lite.sh, module-lite-hevc.sh, module-default.sh) to confirm it covers your codecs and formats, and check the compatibility of the underlying licenses with your product.
Frequently asked questions
what is ijk player
It is a video player for Android and iOS written in C, based on the FFmpeg command-line player, with hardware decoding through MediaCodec on Android and VideoToolbox on iOS, an OpenGL ES video path on both, and alternative platform players available as backends. The repository describes it as free for commercial use under a copyleft licence at version 2.1 or later, and the README's Download section lists Gradle packages for Android and says iOS packages are still coming.
How do I build ijkplayer for Android?
The documented steps are to clone the repository, check out the k0.8.8 tag as a local branch, run the Android initialiser, compile FFmpeg with a clean followed by a full build, then compile the player itself, and finally import the Android directory into Android Studio with a compile SDK and build tools version of 23. The README also asks you to install a package manager, git and an assembler, and to export the SDK environment variables first.
What is on the NOT-ON-PLAN list for ijkplayer?
Four things: obsolete platforms on both mobile systems, obsolete processor architectures including two ARM variants and MIPS, native subtitle rendering, and filter support. The last one means the player decodes and renders but offers no filter graph, so compositing and on-the-fly transformation are not available.
Can I use ijkplayer in a commercial product?
The README says the player itself is free for commercial use under a copyleft licence at version 2.1 or later, and in the same paragraph says the project derives from other projects under various licences whose compatibility the author says they have no idea about. It advises asking a lawyer before using it in a product, and the repository root carries COPYING files for GPLv2, GPLv3, LGPLv2.1 and LGPLv3.
Does ijkplayer support ExoPlayer?
ExoPlayer is listed as an alternative backend on Android alongside the platform's own media player, and the Gradle block includes an implementation that presents it through the same interface, marked optional and experimental. The repository also has a dedicated directory for that backend, described as based on the ExoPlayer project under the Apache licence.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/bilibili-ijkplayer)Star history chart for your README
[](https://hysenlabs.com/projects/bilibili-ijkplayer)Was this useful?