Skip to content

maximize

The ubiquitous maximize button on Flash video players is missing on a certain URL of interest to me. You can only watch it at 325×198 px (it’s actually almost twice those dimensions). This has forced — and I do mean forced — me to rummage through the page and find a way to download the content so I can view it at a normal size.

I started with the usual “inspect element” routine, and discovered that the media is streamed via rtmp. This requires an Intermediate Internet Forensics Kit to untangle:

  • a way to decode the flashvars variable that is passed by the browser to Flash
  • a tool to download the RTMP stream
  • a way to play the downloaded file
OK so the first step is install some tools, maybe actually just one, called rtmpdump. I used the MacPorts collection to install it.
to find the URL of the video stream, which is kept in a variable called “jsonString”. You can get at it like this:
$ curl "http://sharks.nhl.com/club/gamevideo.htm?id=2011020365" | grep jsonString
You’ll get a boatload of gibberish, including a bit that looks like this:
rtmp:\/\/flash.onthefly.nhl.com\/ondemand\/NHLHighlights\/mp4:20112012\/02\/0365\/2_365_mtl_sjs_1112_h_continuous_1600K_16x9_1.mp4

Well that is some hideous gibberish, way too many escape sequences. Pipe it through sed 's/\\//g' to get rid of the backslashes. Then it’ll be easy to  pick it apart:

  • the host part: flash.onthefly.nhl.com
  • the “app”, which is the first two URL path segments: ondemand/NHLHighlights
  • the filename, in this case 2_3w65_mtl_sjs_1112_h_continuous_1600K_16x9_1.mp4

OK so now we are ready to download! All you need to do is string all the details together, along with the URL of the swf file which is required for some wort of authentication token, like this:
$ rtmpdump -r rtmp://flash.onthefly.nhl.com -o sharks-habs-hilites.flv \
−−swfVfy "http://www.nhl.com/swf/DynamicLeadThreeColumn.swf?v=5.7" \
--app ondemand/NHLHighlights --playpath \
mp4:20112012/02/0365/2_365_mtl_sjs_1112_h_continuous_800K_16x9_1.mp4

The -o option specifies the output file (don’t be mislead by their use of .mp4 for a Flash video stream) and now you can open it in anything that can play an FLV, Movist or VLC will do fine.

Final note to the folks at the NHL: I know you went to trouble to try and keep people from downloading, um, game highlights? Question for you: if there had been a maximize button on your player, would I have bothered with all this?

daiso

How much do we love Daiso? Well, a lot since we found a bag for sundry pool items there. I am not sure what the original purpose of the bag is, though it is “A4-sized”, if you want to keep some paper in a soft bag.

My favorite part is the inscription in the lower right corner, which reads:

I will pack it with a wonderful memory. I open it, and look.

Seriously, that is a lot of utility and entertainment for $1.50! Also entertaining is the V mit Umlaut.

Detail from my new "Favric Case."

de-sea-foam-erator

If there is a web site the you like the the content on, but can’t stand the look of, there are a number of options for adding your own CSS. There is Safari + “User CSS”, Firefox + GreaseMonkey, and so on.

If, like me, you aren’t a designer and CSS does not come naturally to you, actually getting the CSS to load and work is another story. Here’s what I came up with to get rid of the sea foam scheme on http://www.sfgate.com/:

a:visited {
 color:#282828 !important;
 text-decoration:none !important;
} 

a:link {
 color:#000000 !important;
 text-decoration:none !important;
} 

div.headernav_tile {
 background:none !important ;
}
div.headernav_leaderboard {
 background: none !important;
}

The !important statement after each rule means the opposite of what it appears to a programmer. As the exclamation point symbol is frequently used to express “not”, it’s use here as “more” is counter-intuitive. Fortunately, the use interface for “User CSS” prompts you with this information or I might never have figured it out.

Finally, the a:link and a:visited stanzas are probably useful on most sites you might want to re-style; the last two stanzas are completely sfgate.com-specific.

crapware

Can you guess the time we installed the “upgrade?”

I’d take it more in stride, but this PostScript preflighting software licenses at $20k/host and stubbornly refuses to use more than one CPU/core. We were considering putting our 2 licenses on virtual hosts to at least free up some hardware, but can we really do that if it’ll consume 70% of a CPU when idle?

Add to that that you can’t run it as a service, you are requred to keep a generic user logged in at the console to run the application.

Fie on you!

silos

An interesting op-ed by an former Microsoft VP, describing the silos that company is divided into and a bit of the internecine warfare that goes on between them.

Microsoft posted a rebuttal, and one of their point was the integration of a product called OneNote into the Office suite. This was the first I had ever heard of OneNote, so I clicked through to the demo page and found that it requires Flash.

Maybe someone should tell the OneNote team about Silverlight?

reservoirs

I know the reservoirs could use the boost, but still: sigh.

1862

I made previous reference to a scan available online of a map of San Francisco and my intention to put that map on a Google Map. Well, I’ve spent way more time on it than I anticipated but it finally, actually works as I originally envisioned.

Challenges:

  1. Google Maps are aligned with “true north”; the old map is aligned with some other north, possibly magnetic north at the time the map was made
  2. the horizontal and vertical scales are not the same
  3. the old map apparently fell apart and was taped back together; this was not done perfectly and there are a few small gaps and missing bits
  4. the scale tends to vary over relatively small distances; agreement between the tiles I generated and Google’s tiles can wander even within one tile

I ultimately decided not to fix items 3 and 4. Fixing the gaps tended to do more harm than good and scale variances require far more graphics-fu than I am ever likely to have.

If you want to cut to the chase & see the map, it is here.

Here is what I did: (Continued)

Tweets for 2010-01-10

  • pet peeve: "simple" script in <new language> gets unwieldy and I wind up re-doing it in Perl … maybe all I have is the 1 hammer? #

Tweets for 2010-01-07

  • love my eyetv but the only API is AppleScript :( #
  • if you had bit.ly preview, you would already know where that link goes … http://bit.ly/p7aq #

neighborhood

I tweeted a few days ago about an article on SFGate about the little street we live on. A couple days after that, the SFist posted an old map of the city from 1862.

Take close look at the map, in the lower left corner. If you follow Market Street to the lower left corner, near a large number 11 is “Kate Street”. This street no longer exists, and it leads to an area labeled “Hospital Area”; this is now Duboce Park and three cul-de-sac blocks of homes, one of which is now Potomac St. It’s fun to see the map agree with what I read in the book by Harry Nimmo referenced in the article.

I am entertaining a fantasy of creating a Google Map of the area and replacing the tiles with the old map. Hopefully I’ll actually get to that.

UPDATE: I’ve checked the Google Maps API, and it seems what I need to do is a “Custom Map Type”, which The Google deems an “Advanced Topic.” They put this in red; I may be in over my head!