Applescript application interface command line mplayer

March 21, 2009
Tags: ,

Many high quality (e.g. 1080p) movies take significant system resources to play. A GUI wrapper application only adds an extra middle man. The command line version of mplayer is very fast and has served me well many times. I am a huge fan of the command line but sometimes I just want to double click or drag and drop.

You first need to install macports and then install mplayer by typing

$ sudo port install mplayer

Here Is what I threw together:

on open movies

    – Play each file in the list of files to open.
    repeat with movie in movies

        – Convert alias to conventional path.
        set moviepath to quoted form of ¬
            (POSIX path of (movie as Unicode text))

        – play the file with mplayer.
        set command to "/opt/local/bin/mplayer " & moviepath

        do shell script command

    end repeat

end open

Open the script in Script Editor.app and save it as an Application. Unfortunately you can’t double click anything and open it with this but you can drag and drop as well as select open with.

Well it is not all that impressive but for large movie file you can’t beat mplayer on the command line.

Leave a Reply (Filtered through Markdown)