Skip to content

Repository files navigation

MRFFToolChain Build Shell [中文版]

What's MRFFToolChain?

MRFFToolChain is a mature set of compilation tools specifically designed for compiling third-party libraries for iOS, macOS, tvOS, and Android platforms. It's products was built for fsplayerijkplayerFFmpegTutorial.

At present MRFFToolChain contained ass、bluray、dav1d、dovi、dvdread、dvdnav、ffmpeg、freetype、fribidi、harfbuzz、lcms2、placebo、moltenvk、openssl、opus、shaderc、smb2、soundtouch、unibreak、uavs3d、xml2、yuv、webp、x264、x265.

Supported Plat

platformarchitecturesminimum deployment target
iOSarm64、arm64_simulator、x86_64_simulator12.0
tvOSarm64、arm64_simulator、x86_64_simulator12.0
macOSarm64、x86_6410.14
Androidarm64、armv7a、x86_64、x8621

News

  • FFmpeg 8.1.2 is ready
  • upgrade all libs to lastest,Improved optimizations
  • using macOS 15,Xcode_16.4

Denpendency

  • Fontconfig: xml2,freetype
  • Bluray: xml2
  • Harfbuzz: freetype
  • Dvdnav: dvdread
  • Placebo for Appple: shaderc,moltenvk,dovi,lcms2
  • Ass for Appple: harfbuzz,fribidi,unibreak
  • Ass for Android: harfbuzz,fribidi,unibreak,fontconfig
  • IJKFFmpeg: openssl
  • FFmpeg4 for Appple: openssl3,opus,bluray
  • FFmpeg5 for Appple: openssl3,opus,bluray,dav1d,dvdread,uavs3d
  • FFmpeg6 for Appple: openssl3,opus,bluray,dav1d,dvdread,uavs3d,smb2
  • FFmpeg7 for Appple: openssl3,opus,bluray,dav1d,dvdnav,uavs3d,smb2,webp
  • FFmpeg8 for Appple: openssl3,opus,bluray,dav1d,dvdnav,uavs3d,smb2,webp
  • FFmpeg4 for Android: openssl3,opus,bluray,soundtouch
  • FFmpeg5 for Android: openssl3,opus,bluray,dav1d,dvdread,uavs3d,soundtouch
  • FFmpeg6 for Android: openssl3,opus,bluray,dav1d,dvdread,uavs3d,smb2,soundtouch
  • FFmpeg7 for Android: openssl3,opus,bluray,dav1d,dvdnav,uavs3d,smb2,soundtouch,libplacebo,shaderc,moltenvk,dovi,lcms2

Tips:

1、ffmpeg is not denpendent on ass and placebo.
2、fsplayer is denpendent on ffmpeg and ass and placebo.
3、ijkplayer is denpendent on ijkffmpeg.
4、FFmpegTutorial is denpendent on fftutorial.
5、when install pre-compiled lib, will containes it's denpendencies.

Download/Install Pre-compiled Libs

Save yourself a great deal of time by directly downloading the pre-compiled libraries from GitHub. These pre-compiled libraries already applied patches which in the patches directory.

#Check the help first
./main.sh install --help
# Examples of usage:
./main.sh install -p macos -l ffmpeg
./main.sh install -p ios -l 'ass ffmpeg'
./main.sh install -p android -l openssl3

Compile by Yourself

Initialize Library Repositories

Don't waste your time compiling these libraries unless you've modified the source code! Why not just download the pre-compiled libraries I've prepared using GitHub actions?

The script parameters are flexible and can be combined as needed. Here are some common examples:

# Check the help first
./main.sh init --help
# Prepare libass source code for the iOS platform
./main.sh init -p ios -l ass
# Prepare ffmpeg7 source code for the x86 architecture on iOS
./main.sh init -p ios -l ffmpeg7 -a x86_64_simulator
# Prepare source code for specific libraries for the Android platform
./main.sh init -p android -l "openssl ffmpeg"

Compile

Once the source code repository initialization is complete, you can start the compilation process.

# Check the help first
./main.sh compile --help
# As shown in the help:
# -p specifies the platform
# -c specifies the action (e.g build for compilation, rebuild for recompilation)
# -l specifies the libraries to compile
# -a specifies the CPU architecture

The following code demonstrates how to compile FFmpeg 7 for the iOS platform:

# install FFmpeg7's dependencies has two choices
# recommend choice (because ffmpeg7 was pre-compiled,it contained all dependencies)
./main.sh install -p ios -l ffmpeg7
# other choice (you must know ffmpeg7's dependent lib name)
./main.sh install -p ios -l "openssl3 opus bluray dav1d dvdnav uavs3d smb2"
# Compile FFmpeg7 for the arm64 architecture on iOS with xcframework
./main.sh compile -p ios -a arm64 -l ffmepg7 --fmwk

The order of these parameters does not matter; they can be arranged in any sequence.

Support Mirror

If cloning repositories from GitHub is slow, or if you need to use an internal private repository, you can declare the corresponding environment variables before running the compilation script!

