MPlayer in a Mac Terminal

If you’re like me, you spend quite a lot of time on the command line. Here are three ways to invoke MPlayer from there (in order of my preference):

Solution #0

Install MPlayer via MacPorts and you’ll get a /opt/local/bin/mplayer.

Solution #1

Install MPlayer OSX and create a file named mplayer with the following contents somewhere in your PATH.

#!/bin/sh
exec open -a "/Applications/MPlayer OSX.app" "$@"

Solution #2

Install MPlayer OSX and create a symbolic link to the following file somewhere in your PATH.

/Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/mplayer

(This particular path applies to version 1.0rc1.)

Usage

mplayer fresh_prince_death_metal.wmv