This script is made to compile FFmpeg with common codecs on Mac OSX running on Apple Silicon. The script was orginally taken from https://gitlab.com/martinr92/ffmpeg and has been modifed to build the libraries with ARM64/NEON code were applicable.
The version of x265 also includes the Apple provided patch used by Handbreak, https://github.com/HandBrake/HandBrake/blob/master/contrib/x265/A01-darwin-neon-support-for-arm64.patch forward ported to apply to newer versions of x265 this is not in the main line code but runs significantly faster. It seems both this and x265's mianline NEON code break multilib linkage if thats importnat to you but a 12bit build seems to support 12bit, 10bit and 8bit encoding anyway. This version also cirrectly reports that ARM64 is 64 bit not 32 bit :-)
This repository builds FFmpeg and FFprobe for Mac OSX using
- build tools
- video codecs
- audio codecs
To get a full list of all formats and codecs that are supported just execute
./ffmpeg -formats
./ffmpeg -codecs
There are just a few dependencies to other tools. Most of the software is compiled or downloaded during script execution. Also most of the tools should be already available on the system by default.
- c and c++ compiler like AppleClang (included in Xcode) or gcc (on Linux)
- curl for downloading files
- make
- nproc (on linux) or sysctl (on Mac OSX) for multicore compilation
To run this script simply execute the build.sh script.
./build.sh
All files that are downloaded and generated through this script are placed in the current working directory. The recommendation is to use an empty folder for this.
mkdir ffmpeg-compile
cd ffmpeg-compile
Now execute the script using:
../path/to/repository/build.sh
After the execution a new folder called "out" exists. It contains the compiled FFmpeg binary (in the bin sub-folder). The ffmpeg-success.zip contains also all binary files of FFmpeg.
Check the detailed logfiles in the working directory. Each build step has its own file starting with "build-*".
If the build of ffmpeg failes during the configuration phase (e.g. because it doesn't find one codec) check also the log file in ffmpeg/ffmpeg-*/ffbuild/config.log.