Skip to content

Instantly share code, notes, and snippets.

@Akczht
Last active April 18, 2024 11:58
Show Gist options
  • Save Akczht/2f145e47838920ddbf717a3d588e460a to your computer and use it in GitHub Desktop.
Save Akczht/2f145e47838920ddbf717a3d588e460a to your computer and use it in GitHub Desktop.
FFmpeg Compilation macOS
Compiling FFmpeg with Build Options
This guide outlines the steps to compile FFmpeg with specific build options using the ./configure script.
Prerequisites
Ensure you have the following prerequisites installed on your system:
- GCC compiler
- Git
- GNU Make
- NASM (The Netwide Assembler)
Steps
1. Clone FFmpeg Repository:
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
2. Run Configuration Script:
./configure --enable-static --disable-shared --enable-neon --enable-gpl --enable-version3 --enable-securetransport --enable-videotoolbox --enable-audiotoolbox --enable-coreimage --enable-metal --enable-avfoundation
Explanation of options:
- --enable-static: Enable static linking.
- --disable-shared: Disable shared libraries.
- --enable-neon: Enable NEON optimizations.
- --enable-gpl: Enable GPL license.
- --enable-version3: Enable version 3 protocol.
- --enable-securetransport: Enable Secure Transport.
- --enable-videotoolbox: Enable Video Toolbox support.
- --enable-audiotoolbox: Enable Audio Toolbox support.
- --enable-coreimage: Enable CoreImage support.
- --enable-metal: Enable Metal support.
- --enable-avfoundation: Enable AVFoundation input device.
3. Compile FFmpeg:
make -j$(nproc)
This will compile FFmpeg using the specified configuration options.
4. Installation (Optional):
sudo make install
This step installs FFmpeg system-wide. You can skip this step if you prefer not to install it globally.
Usage
After compilation, you can use the ffmpeg command-line tool with the desired options to process multimedia files as needed.
ffmpeg [options] input_file output_file
Refer to the FFmpeg documentation for more information on available options and usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment