WangBin edited this page Jul 1, 2018 · 48 revisions

Supports mingw gcc, msvc(>=2013) for desktop and store, android, ios, raspberry pi, sailfish etc.

for All Platforms

  • Set FFmpeg source dir in shell environment before build: export FFSRC=ffmpeg/source/dir

  • You can pass arguments to the script, ./avbuild.sh $TARGET_OS "$TARGET_ARCHS".

You may have to set some vars in config-${TARGET_OS}.sh.

After building, the result headers and libs you need are in sdk-${TARGET_OS}-${TARGET_ARCH} for single architecture build.

Host Build

Build on windows, linux, macOS, raspberry pi in bash environment. Target platform is host

./avbuild.sh

Multiarch Build for All Platforms

FFmpeg configure script is slow because only 1 job is running. Multiarch build can simultaneously run configure to reduce configure time. In build command $ENV_VARS ./avbuild.sh $TARGET_OS[$OS_VERSION] "$TARGET_ARCHS", "$TARGET_ARCHS" can be a list of target arch[-compiler]. For example:

./avbuild.sh android "armv7 armv8-clang"
./avbuild.sh mingw "x86 x86_64"
./avbuild.sh rpi "armv6-clang-5.0 armv7 armv8"
./avbuild.sh ios "arm64 x86_64"
./avbuild.sh macos10.13

The result directory structure is

sdk-$TARGET_ARCHS-$COMPILER1
                           /arch11
                           /arch12
sdk-$TARGET_ARCHS-$COMPILER2
                           /arch21
                           /arch22

Lite Build

Copy config-lite.sh to config.sh. Only frequently used features are enabled. Encoding is disabled except hardware accelerated encoders.

Prebuilt FFmpeg

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.