Audio & video developmentHistorical technical note
Building FFmpeg-iOS on a Mac
Records preparing gas-preprocessor and yasm on a Mac, then running the FFmpeg-iOS build script. It explains script locations, dependency installation, and output directories to prepare libraries for the later decoding examples.
Originally credited to Bison. Content is retained as published.
On this page
This historical illustration is currently unavailable. The original image URL is retained for reference.
I will not explain FFmpeg's uses in detail here. Interested readers can look them up.
Now for the main instructions:
-
Download gas-preprocessor
-
From
gas-preprocessor, copygas-preprocessor.plinto/usr/local/bin/. -
Enable permissions.
chmod 777 /usr/local/bin/gas-preprocessor.pl
4. Install yasm.
brew install yasm
After installation, the result looks like this:
==> Downloading https://homebrew.bintray.com/bottles/yasm-1.3.0.el_capitan.bottl
######################################################################## 100.0%
==> Pouring yasm-1.3.0.el_capitan.bottle.1.tar.gz
🍺 /usr/local/Cellar/yasm/1.3.0: 44 files, 3.1M
5. Download the Mac FFmpeg build script
6. In Terminal, use cd followed by the folder path to enter the downloaded folder, then run the build script.
./build-ffmpeg.sh
You can now take a drink and wait for compilation. If FFmpeg is not installed, this command installs it automatically, which may take a while.
When all compilation completes, it produces the FFmpeg-iOS file.
Recommended reading: A beginner developer's review of 2015