13

How to Build Static FFmpeg with x264 on macOS

 3 years ago
source link: https://amin-ahmadi.com/2020/05/10/how-to-build-static-ffmpeg-with-x264-on-macos/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to Build Static FFmpeg with x264 on macOS

I had to build FFmpeg with x264 support on macO statically, so I had to look around for a bunch of scattered commands. This is why I thought I should gather them up into a single post for easier reference later on. Here’s the result.





Start by getting x264 source codes, configuring and then building them. Here is what you need to run from Terminal:

git clone https://code.videolan.org/videolan/x264.git
./configure --disable-asm --enable-static
sudo make install

Now, download FFmpeg source codes from the following link and extract them somewhere on your computer.

https://ffmpeg.org/download.html

The last think you need to do, is to configure and build it. Here is how:

./configure --enable-static --disable-shared --disable-debug --disable-doc --disable-x86asm --enable-gpl  --enable-libx264  --prefix=/Users/someuser/ffmpeg-install
make install

Obviously you can modify the parameters above as it fits your needs. After the build completes, you’ll end up with the binaries inside ffmpeg-install folder (provided to the prefix parameter in configure) .






About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK