How to watch Apple movie trailers on Linux, part 2

2009-10-24 22:34:09 GMT

Apple has recently made some countermeasures to block users who are not using the official QuickTime player to watch their movie trailers, such as Linux users. This bothered me deeply since I watch those trailers for more than a year and would like to do so in the future.

I presumed that correctly downloading movies required some user agent related masturbation and Wireshark proved me right when monitoring HTTP on a Windows host. After that it wasn't a big deal to play an Apple trailer:

mplayer -cache 4048 -user-agent QuickTime/7.5

This is really nice but I wanted to make it work out of the box. Though adding the user-agent option to an MPlayer or mplayerplug-in config file seemed like a viable option, unfortunately mplayerplug-in didn't respect this option in any config files.

Fortunately I realized that the Quicktime user agent string is hardcoded in mplayerplug-in for as of 2009-09-23 CVS.

Since the latest official release is very old, one has to build it from the CVS:

sudo apt-get remove mozilla-mplayer
cvs -z3 co -P mplayerplug-in
cd mplayerplug-in
sudo apt-get install libxul-dev
GECKO_XPIDL=/usr/lib/xulrunner/xpidl ./configure
sudo cp mplayerplug-in*.so /usr/lib/mozilla/plugins
sudo mkdir -p /usr/lib/mozilla/components
sudo cp mplayerplug-in*.xpt /usr/lib/mozilla/components

You also need to set the cache size of MPlayer so you won't only see the first few secs of the movies but the rest also.  Have this line in /etc/mplayerplug-in.conf :


Now restart Firefox and use my Greasemonkey script (also available on GitHub) to make the Apple Trailer pages work with mplayerplug-in.

Enjoy the movies and have fun!