As I mentioned in a previous post, the .Astronomy 4 workshop at the Haus der Astronomie consisted of talks, unconference sessions and a hack day. Previously we had streamed the morning talks but we'd suffered problems. A combination of .Astronomy attendees overwhelming the local network, and technical issues such as poor sound quality/low resolution meant the live streams didn't add much value. For .Astronomy 4 we decided to forget the live streaming and put them online afterwards.

We'd been planning to make use of all the incredible equipment at Haus der Astronomie to record the presentations directly from the projector feed. Technical gremlins struck on the Sunday and we had to fall back to recording video with my digital camera. This was far from ideal because the talks were projected onto the curved surface of the planetarium dome, and I'd also left my mains power lead at home so my camera would occasionally need a battery replacement. On the audio side, I was able to plug into the planetarium's sound system to get the audio directly from the microphones so all was not lost.

The week after .Astronomy I started the process of getting the talks ready for the web. Simply uploading the video from my camera would have been quick for me but it would have been a fairly grim experience to watch with the occasional gap due to a battery replacement. I also had Kevin Govender's talk about Astronomy For A Better World fresh in my mind so I was aware of not excluding those with low bandwidth. The result was that I created the .AstroPlayer: a webpage that synchronises audio with static slides, notes and tweets.

By default, the page contains all the slides for a talk as small thumbnails (168x126px). When you load the page it tries to fetch a higher quality version of the first slide and uses this as a test of your bandwidth. If it is quick, it defaults your playback to "HD" and that means it will load higher resolution (1024x768px) versions of the slides as it goes along. It also does a check of your screen resolution as there is no point loading the big images if you are on a tiny smart phone. In those cases it might load a medium resolution version (400x300px). The result is that on the slowest connections and smallest screens, each slide works out around 10 kB each compared to over 120 kB at full resolution. A couple of the talks had small demos and those sections are included as videos (in either WebM or MP4 formats depending on your browser).

The "HD" setting also switches between two different audio files encoded at different bit rates to help save bandwidth. Actually, for audio to work in multiple web browsers I have to have both MP3 and OGG versions for each of these bit rates. To standardise this across all the talks I wrote a simple script which encodes from wav using VLC on the command line. In the browser I made use of the Buzz Javascript library to deal with cross-browser HTML5 audio.

The rest of the effort was adding bells and whistles such as a fullscreen option (if your browser is modern enough) and keyboard controls (left/right to move through the slides and space bar to pause/play). I synced up the tweets from the talk thanks to Geert's tweet archiving, and I added notes to URLs mentioned in the talks by hand so that nobody would have to re-type them from the slides.

One final thing I want to point out is that if you don't have Javascript-enabled you aren't excluded from the party. You will still be able to see all the slides (with links to the high resolution versions), the tweets, the notes and get links to download the audio.

I hope the final result of my post-dotAstronomy hack is useful, easy to use, and fairly respectful of your bandwidth.

Posted in astro blog by Stuart on Friday 17th Aug 2012 (00:31 BST) | Permalink
[an error occurred while processing this directive]
[an error occurred while processing this directive]