Introduce how to compile the essential audio, video third libraries, here including lame, fad-aac and x264.
Today, LAME is considered the best MP3 encoder at mid-high bitrates and at VBR, mostly thanks to the dedicated work of its developers and the open source licensing model that allowed the project to tap into engineering resources from all around the world. Both quality and speed improvements are still happening, probably making LAME the only MP3 encoder still being actively developed.
- Enter lame-3.100 folder,
cd lame-3.100
. - Change shell rights,
sudo chmod 777 build-lame.sh
. - Run build shell,
sudo sh ./build-lame.sh
- You can find the lib under the directory fat-lame.
You can also refer lame shell usage.
The Fraunhofer FDK AAC is a high-quality open-source AAC encoder library developed by Fraunhofer IIS. It was officially released for Android, but has been ported to other platforms. The licensed Fraunhofer AAC codec included in Winamp (often called FhG AAC) is not the same as the FDK AAC codec.
- Enter fdk-aac-2.0.0 folder,
cd fdk-aac-2.0.0
. - Change shell rights,
sudo chmod 777 build-fdk-aac.sh
. - Run build shell,
./build-fdk-aac.sh
- You can find the lib under the directory fat-fdk-aac.
You can also refer fdk-aac shell usage.
x264 is a free and open-source software library and a command-line utility developed by VideoLAN for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License.
- Enter x264-20190809-2245 folder,
cd x264-20190809-2245
. - Change shell rights,
sudo chmod 777 build-x264.sh
. - Run build shell,
./build-x264.sh
- You can find the lib under the directory fat-x264.
You can also refer x264 shell usage.
A complete, cross-platform solution to record, convert and stream audio and video.
- Enter
ffmpeg-4.2
folder,cd ffmpeg-4.2
. - Change shell rights,
sudo chmod 777 build-ffmpeg.sh
. - If you want ffmpeg use the external x264, lame, fdk-aac libs, please copy the
fat-x264, fat-lame, fat-fdk-aac
folders which are generated from previous steps toexternal_libs
folder. or else you must commentX264, LAME, FDK_AAC
inbuild-ffmpeg.sh
. - Run build shell,
./build-ffmpeg.sh
- Finally, you'll get ffmpeg libs under the folder
fat-ffmpeg
.
You can also refer ffmpeg shell usage.
-
No working C compiler found
.
Maybe it's a problem of Xcode, so runsudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
-
Found no assembler, Minimum version is nasm-x.x.x or yasm-x.x.x
.
It says your assembler version is too low, just update:
brew install nasm
orbrew install yasm
. -
Compile for i386 platform, encounters
No working C compiler found
.
You can resolve it by any one of below two ways:- Remove
i386
fromARCHS="x86_64 i386 arm64e arm64 armv7s"
in build shell . - Run
sudo sh ./build-xxx.sh arm64e arm64 x86_64 armv7s
.
- Remove