I believe many friends who use ijkPlayer are complaining that there is no one to solve many issues. The branch on master has been stuck in 201801. Now a year has almost passed. In fact, they have been maintaining and updating. Except iJKPlayer is based on FFmpeg as the kernel. Ijkplayer packages things, not so much change, problems are in the bottom FFmpeg change. Demux, Codec, etc., and various protocols.
So, I’ll show you how to use the latest stable version of the iJkPlayer kernel. We must know something about its engineering structure, how they contrib third-party libraries like FFmpeg, libyuv, Soundtouch, etc.
IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_COMMIT = ff3.4 - ijk0.8.7-20180103-001 IJK_FFMPEG_LOCAL_REPO = extra/ffmpegset -e
TOOLS=tools
git --version
echo "== pull ffmpeg base =="
sh $TOOLS/pull-repo-base.sh $IJK_FFMPEG_UPSTREAM $IJK_FFMPEG_LOCAL_REPO
function pull_fork()
{
echo "== pull ffmpeg fork The $1= ="
sh $TOOLS/pull-repo-ref.sh $IJK_FFMPEG_FORK android/contrib/ffmpeg-The $1 ${IJK_FFMPEG_LOCAL_REPO}
cd android/contrib/ffmpeg-The $1
git checkout ${IJK_FFMPEG_COMMIT} -B ijkplayer
cd-}Copy the code
The master library is ff3.4– IJK0.8.7 –20180103–001, which is based on FFmpeg3.4. The new version of FFmpeg is 4.1, while fixing a lot of problems and some new features.
The maintainer of iJkPlayer is also constantly updated.
IJK_FFMPEG_COMMIT= FF3.4 — iJK0.8.7 –20180103–001 instead of JK_FFMPEG_COMMIT= FF4.0 — iJk0.8.25 –20181123–001 And then you do validation tests.
For iOS, too, init-ios.sh
IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_COMMIT = ff3.4 - ijk0.8.7-20180103-001 IJK_FFMPEG_LOCAL_REPO = extra/ffmpeg IJK_GASP_UPSTREAM=https://github.com/Bilibili/gas-preprocessor.git# gas-preprocessor backup
# https://github.com/Bilibili/gas-preprocessor.git
if [ "$IJK_FFMPEG_REPO_URL"! ="" ]; then
IJK_FFMPEG_UPSTREAM=$IJK_FFMPEG_REPO_URL
IJK_FFMPEG_FORK=$IJK_FFMPEG_REPO_URL
fi
if [ "$IJK_GASP_REPO_URL"! ="" ]; then
IJK_GASP_UPSTREAM=$IJK_GASP_REPO_URL
fi
set -e
TOOLS=tools
Copy the code
This is the same as above. Other third-party libraries libyuv, Soundtouch, modify the corresponding script on the line. Note that when compiling, you can use the comparison tool to compare the new and old interfaces. The benefits of upgrading can avoid many problems. If you’re interested, you can try it.