Skip to content
/ mpv-arm Public

🎬 Build MPV media player for Apple Silicon Macs with Vulkan support. Complete guide with automated build script for native ARM64 performance and hardware acceleration via MoltenVK.

License

Notifications You must be signed in to change notification settings

hongmd/mpv-arm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 MPV for Apple Silicon Macs

A comprehensive guide to build mpv media player from source on Apple Silicon Macs with Vulkan support.

macOS MPV Vulkan License: MIT

πŸš€ Quick Start Options

Don't want to build from source? Here are your options:

Option 1: πŸ“¦ Prebuilt Binaries (Recommended for most users)

  • πŸ”₯ Official MPV Nightly Builds: Download here - Official ARM64 builds
  • πŸ› οΈ m154k1's Enhanced Builds: mpv-build-macOS - Comprehensive builds with extra features

Option 2: πŸ”¨ Build from Source (This Guide)

Choose this option if you want to:

  • βœ… Customize build options and dependencies
  • βœ… Latest bleeding-edge features from git
  • βœ… Learn the build process
  • βœ… Optimize for your specific Mac model

πŸ“Š Comparison Table

Feature Official Nightly m154k1 Builds This Guide
Ease of Use ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ ⭐⭐⭐
Download Size ~50MB ~80MB N/A (Build locally)
Build Time Instant Instant 20-30 minutes
Customization ❌ ❌ βœ… Full control
Latest Features βœ… Daily builds βœ… Regular updates βœ… Git HEAD
Extra Codecs βœ… Standard βœ… Enhanced βœ… Configurable
Learning Value ❌ ❌ βœ… Educational

πŸ’‘ Recommendation:

  • Beginners: Use Official Nightly or m154k1 builds
  • Power Users: Follow this build guide for maximum control

πŸ“‹ Prerequisites

Before building mpv, ensure you have the following installed:

  • πŸ› οΈ Xcode - Apple's development tools
  • 🍺 Homebrew - Package manager for macOS
  • πŸ–₯️ macOS 11.0+ - Required for Apple Silicon support
  • πŸ’Ύ ~2GB free space - For dependencies and build artifacts
  • ⏱️ 20-30 minutes - Estimated build time

πŸš€ Installation Guide

Step 1: Clone MPV Source Code

Clone the official mpv repository:

git clone https://github.com/mpv-player/mpv.git
cd mpv

To update your local clone to the latest version:

git reset --hard
git clean --force -d -x
git pull origin master

Step 2: Install Vulkan Support

Install MoltenVK for Vulkan API support on Metal:

brew install molten-vk

Step 3: Install Dependencies

Install mpv dependencies and libplacebo:

brew install --build-from-source --only-dependencies mpv && brew install libplacebo

Step 4: Download Build Script

Download the build-mpv_silicon.sh script and place it in your mpv directory:

# Download the build script
curl -O https://raw.githubusercontent.com/hongmd/mpv-arm/main/build-mpv_silicon.sh
chmod +x build-mpv_silicon.sh

What the script does:

  • Sets up meson build system
  • Compiles mpv with optimized settings for Apple Silicon
  • Creates macOS app bundle
  • Handles static linking for standalone app

Step 5: Install Additional Tools

Install dylibbundler for app bundling:

brew install dylibbundler

Step 6: Build MPV

Make the script executable and run it:

# Build with static linking (recommended for distribution)
./build-mpv_silicon.sh --static

# OR build without static linking (smaller file, requires system libraries)
./build-mpv_silicon.sh

Build Options Explained:

  • --static: Creates self-contained app with all dependencies bundled
  • Without --static: Smaller app but requires system libraries

The build process will:

  1. Configure meson build system
  2. Compile mpv with ARM64 optimizations
  3. Run tests to verify the build
  4. Create macOS app bundle (if --static is used)

Step 7: Install MPV.app

Copy the built application to your Applications folder:

cp -r build/mpv.app /Applications/

πŸ”§ Optional Enhancements

Install Media Tools

For enhanced streaming and downloading capabilities:

# Install streamlink and yt-dlp
brew install streamlink yt-dlp

# Create symlinks for compatibility (if needed)
sudo ln -sf /opt/homebrew/bin/streamlink /usr/local/bin/streamlink
sudo ln -sf /opt/homebrew/bin/yt-dlp /usr/local/bin/yt-dlp

πŸ“ Build Artifacts

After successful build, you'll find:

  • build/mpv - Command-line binary
  • build/mpv.app - macOS application bundle

⚑ Features

  • βœ… Apple Silicon optimized - Native ARM64 performance
  • βœ… Vulkan support - Hardware-accelerated rendering via MoltenVK
  • βœ… Static linking - Self-contained application bundle
  • βœ… Latest codecs - Support for modern video formats

βš™οΈ Configuration

Recommended mpv.conf for Apple Silicon

Create ~/.config/mpv/mpv.conf for optimal performance:

# Use Vulkan for hardware acceleration
vo=gpu-next
gpu-api=vulkan

# Apple Silicon optimizations
hwdec=videotoolbox
profile=gpu-hq

# High quality scaling
scale=ewa_lanczos
dscale=mitchell
cscale=ewa_lanczos

# Performance settings
vd-lavc-threads=8
cache=yes
demuxer-max-bytes=150M

πŸ› Troubleshooting

If you encounter issues:

  1. Xcode Command Line Tools: xcode-select --install
  2. Update Homebrew: brew update && brew upgrade
  3. Clean builds: rm -rf build/ before rebuilding
  4. Vulkan issues: Check MoltenVK installation: brew list molten-vk
  5. Build errors: Ensure you're in the mpv source directory
  6. App won't open: Check code signing: codesign -v /Applications/mpv.app

πŸ“„ License

This repository's documentation and modifications are licensed under the MIT License.

Important Note:

  • The build script may contain code from other sources
  • This license applies to documentation, guides, and original contributions
  • Please refer to original sources for script attribution
  • MPV itself is licensed under GPLv2+

πŸ™ Credits

  • Original build script by dbrookman - Source Gist
  • MPV Project - The amazing media player we're building
  • MoltenVK - Vulkan on Metal implementation
  • Homebrew - Package management for macOS

πŸ”— Alternative Build Solutions


⭐ Star this repository if it helped you build mpv successfully!

About

🎬 Build MPV media player for Apple Silicon Macs with Vulkan support. Complete guide with automated build script for native ARM64 performance and hardware acceleration via MoltenVK.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages