Posts Tagged ‘flowplayer’

Building FlowPlayer from Source on Mac OS X

FlowPlayer is a Flash media player for the web.  It’s a nice alternative to Jeroen Wijering’s FLV Media Player, although I’d never knock the latter.  It’s still arguably still the best.

One reason to use FlowPlayer is its GPL license.  There aren’t many reasons to build it from source, as the precompiled SWFs work identically.  The only reason I was curious enough to try it was to change the embedded logo in full-screen mode.  FlowPlayer is offered with a “commercial” license, which nets you FlowPlayer minus that logo.  That doesn’t sound like much of a benefit to me.  I’d want a logo there - just not that one.

It occurred to me that CentOS, the free Linux distribution based on Red Hat Enterprise Linux, is able to do exactly that.  They take RHEL, swap out logos and the “Red Hat” phrases, compile, and that’s about it.  It’s a nice way to work with Red Hat without forking over the cash, and it’s legal thanks to the GPL (I’ll still take Debian/Ubuntu any day - enterprise be damned).

This is tangential, but I’m noting it because I’m publishing these instructions simply because I figured it out and there isn’t a lot of good information out there to this effect.  These instructions are based on a somewhat outdated post I found that didn’t make an OS distinction and turned out not to work as written on Macs.

One note before we continue: I’m a developer, and if you’ve read this far I’m assuming you are, too.  I didn’t investigate some of the more basic prerequisites typical for development on Mac OS X, as I’ve got the Developer kit installed, as well as MacPorts and Fink.  If these instructions don’t work for you, make sure you’ve got the basics ready to go.  We’ll only be using two external tools you probably don’t have, and we won’t be installing them on the system itself.  For the record, I’m running 10.5.2.

Here we go:

  1. Head over to the FlowPlayer project page and download the FlowPlayer sources.
  2. Download swfmill v0.2.11 to the same directory where you downloaded FlowPlayer.  As of this writing the current version is 0.2.12.  This version does not work with FlowPlayer as it’s currently written, so I’ve linked to the older version.  It is possible by the time you read this that a new version that does work is available.  Google accordingly.
  3. Download the mtasc Mac OS X package from the Motion Twin web site to the same directory where you downloaded FlowPlayer.
  4. Open a Terminal, cd to the directory where you downloaded the archives, and extract them:
    $ unzip flowplayer-2.0.1-src.zip
    $ unzip mtasc-1.12-osx.zip
    $ tar zxf swfmill-0.2.11-macosx.tar.gz
  5. Copy the binaries into their respective directories:
    $ cp swfmill-0.2.11-macosx/swfmill flowplayer-src/bin/swfmill/
    $ cp mtasc-1.12-osx/mtasc flowplayer-src/bin/mtasc
  6. cd into each directory, rm the Windows binaries, and symlink the Mac OS X versions:
    $ cd flowplayer-src/bin/mtasc/
    $ rm mtasc.exe
    $ ln -s mtasc mtasc.exe
    $ cd ../swfmill/
    $ rm swfmill.exe
    $ ln -s swfmill swfmill.exe
    $ cd ../../
  7. At this point you should be in the flowplayer-src directory. It’s time to compile!
    $ ant
  8. If all went according to plan, you’ll see some text output as the compile progresses. You should see the following lines at the end (your build time will vary):
    BUILD SUCCESSFUL
    Total time: 22 seconds
  9. You’ll find the various players in the build/ directory.  As a quick test, open FlowPlayer.html in a text editor, and look for ../FlowPlayerDark.html. Remove the ../ at the beginning so it just reads FlowPlayerDark.html. Next, search for http://flowplayer.org/video/honda_accord.flv and replace it with a reference to another FLV (the original doesn’t currently exist on the FlowPlayer web site).  Save the file. Open it up in your favorite web browser, and you should see the player.

That’s all there is to it.  Feel free to get in touch if you find anything amiss.  This just worked for me.

The Guy posted this article on March 25th, 2008.

Tagged

Categorized

Leave a comment (4 so far)→

This is my blog. Who am I? That's a swell question.

2fkd is proudly powered by WordPress
Entries (RSS) and Comments (RSS).