Watch Apple Trailers On GNU/Linux

October 11, 2010

Today i noticed that the Apple Trailers page doesn’t let you play their videos on a GNU/Linux system by default. GStreamer couldn’t open the links to the .mov files that i found in the source code of the webpage, nor could VLC Player. Seems that Apple checks for the QuickTime User Agent string.

This means, unless GStreamer Plugin can fake that User Agent, we will have to go for a less user-friendly workaround. I downloaded the trailer i wanted to see using Wget with the -U flag to change the User Agent.

Go to the apple trailer you want to download, and copy the link to the .mov file by right clicking on the (failing) Gstreamer plugin on that page and chosing ‘copy’. Alternatively you can just go browse the source and find the .mov file there.

Now open up a terminal and type this:
wget -U QuickTime/7.6.6
now you can play it using VLC Player, or your favorite video player (if it supports .mov files)

That’s it!
you could also automate the process by using a greasemonkey script or a bash script as you please…
EDIT: hack, i made one for you! It’s a php script that downloads the trailer to your home/Downloads folder.
1. download the script, rename it ‘TrailerDownloader.php’ and put it in your home folder.
2. Go to the apple trailers page and choose a trailer you want to watch (click a movie poster). Then copy the url of the page.
3. Open up a terminal (make sure you got php5, php-curl, and php-cli installed) and type
php TrailerDownloader.php and press enter.
4. You’ll be presented with all possible trailer downloads for that movie, pick a number. Then hit the up arrow on your keyboard, and add a space and the trailer number to the end of the command. like this:
php TrailerDownloader.php 3
5. Hit enter and wait. The trailer will be downloaded to your Downloads folder.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: