Thursday, January 05, 2006

A MannX-Annotated Keene Flood

In the last week of 2005, I started with Jon Udell's SWF screencast on the October 8-9th flooding in Keene, NH. The screencast itself is at KeeneFlood.html and while it's showing, if you go to the address bar and enter

javascript:alert(document.embeds[0].TotalFrames())
you can get out the count of the 2821 frames that he put in; you're talking to Flash.

I then typed a transcript for that screencast, into a document I called theScript.xhtml. That didn't take long; it's not a long movie. Then I editted a config.js file to refer to the SWF file, and started up the MannX browser app which let me synchronize the SWF file with the transcript; the author-mode interprets a click on the transcript as the assertion "the movie's current time corresponds to this point in the text," and it adds markup to the text. That was pretty quick, too. MannX constructed an XHTML template commentary file, with a slot for a comment on any given video segment; I filled in some of these slots, and ran an XSLT script to generate the actual commentary.

Finally, I constructed a glossary for the words in theScript; this was actually the slowest part, and the most annoying. I could have left the definitions empty, but I looked them up in Google (because it's faster than looking them up in wordnet; I have buttons for both.) The most important part of each definition is just the identifier, like "kid_n1" where "kid" might have several meanings. And I added some assertions at the base of the glossary: kid_n1 subClass person_n1, for example, to say that a kid is a kind of a person (at least for this usage of "kid".)

Now I can go to http://www.n-topus.com/mx/KeeneFlood or directly to http://www.n-topus.com/mx/KeeneFlood/playerFrames.htm and wait for the movie to fully load, then click on the script to select a segment, then play it with the play button...or get the movie to a given point and click "M" to synchronize movie and commentary...or select a place in the commentary and click "C" to synchronize movie and script. Hold the mouse over a comment and you see that its title attribute is the text of the script-segment on which it comments. Personally I always toggle the PlayOnSelection button from "Off" to "On" so that as I browse script and commentary the movie autoplays, but my co-author doesn't want that to be the default.

And so on. The current segment's text is always put into a textarea; I can select a word in this textarea and look it up by clicking "D" -- that shows the definition and selects it as topic, or I can scroll in the glossary and click to select a topic. If the topic is "person", then I click the "T"opic button to move in the script, finding the next instance of "person" -- which may actually be an occurrence of the word "kid".

It's far from perfect but I'm really rather pleased with it, and so is my co-author, and I hope that Jon U. doesn't object to my using his screencast this way. Various versions of MannX in various programming languages have been used for lessons in Russian, Greek, Hebrew, Spanish, and lately Pashto for the University of Kabul. (If you have installed Sun's Java 1.5 and JMF, as well as a Pashto font such as the Abdaali font from http://www.khpalapashtu.com/sitee/downloads/fonts.htm, you can go to http://www.n-topus.com/mx/Dialog3 or various other demos; note that the commentary is simply a translation into Pashto, and the title of each element is the English from which it was translated.) ...it's a lot easier now that I've got Unicode and my old problems with Japanese and Chinese (and even Russian, where I once had to alphabetize separately for (English+Russian)/(Windows+Mac)) simply don't arise.

I can't yet use this with Google's FLV files because they tend to report the CurrentFrame as frame 0 and TotalFrames as 1, so my MoviePlayer.js knows how to play my JMF applet and it knows how to play SWF, but it doesn't know how to play FLV. Maybe soon...especially after Flash 8 comes out for Linux.

I'm really hoping that something resembling this can be a basis for education world-wide, where lectures and demos on every topic are maximally available. I'm hoping that it can be a basis for journalism, where every interview will have a transcript and multiple commentaries. I'm hoping that it can be a basis for videoblogging.

Or then again, maybe not.

Update: I've added an ability to link directly to a segment or timerange, as well as to play automatically; for example, http://www.n-topus.com/mx/KeeneFlood/playerFrames.htm?segment=5-8;playOnSelection=true and http://www.n-topus.com/mx/KeeneFlood/playerFrames.htm?time=2700-2821;playOnSelection=true will work, but the primary annoyance is that you really have to wait for SWF file to load. (The "please wait..." in the textarea goes away.) n-topus.com does not have a fast server, and this can take as much as thirty seconds for Jon U's multi-megabyte SWF file. His own server is several times faster, and I can get far less annoying performance by simply uncommenting the line

// movieFilePath="http://weblog.infoworld.com/udell/gems/KeeneFlood_media/KeeneFlood.swf";
in the configuration file http://www.n-topus.com/mx/KeeneFlood/config.js. It's very sad that this is not a universal solution.

At the moment, I'm working on a multiMoviePlayer javascript class, for AJAX-style management of partial downloads of a SWF file which has been broken into several pieces. I can certainly write a playRange function which will start up SWFplayer N+1 when it comes to the end of SWFplayer N; the question (well, one of several questions) is whether or not I can do a smooth transition, given that the players have to be playing in the same spot on the screen. This I don't know.

0 Comments:

Post a Comment

<< Home