How can I install ffmpeg in the macOS Terminal when using a proxy?

If you cannot connect to github.com, follow this guide.

We usually install ffmpeg on macOS using Homebrew; follow this guide if you cannot install Homebrew directly.

Enable the proxy for current terminal session.

Run this command in terminal:

export ALL_PROXY=socks5://address:port

If you don't have a SOCKS proxy, get a free one now.

Install Homebrew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Get more help from https://brew.sh/

Install ffmpeg via brew.

brew install ffmpeg

Test it on macOS.

Tested macOS version: Tahoe 26.4.1.

Test code:

ffmpeg --help

You will see the ffmpeg version displayed like this.

ffmpeg version 8.1.1 Copyright (c) 2000-2026 the FFmpeg developers