|
1 | 1 | # ijkplayer |
2 | 2 |
|
3 | | - Platform | Build Status |
4 | | - -------- | ------------ |
5 | | - Android | [](https://travis-ci.org/Bilibili/ci-ijk-ffmpeg-android) |
6 | | - iOS | [](https://travis-ci.org/Bilibili/ci-ijk-ffmpeg-ios) |
| 3 | +使用最新 IDE 编译了 B 站 ijkplayer,不做功能上的开发,仅为了让老用户能够在新设备上继续使用。 |
7 | 4 |
|
8 | | -Video player based on [ffplay](http://ffmpeg.org) |
| 5 | +## 特色: |
9 | 6 |
|
10 | | -### Download |
| 7 | +将依赖库编译成静态库,预编译出了 Android 平台的 ijkpalyer.aar 和 iOS 平台预编译的 xcframework。 |
11 | 8 |
|
12 | | -- Android: |
13 | | - - Gradle |
14 | | -``` |
15 | | -# required |
16 | | -allprojects { |
17 | | - repositories { |
18 | | - jcenter() |
19 | | - } |
20 | | -} |
| 9 | +## 对比 |
21 | 10 |
|
22 | | -dependencies { |
23 | | - # required, enough for most devices. |
24 | | - compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' |
25 | | - compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8' |
| 11 | +| 类别 | B 站 ijkplayer | debugly/ijkplayer | 备注 | |
| 12 | +| ---------- | ----------------------------------- | -------------------------- | -------------------------------- | |
| 13 | +| 安卓库 | ijkplayer.so,ijkffmpeg.so,ijksdl.so | ijkplayer.arr | 从三个so缩减成一个arr,内部是一个 ijkpalyer.so | |
| 14 | +| iOS库 | - | IJKMediaPlayer.xcframework | 通过 xcframework 分发 | |
| 15 | +| ABI | armv5 armv7a arm64 x86 x86_64 | armv7a arm64 x86 x86_64 | 一套cmake支持所有ABI,无须每个 ABI 一个文件夹 | |
| 16 | +| NDK | r10e | r27c | 使用最新最稳定的 NDK | |
| 17 | +| openssl | 可选 | 默认包含 | 升级到了最新 1.1.1w | |
| 18 | +| yuv | 源码编译 | 预编译成.a | 升级到了较新的stable分支 | |
| 19 | +| soundtouch | 源码编译 | 预编译成.a | 升级到了最新 2.3.3 | |
| 20 | +| soxr | 支持 | 不支持 | 音频重采样库,暂不编译了,有问题时可加上 | |
26 | 21 |
|
27 | | - # Other ABIs: optional |
28 | | - compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8' |
29 | | - compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8' |
30 | | - compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8' |
31 | | - compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8' |
| 22 | +老旧项目一直在使用 B 站 ijkplayer 并且功能完全可以满足的情况下,可直接升级上来,好处是升级了编译工具链,能够正常在最新的安卓15 和 iOS18 上正常运行。 |
32 | 23 |
|
33 | | - # ExoPlayer as IMediaPlayer: optional, experimental |
34 | | - compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8' |
35 | | -} |
36 | | -``` |
37 | | -- iOS |
38 | | - - in coming... |
| 24 | +## FSPlayer |
39 | 25 |
|
40 | | -### My Build Environment |
41 | | -- Common |
42 | | - - Mac OS X 10.11.5 |
43 | | -- Android |
44 | | - - [NDK r10e](http://developer.android.com/tools/sdk/ndk/index.html) |
45 | | - - Android Studio 2.1.3 |
46 | | - - Gradle 2.14.1 |
47 | | -- iOS |
48 | | - - Xcode 7.3 (7D175) |
49 | | -- [HomeBrew](http://brew.sh) |
50 | | - - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
51 | | - - brew install git |
52 | | - |
53 | | -### Latest Changes |
54 | | -- [NEWS.md](NEWS.md) |
55 | | - |
56 | | -### Features |
57 | | -- Common |
58 | | - - remove rarely used ffmpeg components to reduce binary size [config/module-lite.sh](config/module-lite.sh) |
59 | | - - workaround for some buggy online video. |
60 | | -- Android |
61 | | - - platform: API 9~23 |
62 | | - - cpu: ARMv7a, ARM64v8a, x86 (ARMv5 is not tested on real devices) |
63 | | - - api: [MediaPlayer-like](android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IMediaPlayer.java) |
64 | | - - video-output: NativeWindow, OpenGL ES 2.0 |
65 | | - - audio-output: AudioTrack, OpenSL ES |
66 | | - - hw-decoder: MediaCodec (API 16+, Android 4.1+) |
67 | | - - alternative-backend: android.media.MediaPlayer, ExoPlayer |
68 | | -- iOS |
69 | | - - platform: iOS 7.0~10.2.x |
70 | | - - cpu: armv7, arm64, i386, x86_64, (armv7s is obselete) |
71 | | - - api: [MediaPlayer.framework-like](ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.h) |
72 | | - - video-output: OpenGL ES 2.0 |
73 | | - - audio-output: AudioQueue, AudioUnit |
74 | | - - hw-decoder: VideoToolbox (iOS 8+) |
75 | | - - alternative-backend: AVFoundation.Framework.AVPlayer, MediaPlayer.Framework.MPMoviePlayerControlelr (obselete since iOS 8) |
76 | | - |
77 | | -### NOT-ON-PLAN |
78 | | -- obsolete platforms (Android: API-8 and below; iOS: pre-6.0) |
79 | | -- obsolete cpu: ARMv5, ARMv6, MIPS (I don't even have these types of devices…) |
80 | | -- native subtitle render |
81 | | -- avfilter support |
82 | | - |
83 | | -### Before Build |
84 | | -``` |
85 | | -# install homebrew, git, yasm |
86 | | -ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
87 | | -brew install git |
88 | | -brew install yasm |
89 | | -
|
90 | | -# add these lines to your ~/.bash_profile or ~/.profile |
91 | | -# export ANDROID_SDK=<your sdk path> |
92 | | -# export ANDROID_NDK=<your ndk path> |
93 | | -
|
94 | | -# on Cygwin (unmaintained) |
95 | | -# install git, make, yasm |
96 | | -``` |
97 | | - |
98 | | -- If you prefer more codec/format |
99 | | -``` |
100 | | -cd config |
101 | | -rm module.sh |
102 | | -ln -s module-default.sh module.sh |
103 | | -cd android/contrib |
104 | | -# cd ios |
105 | | -sh compile-ffmpeg.sh clean |
106 | | -``` |
107 | | - |
108 | | -- If you prefer less codec/format for smaller binary size (include hevc function) |
109 | | -``` |
110 | | -cd config |
111 | | -rm module.sh |
112 | | -ln -s module-lite-hevc.sh module.sh |
113 | | -cd android/contrib |
114 | | -# cd ios |
115 | | -sh compile-ffmpeg.sh clean |
116 | | -``` |
117 | | - |
118 | | -- If you prefer less codec/format for smaller binary size (by default) |
119 | | -``` |
120 | | -cd config |
121 | | -rm module.sh |
122 | | -ln -s module-lite.sh module.sh |
123 | | -cd android/contrib |
124 | | -# cd ios |
125 | | -sh compile-ffmpeg.sh clean |
126 | | -``` |
127 | | - |
128 | | -- For Ubuntu/Debian users. |
129 | | -``` |
130 | | -# choose [No] to use bash |
131 | | -sudo dpkg-reconfigure dash |
132 | | -``` |
133 | | - |
134 | | -- If you'd like to share your config, pull request is welcome. |
135 | | - |
136 | | -### Build Android |
137 | | -``` |
138 | | -git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android |
139 | | -cd ijkplayer-android |
140 | | -git checkout -B latest k0.8.8 |
141 | | -
|
142 | | -./init-android.sh |
143 | | -
|
144 | | -cd android/contrib |
145 | | -./compile-ffmpeg.sh clean |
146 | | -./compile-ffmpeg.sh all |
147 | | -
|
148 | | -cd .. |
149 | | -./compile-ijk.sh all |
150 | | -
|
151 | | -# Android Studio: |
152 | | -# Open an existing Android Studio project |
153 | | -# Select android/ijkplayer/ and import |
154 | | -# |
155 | | -# define ext block in your root build.gradle |
156 | | -# ext { |
157 | | -# compileSdkVersion = 23 // depending on your sdk version |
158 | | -# buildToolsVersion = "23.0.0" // depending on your build tools version |
159 | | -# |
160 | | -# targetSdkVersion = 23 // depending on your sdk version |
161 | | -# } |
162 | | -# |
163 | | -# If you want to enable debugging ijkplayer(native modules) on Android Studio 2.2+: (experimental) |
164 | | -# sh android/patch-debugging-with-lldb.sh armv7a |
165 | | -# Install Android Studio 2.2(+) |
166 | | -# Preference -> Android SDK -> SDK Tools |
167 | | -# Select (LLDB, NDK, Android SDK Build-tools,Cmake) and install |
168 | | -# Open an existing Android Studio project |
169 | | -# Select android/ijkplayer |
170 | | -# Sync Project with Gradle Files |
171 | | -# Run -> Edit Configurations -> Debugger -> Symbol Directories |
172 | | -# Add "ijkplayer-armv7a/.externalNativeBuild/ndkBuild/release/obj/local/armeabi-v7a" to Symbol Directories |
173 | | -# Run -> Debug 'ijkplayer-example' |
174 | | -# if you want to reverse patches: |
175 | | -# sh patch-debugging-with-lldb.sh reverse armv7a |
176 | | -# |
177 | | -# Eclipse: (obselete) |
178 | | -# File -> New -> Project -> Android Project from Existing Code |
179 | | -# Select android/ and import all project |
180 | | -# Import appcompat-v7 |
181 | | -# Import preference-v7 |
182 | | -# |
183 | | -# Gradle |
184 | | -# cd ijkplayer |
185 | | -# gradle |
186 | | -
|
187 | | -``` |
188 | | - |
189 | | - |
190 | | -### Build iOS |
191 | | -``` |
192 | | -git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-ios |
193 | | -cd ijkplayer-ios |
194 | | -git checkout -B latest k0.8.8 |
195 | | -
|
196 | | -./init-ios.sh |
197 | | -
|
198 | | -cd ios |
199 | | -./compile-ffmpeg.sh clean |
200 | | -./compile-ffmpeg.sh all |
201 | | -
|
202 | | -# Demo |
203 | | -# open ios/IJKMediaDemo/IJKMediaDemo.xcodeproj with Xcode |
204 | | -# |
205 | | -# Import into Your own Application |
206 | | -# Select your project in Xcode. |
207 | | -# File -> Add Files to ... -> Select ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj |
208 | | -# Select your Application's target. |
209 | | -# Build Phases -> Target Dependencies -> Select IJKMediaFramework |
210 | | -# Build Phases -> Link Binary with Libraries -> Add: |
211 | | -# IJKMediaFramework.framework |
212 | | -# |
213 | | -# AudioToolbox.framework |
214 | | -# AVFoundation.framework |
215 | | -# CoreGraphics.framework |
216 | | -# CoreMedia.framework |
217 | | -# CoreVideo.framework |
218 | | -# libbz2.tbd |
219 | | -# libz.tbd |
220 | | -# MediaPlayer.framework |
221 | | -# MobileCoreServices.framework |
222 | | -# OpenGLES.framework |
223 | | -# QuartzCore.framework |
224 | | -# UIKit.framework |
225 | | -# VideoToolbox.framework |
226 | | -# |
227 | | -# ... (Maybe something else, if you get any link error) |
228 | | -# |
229 | | -``` |
230 | | - |
231 | | - |
232 | | -### Support (支持) ### |
233 | | -- Please do not send e-mail to me. Public technical discussion on github is preferred. |
234 | | -- 请尽量在 github 上公开讨论[技术问题](https://github.com/bilibili/ijkplayer/issues),不要以邮件方式私下询问,恕不一一回复。 |
235 | | - |
236 | | - |
237 | | -### License |
238 | | - |
239 | | -``` |
240 | | -Copyright (c) 2017 Bilibili |
241 | | -Licensed under LGPLv2.1 or later |
242 | | -``` |
243 | | - |
244 | | -ijkplayer required features are based on or derives from projects below: |
245 | | -- LGPL |
246 | | - - [FFmpeg](http://git.videolan.org/?p=ffmpeg.git) |
247 | | - - [libVLC](http://git.videolan.org/?p=vlc.git) |
248 | | - - [kxmovie](https://github.com/kolyvan/kxmovie) |
249 | | - - [soundtouch](http://www.surina.net/soundtouch/sourcecode.html) |
250 | | -- zlib license |
251 | | - - [SDL](http://www.libsdl.org) |
252 | | -- BSD-style license |
253 | | - - [libyuv](https://code.google.com/p/libyuv/) |
254 | | -- ISC license |
255 | | - - [libyuv/source/x86inc.asm](https://code.google.com/p/libyuv/source/browse/trunk/source/x86inc.asm) |
256 | | - |
257 | | -android/ijkplayer-exo is based on or derives from projects below: |
258 | | -- Apache License 2.0 |
259 | | - - [ExoPlayer](https://github.com/google/ExoPlayer) |
260 | | - |
261 | | -android/example is based on or derives from projects below: |
262 | | -- GPL |
263 | | - - [android-ndk-profiler](https://github.com/richq/android-ndk-profiler) (not included by default) |
264 | | - |
265 | | -ios/IJKMediaDemo is based on or derives from projects below: |
266 | | -- Unknown license |
267 | | - - [iOS7-BarcodeScanner](https://github.com/jpwiddy/iOS7-BarcodeScanner) |
268 | | - |
269 | | -ijkplayer's build scripts are based on or derives from projects below: |
270 | | -- [gas-preprocessor](http://git.libav.org/?p=gas-preprocessor.git) |
271 | | -- [VideoLAN](http://git.videolan.org) |
272 | | -- [yixia/FFmpeg-Android](https://github.com/yixia/FFmpeg-Android) |
273 | | -- [kewlbear/FFmpeg-iOS-build-script](https://github.com/kewlbear/FFmpeg-iOS-build-script) |
274 | | - |
275 | | -### Commercial Use |
276 | | -ijkplayer is licensed under LGPLv2.1 or later, so itself is free for commercial use under LGPLv2.1 or later |
277 | | - |
278 | | -But ijkplayer is also based on other different projects under various licenses, which I have no idea whether they are compatible to each other or to your product. |
279 | | - |
280 | | -[IANAL](https://en.wikipedia.org/wiki/IANAL), you should always ask your lawyer for these stuffs before use it in your product. |
| 26 | +如果 ijkplayer 功能不能满足当前复杂的业务需求,则可以使用 [fsplayer](https://github.com/debugly/fsplayer) ,提供了更加强劲的功能。 |
0 commit comments