Lib NameCurrent VersionRepository URLMirror Repository URL
ffmpeg88.1.2https://github.com/FFmpeg/FFmpeg.gitexport GIT_FFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git
ffmpeg77.1.3https://github.com/FFmpeg/FFmpeg.gitexport GIT_FFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git
ffmpeg66.1.1https://github.com/FFmpeg/FFmpeg.gitexport GIT_FFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git
ffmpeg55.1.6https://github.com/FFmpeg/FFmpeg.gitexport GIT_FFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git
ffmpeg44.0.5https://github.com/FFmpeg/FFmpeg.gitexport GIT_FFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git
ijkffmpegff4.0--ijk0.8.8--20210426--001https://github.com/bilibili/FFmpeg.gitexport GIT_IJKFFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git
ass0.17.4https://github.com/libass/libass.gitexport GIT_ASS_UPSTREAM=git@xx:yy/libass.git
bluray1.3.4https://code.videolan.org/videolan/libbluray.gitexport GIT_BLURAY_UPSTREAM=git@xx:yy/libbluray.git
dav1d1.5.3https://code.videolan.org/videolan/dav1d.gitexport GIT_DAV1D_UPSTREAM=git@xx:yy/dav1d.git
dvdread6.1.3https://code.videolan.org/videolan/libdvdread.gitexport GIT_DVDREAD_UPSTREAM=git@xx:yy/libdvdread.git
dvdnavmaster-9831fe01https://code.videolan.org/videolan/libdvdnav.gitexport GIT_DVDNAV_UPSTREAM=git@xx:yy/libdvdnav.git
fontconfig2.17.1https://gitlab.freedesktop.org/fontconfig/fontconfig.gitexport GIT_FONTCONFIG_UPSTREAM=git@xx:yy/fontconfig.git
freetype2.14.1https://gitlab.freedesktop.org/freetype/freetype.gitexport GIT_FREETYPE_UPSTREAM=git@xx:yy/freetype.git
fribidi1.0.16https://github.com/fribidi/fribidi.gitexport GIT_FRIBIDI_UPSTREAM=git@xx:yy/fribidi.git
harfbuzz12.3.2https://github.com/harfbuzz/harfbuzz.gitexport GIT_HARFBUZZ_UPSTREAM=git@xx:yy/harfbuzz.git
openssl1.1.1whttps://github.com/openssl/openssl.gitexport GIT_OPENSSL_UPSTREAM=git@xx:yy/openssl.git
openssl33.6.2https://github.com/openssl/openssl.gitexport GIT_OPENSSL_UPSTREAM=git@xx:yy/openssl.git
opus1.6.1https://gitlab.xiph.org/xiph/opus.gitexport GIT_OPUS_UPSTREAM=git@xx:yy/opus.git
smb26.2https://github.com/sahlberg/libsmb2.gitexport GIT_SMB2_UPSTREAM=git@xx:yy/libsmb2.git
soundtouch2.4.0https://codeberg.org/soundtouch/soundtouch.gitexport GIT_SOUNDTOUCH_UPSTREAM=git@xx:yy/soundtouch.git
unibreak6.1https://github.com/adah1972/libunibreak.gitexport GIT_UNIBREAK_UPSTREAM=git@xx:yy/libunibreak.git
uavs3d1.2.1https://github.com/uavs3/uavs3d.gitexport GIT_UAVS3D_UPSTREAM=git@xx:yy/UAVS3D.git
xml22.15.1https://github.com/GNOME/libxml2.gitexport GIT_FONTCONFIG_UPSTREAM=git@xx:yy/fontconfig.git
yuvmain-f94b8cf7https://github.com/debugly/libyuv.gitexport GIT_YUV_UPSTREAM=git@xx:yy/yuv.git
webpv1.6.0https://github.com/debugly/libwebp.gitexport GIT_WEBP_UPSTREAM=git@xx:yy/webp.git
placebo7.349.0https://github.com/haasn/libplacebo.gitexport GIT_LIBPLACEBO_UPSTREAM=git@xx:yy/libplacebo.git
shaderc2025.1https://github.com/google/shaderc.gitexport GIT_SHADERC_UPSTREAM=git@xx:yy/shaderc.git
moltenvk1.3.1https://github.com/KhronosGroup/MoltenVK.gitexport GIT_MOLTENVK_UPSTREAM=git@xx:yy/MoltenVK.git
lcms22.16https://github.com/mm2/Little-CMS.gitexport GIT_LCMS2_UPSTREAM=git@xx:yy/Little-CMS.git
dovi1.6.79https://github.com/AMDEXA/libdovi.gitexport GIT_DOVI_UPSTREAM=git@xx:yy/libdovi.git
x264masterhttps://code.videolan.org/videolan/x264.gitexport GIT_X264_UPSTREAM=git@xx:yy/x264.git
x2654.2https://bitbucket.org/multicoreware/x265_git.gitexport GIT_X265_UPSTREAM=git@xx:yy/x265.git

Tips

  • To download pre-compiled xcframework libraries, add the --fmwk parameter when using the install command.
  • To skip pulling remote repositories during initialization, add the --skip-pull-base parameter when using the init command.
  • Currently, FFmpeg uses the module-full.sh configuration, resulting in slightly larger package sizes.
  • You can download all pre-compiled GitHub libraries to your own server and specify your server address using MR_DOWNLOAD_BASEURL before running the install command.

Releases

Used by

Contributors

Languages