Compiling mpv on OS X

Original guide written by me. Improved by ChrisK at CoalGirls.

He also maintains ready-to-use builds here.


Introduction

Here is a simple guide to compiling mpv, a fork of the MPlayer family and the current recommended media player on *nix.

mplayer2 is another such fork being developed, but right now, the mpv fork is the best choice. The mpv fork has a bit more active development, and some features like a nicer CLI output and a high quality opengl output.

This will ensure you are using the latest, most up-to-date high quality playback that you can get for OS X.

You’ll need at least OS X 10.7.

Installation

  1. Install Xcode from App Store
  2. Install Command Line Tools from Xcode -> Preferences -> Downloads
  3. Install Homebrew by pasting the following into Terminal: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  4. Install some other needed stuff: sudo easy_install docutils
  5. Install pigoz’s homebrew mpv. The commands you’ll need to put into Terminal are: brew tap mpv-player/mpv & brew install --HEAD mpv
  6. If you want to have an .app-bundle in ~/Applications: brew linkapps mpv

To set mpv as the default program to open .filetypes, get Finder-info on the filetype you want to associate, select mpv.app under Open with: and click the “Change All…” button. You can view options and keybinds here or by typing man mpv into Terminal. You can quit this dialogue any time by pressing q. mpv can also be launched by typing mpv into Terminal, dragging the file into the terminal window and hitting enter.

Configuration

Here is pigoz’s personal configuration. To edit the configuration file, type open ~/.mpv/config into Terminal, and paste the configuration into there.

The opengl-hq video output can be used to attach your own Colour Profile with :icc-profile=. You can find your own profile in Finder with ⌘+⇧+G, then entering /Library/ColorSync/Profiles/Displays.

Please note that opengl-hq is rather resource-heavy and needs a somewhat decent GPU (Intel HD4000 or better).

Notes

Remember to keep everything up-to-date using brew update. Since mpv is on –HEAD, brew update won’t work for it. You need to uninstall and reinstall (brew rm mpv && brew install --HEAD mpv), as it’s a HEAD only formula homebrew is not smart enough to figure out the version it built.

Having MacPorts or Fink installed may break brew. See brew doctor if you run into problems.