Skip to content

Instantly share code, notes, and snippets.

@astarasikov
Created January 20, 2021 00:07
Show Gist options
  • Save astarasikov/1c69694ab9756caf2d5f6a3d2383157f to your computer and use it in GitHub Desktop.
Save astarasikov/1c69694ab9756caf2d5f6a3d2383157f to your computer and use it in GitHub Desktop.
build FFMPEG on Apple M1 mac with macports

Introduction

Currently "libvpx" does not build on M1 macs. Here's how to build ffmpeg without this dependency (until it's fixed). We need to create a local port and build it (it's not strictly necessary to add this port tree to /opt/local/etc/macports/sources.conf)

Copy FFMPEG port locally

sudo mkdir -p /opt/local_ports/multimedia/
sudo cp -r /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/multimedia/ffmpeg /opt/local_ports/multimedia

Edit FFMPEG Portfile to disable libVPX

cd /opt/local_ports/multimedia
sudo vim Portfile

remove "libvpx" from "depends_lib" replace "-enable-vpx" with "-disable-vpx" in "configure.args"

Index local port tree and build FFMPEG

cd /opt/local_ports
sudo portupdate
sudo port install /opt/local_ports/multimedia/ffmpeg -x11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment