Before you can build mpv & mpv.app on an Apple silicon Mac, there's a couple of required dependencies you'll need to install if you haven't already:
-
Go to System Preferences > Software Update. If there's anything there to update, do it.
-
If you don't have the Xcode Command Line Tools installed, run
xcode-select --install
and select Install on the prompt that appears. -
If you don't have Homebrew installed, follow the instructions here.
-
If you don't have all of mpv's dependencies installed, run
brew install --build-from-source --only-dependencies mpv && brew install libplacebo
.
You'll also need a local copy of the mpv repo, which you can get by running git clone https://github.com/mpv-player/mpv
.
You can now run the attached script to build mpv & mpv.app on an Apple silicon Mac yourself. Just make sure to run it from the root directory of the cloned repo.
If you want to bundle a static build of mpv.app, perform these steps following the ones above.
-
Run
brew install dylibbundler
. -
Run the script from the root directory of the cloned repo, but append
--static
to the command, like./build-mpv_silicon.sh --static
.
Going forward, you can update your local copy of the repo by running the following commands from its root directory:
git reset --hard
git clean --force -d -x
git pull origin master
In case anyone else is having the same issue:
/opt/homebrew/Cellar/libplacebo/6.338.1_1/include/libplacebo/vulkan.h:21:10: fatal error: 'vulkan/vulkan.h' file not found
when trying to build; I think messing around with the Vulkan-SDK installer and then trying to go back to homebrew's vulkan/libplacebo was the cause of it for me. After completely removing the vulkan-sdk and forcing brew to reinstall libplacebo, vulkan-headers, and vulkan-loader I was able to build mpv again. Even after removing the SDK it was still giving me that error until I force reinstalled those homebrew packages....I reinstalled all of them at once so I'm not sure which one(s) were responsible.