Trailers

From Indie IT Wiki

Watching Apple HiDef trailers in Linux through a browser is problematic, if not downright impossible. So the answer is just to download them.

1. Go to Apple Movie Trailers, right click on the link to the trailer and copy.

2. In a terminal type:

wget -U 'Quicktime/7.6.2'

3. Add a space at the end and then past the URL

4. This is the important bit, move the cursor back to before the resolution of the trailer, i.e. 720p.mov. He you need to add a h, i.e. h720p.mov

Example 1 (before adding an h)

wget -U 'Quicktime/7.6.2' http://trailers.apple.com/movies/lionsgate/conanthebarbarian/conan-tlr2_480p.mov

Example 2 (after adding the h)

wget -U 'Quicktime/7.6.2' http://trailers.apple.com/movies/lionsgate/conanthebarbarian/conan-tlr2_h480p.mov

5. Hit return and the file downloads in to the main root of your home directory.

Difficult eh...

Playing Apple Trailers Direct With Mplayer

mplayer -cache 200000 -user-agent 'QuickTime/7.6.2' http://trailers.apple.com/movies/fox/xmenfirstclass/xmenfirstclass-tlr2_h640w.mov

Apple Trailers XML File

List of current movie trailers with posters and description...

http://trailers.apple.com/trailers/home/xml/current.xml

List of all movie trailers with just posters...

http://trailers.apple.com/trailers/home/xml/widgets/indexall.xml

Wget Timestamping

Timestamping (-N option) can be used (especially in an automated script) to only download a file if it has changed (a bit like rsync backing up). You can download a file so that it keeps its date of modification.

To check the date...

 wget --spider -S -U 'Quicktime/7.6.2' http://trailers.apple.com/movies/lionsgate/conanthebarbarian/conan-tlr2_h480p.mov

HTTP request sent, awaiting response... 
  HTTP/1.0 200 OK
  ETag: "2a929cc-4a2a25ddcdd80"
  Server: Apache/2.2.14 (Unix)
  Last-Modified: Fri, 06 May 2011 21:42:30 GMT
  Content-Length: 44640716
  Content-Type: video/quicktime
  Cache-Control: max-age=1952
  Expires: Sat, 14 May 2011 13:54:20 GMT
  Date: Sat, 14 May 2011 13:21:48 GMT
  Connection: keep-alive
Length: 44640716 (43M) [video/quicktime]

To download the file the first time...

wget -N -U 'Quicktime/7.6.2' http://trailers.apple.com/movies/lionsgate/conanthebarbarian/conan-tlr2_h480p.mov

To download the file the next and subsequent times...

wget -N -U 'Quicktime/7.6.2' http://trailers.apple.com/movies/lionsgate/conanthebarbarian/conan-tlr2_h480p.mov

...but it will only download it if it has changed.

Server file no newer than local file `conan-tlr2_h480p.mov' -- not retrieving.