CNN Videos on Linux

The CNN.com video experience is optimized for Windows Media Player 9 or above. No Windows Media Player detected.

This is the message which greets Linux users who attempt to view CNN news streams. I guess optimized for is officially euphemistic technobabble for restricted to.

What’s next? Restrooms “optimized for customers only?”

Luckily, we can out-nerd these dopes:

  1. Install the GreaseMonkey extension for Firefox
  2. Grab the CNN Video Link script over at Userscripts.org
  3. Head back to CNN.com, and exercise your newfound right to “Save Link As…” the .ASX file
  4. Extract the mms: link from the plain-text .ASX file and feed it to MPlayer
  5. Enjoy!

Feel free to add the --dumpstream switch to archive the stream. Indeed, feel very free.

Advertisements

9 Responses to “CNN Videos on Linux”


  1. 1 Mark Longridge December 24, 2005 at 7:18 am

    Have you seen the NEW flash-based frontend for videos on cnn.com ?
    Now greasemonkey no longer works! Any ideas on how to contend with this new evil??

    Mark

  2. 2 Mark December 24, 2005 at 1:03 pm

    Mark,

    I just took a look. I can play them, but not easily. It looks like, when they load the flash video player, they pass along an XML file that configures it. Here’s an example:
    http://www.cnn.com/.element/img/1.3/swf/pipeline_mainpage/config.XML

    This file, in turn, references other xml files for various categories of video. Here’s an example of that:
    http://www.cnn.com/.element/ssi/auto/1.3/pipeline_mp/featured.videos.xml

    These XML documents have <video> tags, which contain a “videoUrl”, which seems to always be a call to the cnnVideo() javascript function, which is defined here:
    http://i.cnn.net/cnn/.element/ssi/js/1.3/main.js

    The first argument to the cnnVideo() function call will be ‘play’. The second will look something like this:
    ‘/video/tech/2005/12/24/shannon.la.melon.mystery.affl’

    If you trace through the cnnVideo() function, you’ll see that this eventually results in the following ASX URL:
    http://www.cnn.com/video/tech/2005/12/24/shannon.la.melon.mystery.affl/video.ws.asx

    Now we can just wget the ASX file, and grep it for a WMV stream. In this case, its here:

    mms://wmscnn.stream.aol.com/cnn/tech/2005/12/24/shannon.la.melon.mystery.affl.ws.wmv

    If you fire up mplayer on this URL, you’ll see a news story about melons.

    Phew, that was a lot of work šŸ™‚

    I’ve no idea how hard it would be to write a greasemonkey script to automate this.

    Actually, it’s probably a moot point: I don’t know squat about Flash, but I get the impression that it has recently acquired a fairly comprehensive cross-platform video capability. For example, Google video works great on Linux and everywhere else I’ve tried it.

    What I’m saying is, it might be easier to just lie to cnn.com and tell them, “oh yes I’m running Windows”, because there’s a fair chance the flash video player would work just fine.

    I believe there are Firefox plugins that allow it to masquerade as another browser. I’ll give this a try and post again if it works.

    -Mark

  3. 3 Mark December 24, 2005 at 1:16 pm

    I tried spoofing the user agent string, and it made no difference. :/

  4. 4 Mark Longridge December 24, 2005 at 4:09 pm

    Hey Mark,

    I tried your spoofing idea with Konqueror (kde 3.4.2 build) so that it said it was IE 6.0 on XP and it worked, so thanks šŸ™‚

    Better still when I clicked on the left of cnn’s main page I got to http://www.cnn.com/video/ I found links that could be deciphered by greasemonkey. Guess I jumped the gun and assumed I was locked out because of the flash stuff. Still I wrote cnn and expressed my displeasure… cnn isn’t exactly being Linux friendly here.

  5. 5 Fred May 31, 2006 at 6:14 am

    Just install the mplayerplug-in for Mozilla / Firefox: http://mplayerplug-in.sourceforge.net/ It should work with Flash just fine.

  6. 6 Mark May 31, 2006 at 7:12 am

    Fred,

    I just tried this, and it doesn’t work for me. I used the mozilla-mplayer package from Debian (maybe it’s old, or not the same thing you’re suggesting?).

    I still get the “optimized for Windows Media Player” message. I even spoofed my user-agent, but it didn’t seem to matter.

    -Mark

  7. 7 Tony June 1, 2006 at 12:23 pm

    Oddly enough, I’m having the same problem on my windows machine. I’m not sure why, and it works fine on another machine with the same extensions installed.

  8. 8 Dan September 11, 2006 at 8:56 am

    Tony,

    it appears that cnn has optimized their video experience for nobody.

  9. 9 George May 13, 2008 at 10:56 pm

    Note to all: In order to view CNN videos you need to download the following plug in for Fire Fox (Iceweasel)

    https://addons.mozilla.org/en-US/firefox/addon/59

    Then you need to select the option- Netscape 4.8 (Windows Vista). I hope this helps most of you out there! I am so glad that I can view CNN videos now!

    ~George


Comments are currently closed.




%d bloggers like this: