Sat 31 Dec 2011 02:09:32 PM UTC, comment #2:
So far it seems it will be next to impossible (or very very very hard) to support Viddler.
Viddler exchanges data about the video and its path in proprietary binary Flash-related format, called Action Message Format (AMF). [1][2] Even worse the data seems to be encrypted [3] with Blowfish. [4]
There is a thing called JDownloader [5] that seems to be free software (GPL license) and has support for it. [3] A Wikipedia article about it states that: [6]
Which is bad, if true. Luckily, the file with support for Viddler has GPL headers. [3]
There are few JavaScript Blowfish libraries out there, but they seem to be with unclear licenses.
The AMF message could be passed over XHR with binary headers, I think. There is an AMF JavaScript library, [7] if needed at all. It is licensed under the two-clause BSD license. The AMF message is only one and it is small, so I guess there is no need for library.
My conclusion is that even if I implement the JDownloader algorithm and if it works, it might be too much effort for one site. The Blowfish libraries are 20-30 KB. I guess one with clear license (free software) will have the same size. The AMF library, if needed is 28KB. This adds 20-60KB of code without the actual code that will use the libraries and will provide support for Viddler. Linterna Mágica is already ~230KB - loaded on every page.
In Epiphany some Viddler introduction clips are played with HTML5. The video URL for such clips is
http://www.vidler.com/file/<key>/html5/,
where <key> is a video identifier available in the HTML body of the dedicated video page. I've tested with some random clips, but it did not work.
Viddler provides download links for some clips, but not all. Another option is to use this links with Linterna Mágica, but only part of the videos will work.
Viddler provides [8] oEmbed API that returns JSON string that might be used in remote pages to create the Linterna Mágica button, If they support JSONP (callback parameter). It seems they don't.
[1] https://en.wikipedia.org/wiki/Action_Message_Format
[2] http://wiki.gnashdev.org/AMF
[3] svn co svn://svn.jdownloader.org/jdownloader/trunk/ ; less trunk/src/jd/plugins/hoster/VddlrCm.java
[4] https://secure.wikimedia.org/wikipedia/en/wiki/Blowfish_%28cipher%29
[5] http://www.jdownloader.org/
[6] https://secure.wikimedia.org/wikipedia/en/wiki/JDownloader#License
[7] https://github.com/jamesward/JSAMF/tree/master/web
[8] http://developers.viddler.com/documentation/services/oembed/
|