Vimeo download escalation

Vimeo has recently deployed countermeasures that makes it harder to download videos, unless the uploader has marked them as downloadable.

This affects both my youtubedown script, and Miro. Since Miro is what I use to subscribe to most of the blogs through which I discover new music videos, this negatively impacts my mixtapes, which is how it impacts you.

So help me reverse-engineer their new countermeasures, ok? If we fix this bug, my mixtapes get better.

Here's an example: http://vimeo.com/43940325.

As of their new site roll-out a month or two ago, the new way to download that video would be to load "http://vimeo.com/43940325?action=download" with the header "X-Requested-With: XMLHttpRequest", but with private videos, that's a 404. However, if you request that style URL on a downloadable video (here's one) then you get HTML with links to MP4 files.

On a private video, when you hit "Play" in either the Flash player or the HTML5 player, it loads "http://av.vimeo.com/Nx5/Nx3/Nx9.mp4?aksessionid=HEX&token=CTIME_HEX2" which returns the full MP4. Those URLs go 403 after some small number of minutes, and it loads a URL with different hex each time you hit play (though the decimal numbers stay the same), so presumably the ctime is a part of the hash.

The fact that this works in the HTML5 player means that they are computing those URLs from Javascript somehow, rather than with a secret key that is baked into their Flash player, so that's promising. But I don't have a lot of experience reverse-engineering gigantic Javascript apps.

Since it will be the first thing you find when googling, let me point out that the old moogaloop URLs like "http://vimeo.com/moogaloop/load/clip:ID" are 404. You used to be able to use those to get a signature, then construct a download URL like: "http://vimeo.com/moogaloop/play/clip:ID/SIG/EXP/?q=hd", but no more.

Ideas?

Tags: , , , , ,

DNA Lounge update

DNA Lounge update, wherein there are some construction photos.
Tags:

Early morning frost on the Planes of Eternal Torment.

I think I just saw Parking Enforcement hassle a FedEx truck for blocking the bike lane.
Tags: , ,

metrics and malloc

Dear Lazyweb, how do I get real font metrics on iOS?

On OSX, the only way I've found to do it is:

  1. Make an NSTextStorage and NSLayoutManager;
  2. Get an NSGlyph from that;
  3. [NSBezierPath appendBezierPathWithGlyph];
  4. currentPoint to find the width;
  5. bounds to find the bounding box.

(You'd think you could get the NSGlyph with [NSFont glyphWithName], but that expects full Unicrud names like "LATIN CAPITAL LETTER A WITH ACUTE" and there is no way to get one of those from a single-character NSString, so I don't understand why that API even exists.)

Naturally, none of these APIs exist on iOS.

  1. [NSString sizeWithFont] gives us width and ascent, but nothing about the bounding box or bearings.
  2. [NSString drawAtPoint] to an offscreen CGContext returns the width of the character and the overall ascent of the font;
  3. CGFontGetGlyphBBoxes() might help (or it might just return the ascent/width again instead of the bounding box, I don't know) but there seems to again be no way to map a single-character NSString to a CGGlyph.

So I'm stuck with assuming that all characters have a 0 lbearing and rbearing, and things get clipped. See query_font() in xscreensaver/OSX/jwxyz.m.

Secondly:

Does the malloc on iOS contain any tricks for allocating out of a private heap? What the LISPMs called *default-cons-area* and PostScript called save/restore. E.g., it would be convenient to do something like this in my code:

#define malloc(x) malloc_in_heap (my_heap, x)

And then at the end, flush that heap in one swell foop, that is, I want to be able to say, "I swear that nothing references any pointer that has been allocated out of this area any more, regardless of whether all corresponding free calls have been made; unmap it all right now."

I know about NSAutoreleasePool, but that doesn't help with malloc, only NSObject.

Tags: , , ,

Robot Hand beats you at Rock-Paper-Scissors every time.

"And that's how we can go from a chess computer to the apocalypse in just four years."

Previously, previously, previously, previously, previously.

Tags: , , ,