How to Install FFmpeg on Ubuntu/Linux, Windows, and Mac

FFmpeg is a great tool for performing various media manipulation tasks. This guide will show you how to install it on Ubuntu/Linux., Windows, and Mac.
by Josephine Loo · · Updated

Contents

    FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. You can use it to decode, encode, transcode, mux, demux, stream, filter, and play media files in any format. As it runs in a wide variety of build environments and machine architectures including Mac, Windows, and Linux, it is highly portable.

    Whether you’re looking to convert, play and analyze media files or add these functionalities to your application, you can use FFmpeg to do both. It contains multiple tools and libraries that serve these purposes, such as libavcodec, libavutil, libavformat, libavfilter, libavdevice, libswscale, and libswresample. When you download the FFmpeg packages/executable files to your machine, these libraries will be downloaded automatically too.

    In this article, we’ll show you how to download and install FFmpeg on your machine, whether it’s running on Ubuntu/Linux, Windows, or macOS.

    How to Install FFmpeg on Mac

    Option 1: Use a Package Manager (Homebrew)

    The easiest way to install FFmpeg on your Mac is by using a package manager like Homebrew. Homebrew is a free and open-source package manager that simplifies the installation of software on macOS and Linux. Using Homebrew, FFmpeg can be installed on your Mac with just a single command.

    Install Homebrew on your Mac and then run the command below in the terminal to install the latest version of FFmpeg:

    brew install ffmpeg
    

    You can also download a specific version of FFmpeg. To do so, specify the FFmpeg version in the command, following ffmpeg@. For example, the command below will install version 5 of FFmpeg instead of the latest one:

    brew install ffmpeg@5
    

    After the installation has been completed, verify it by running ffmpeg in the terminal:

    ffmpeg
    

    If the output shows you information about the FFmpeg installed including its version, FFmpeg has been installed successfully on your Mac and your can start using it to manipulate media files!

    an output of the 'ffmpeg' command after installing using Homebrew

    Option 2: Download from the Official Website

    In general, using a package manager like Homebrew is recommended for most users, as it provides a convenient and hassle-free way to install and manage FFmpeg. However, if you have specific needs or prefer more control over the installation process, downloading from the official website may be a better option. The FFmpeg packages and executable files are available for download on the official website and you can select the specific version that you want.

    Go to the FFmpeg website's Download page and click on “Static builds for macOS 64-bit”.

    a screenshot of the FFmpeg download page

    You’ll see the current snapshot and release builds. From the official remark, it’s encouraged to use the current snapshot build as they will only accept bug reports for snapshot builds. Click on the current snapshot build on the left. The build file in .7z format will be downloaded.

    a screenshot of the download page for macOS

    Once the download has been completed, open the .7z file and extract the executable file from it. You can also move the executable file to a location of your choice (eg. /usr/local/bin ).

    a screenshot of the extracted FFmpeg build file on Mac

    Double-click the executable file to start the installation. You might get a pop-up that warns you that the file cannot be opened because it is from an unidentified developer. If that happens, click “OK” to continue.

    a screenshot of the warning

    To continue with the installation, we need to modify the security setting. Go to “Privacy & Security” in your System Settings and click “Open Anyway” to allow the installation.

    a screenshot of the 'Privacy & Security' settings a screenshot of the password prompt

    If another pop-up warns you about the action, click “Open” to continue.

    a screenshot of the warning - whether to open it

    Double-click on the executable file again. Now, it should open up a new terminal and start the installation.

    a screenshot of the terminal when the installation is complete

    Once the process has been completed, you can verify the installation by running ffmpeg in the terminal and see its information including the version installed in the output:

    an output of the 'ffmpeg' command after installing manually

    How to Install FFmpeg on Windows

    Go to the FFmpeg website's Download page and click on “Windows builds from gyan.dev”.

    a screenshot of the FFmpeg download page

    You'll see a list of available builds on the new page. Choose the desired version and click on one of the .7z files to download it.

    a screenshot of the executable file download page for Windows

    Once the download has been completed, extract the content from the .7z file. It should be a folder with the same name.

    a screenshot of the extracted folder on Windows

    In the extracted folder, locate the bin folder and copy its directory. The executable files are stored in this folder and we need to add its directory to the PATH environment variable to install and use FFmpeg.

    a screenshot of the content of the extracted folder (containing the bin folder) on Windows

    Open up “System Properties” and under the “Advanced” tab, click on the “Environment Variables” button.

    a screenshot of the 'System Properties' window

    In the “Environment Variables” window, find the “Path” variable in the “System variables” section. Select it and click on the “Edit” button.

    a screenshot of the 'Environment Variables' window

    In the “Edit Environment Variable” window, click the “New” button and paste the path to the bin directory. Then, click “OK” to save the changes.

    a screenshot of the 'Edit environment variable' window

    FFmpeg is now installed on your Windows system. You can verify it by opening a Command Prompt window and running ffmpeg. You should see its version and other information:

    an output of the 'ffmpeg' command after installing it on Windows

    How to Install FFmpeg on Ubuntu/Linux

    Installing FFmpeg on Ubuntu is really easy as you can use the default Advanced Package Tool (apt) to install it from the official repository.

    Open a terminal on your Ubuntu system and update the package manager's repository by running the command below:

    sudo apt update
    

    After the update has been completed, run the command below to install FFmpeg:

    sudo apt install ffmpeg
    

    The latest of FFmpeg will be installed on your Ubuntu system. You can verify the installation by running ffmpeg in the terminal to check:

    an output of the 'ffmpeg' command after installing it on Ubuntu

    What’s Next

    After installing FFmpeg successfully on your machine, you can start using it to manipulate media files—make GIFs from images, add watermarks to videos, add subtitles to videos, and more.

    However, this is a general guide that shows you how to install FFmpeg on your machine and you could still run into errors that are specific to your system. If that’s the case and you would like to explore other options that don’t require installation, try using a cloud-hosted tool like Bannerbear. It helps you generate custom images, videos, and more using API and these articles should give you an idea of how it works:

    About the authorJosephine Loo
    Josephine is an automation enthusiast. She loves automating stuff and helping people to increase productivity with automation.

    Bannerbear Beginner Guide: How to Start Generating Images Dynamically in JavaScript with Bannerbear

    If you want to integrate dynamic image generation into your JavaScript project, this article is for you! Learn how to do it effortlessly with Bannerbear—we’ll walk you through the entire process, from setup and implementation to achieving the final result.

    How to Instantly Generate Certificates Online with Bannerbear and Airtable

    One way to generate a large batch of certificates on-demand is with a direct Airtable integration. Here's how to connect your base to Bannerbear and generate dozens of graphics in seconds!

    How to Automatically Create Eye-Catching Images for Your App's Link Sharing Using Bannerbear (Node.js)

    Want to make your app’s link sharing stand out? Learn how to use Bannerbear to automatically create eye-catching images that boost click-through rates! This tutorial walks you through building a backend service with Node.js to automatically generate custom images based on dynamic data.

    Automate & Scale
    Your Marketing

    Bannerbear helps you auto-generate social media visuals, banners and more with our API and nocode integrations

    How to Install FFmpeg on Ubuntu/Linux, Windows, and Mac
    How to Install FFmpeg on Ubuntu/Linux, Windows, and Mac