Tim Retout's www presence

Wed, 24 Nov 2010

The Archers website

For those who are not aware, The Archers is a soap opera about rural life, broadcast on BBC Radio 4. Its website has recently been revamped.

Unfortunately, I appear to be served the mobile version when I visit the front page (in all of Chromium, Iceweasel and Epiphany on Debian - admittedly not the most mainstream of browsers). BBC Mobile is doing some over-zealous useragent sniffing, it seems.

Also amusing: there's a "Who's Who" database of Archers characters, and several of them share the birthday "1st Jan 1970". There was I thinking that Harry Mason and Fallon Rogers had a 15 year age gap... but no.

This will be as a result of the underlying database storing values in Unix time, and having a default value of "0". An explanation of Unix time popped up in an episode of The Infinite Monkey Cage the other week, which was nice to hear.

Posted: 24 Nov 2010 19:48 | Tags: ,

Fri, 19 Nov 2010

First RTMP connection

Mwahahahaa, just a few moments ago, my local copy of gnash actually got past the RTMP handshake, and got a response from iPlayer. I need to be at work in around 8 hours, though, so no time to push this until tomorrow... and it needs some cleanup.

Obviously, no audio has yet been played. Don't be silly.

Posted: 19 Nov 2010 01:04 | Tags:

Mon, 15 Nov 2010

Gnash and librtmp

Having studied librtmp over the weekend, it doesn't drop into gnash as neatly as I'd hoped. Gnash already has classes to implement NetConnection and NetStream, which it makes sense to use - but librtmp is designed to replace the need for such classes to exist. So it implements certain higher-level responses to various calls from the server, that are necessary when downloading a stream. Gnash probably needs to hook in instead, and let the flash application decide what to do in these cases.

So more work required, and possibly changes to librtmp in future - but I've started fixing up Gnash's RTMP code instead, for now, and have sent a couple of initial patches to Savannah. I don't think YouTube exercises these code paths, so they're a little rusty - I hope to make more progress through the week.

Posted: 15 Nov 2010 13:27 | Tags:

Thu, 11 Nov 2010

Imitation is the sincerest of Flattr-y

Of course, now everyone wants to hate Flattr, and ban its buttons from Planet Debian. You can't coerce effectively over a network connection - unless you wave the DMUP at them.

It's an interesting exercise to square this approach with the promise at the heart of free software - freedom. We let people sell our software for a profit; we're a billion-dollar industry now. (Red Hat alone is worth $1bn.) That's before we start counting the money made by the businesses whose servers rely on us. But a developer advertising for €25 per month in donations? They must be banned!

We need those buttons - how else should I deduct reputation points from those who want us to pay a tithe to a third party? :)

Posted: 11 Nov 2010 23:21 | Tags:

Wed, 10 Nov 2010

Splitting librtmp from Gnash

So I studied the SWF 8 iPlayer a little - there are some simple rendering issues with Gnash that I'd like to come back to, but the biggest problem is obviously the media not playing. Looking at the network requests, wireshark says something about malformed packets - Gnash is getting as far as making RTMP requests, but the connection dies pretty quickly.

My working theory is that there is a bug in the Gnash RTMP client code. This code was forked from rtmpdump, and has since been converted from C to C++, and a whole bunch of other stuff. It's quite possible that there is some change deep in the code which hasn't been copied back into Gnash - therefore, it makes sense to get Gnash building against librtmp properly, which is now a separate library.

This, of course, means actually writing code. Eurgh. I try to avoid that when I can, but sometimes it is inevitable. :)

When writing larger changes, I find it takes me longer to get acquainted with the existing code base - in this case, two code bases, since I have to understand librtmp at some level, as well. I'm not expecting to produce anything before the weekend, which is frustrating. It is also risky to write about stuff before you have completed it, because it can be a very public failure if you don't manage it!

Posted: 10 Nov 2010 22:38 | Tags:

Mon, 08 Nov 2010

Eyeing up iPlayer

There exist several different versions of BBC iPlayer. (Even if you don't care about the main iPlayer site, perhaps you might want to watch videos on BBC News one day, which uses the same code.)

Here is some (reformatted) Javascript from the BBC's site:

a = glow.embed.Flash.version();
f = "";
f = a.major>=10 ? "10player.swf"
  : a.major<8   ? "7player.swf"
  : a.major==9 && (a.minor>0 || a.release>=115) ? "9player.swf"
  : "player.swf";

It is clear that Flash 9.0.115 holds special significance; this was the version that introduced SWF Verification support. The 7player.swf file seems to have disappeared entirely - I get a "404 not found" error. That means there is still one version of the iPlayer which hopefully should not require implementing SWF Verification.

Navigating around the site with Gnash declaring itself as version 8 (with a patch applied to fix Glow compatibility), only radio programmes attempt to play using this version, and even then not the live streams. (No, gnash still doesn't play anything, don't panic.)

So it would seem to me that fixing Gnash's support for this SWF 8 iPlayer would be a good place to start.

Posted: 08 Nov 2010 00:14 | Tags: ,

Sun, 07 Nov 2010

Gnash and downloaded SWF files

So, with the GNASH_OPTIONS=writelauncher hint from last time, you have got a script which runs gnash. It is still running a remote SWF file, though - you want to modify that file to isolate a test case, and for that it will need to be on the local filesystem.

First, look in the gnash-debug-1.sh script to find the URL for the SWF, and download it. It's the last option passed to gnash.

In order to convince the file that it's still being served from the web server, you now need to swap the '-U' option in the gnash command line for a '-u'. This is enough for gnash 0.8.8 to play the file.

Unfortunately, if you are running current git master, this does not work. You also need to feed the SWF from standard input to gnash - i.e. use '-' as the last option, and redirect the SWF file to the gnash command:

/path/to/gtk-gnash -u http://some/url [more options] '-' < downloaded.swf

If any of this is documented, I'm buggered if I can find it.

Posted: 07 Nov 2010 20:30 | Tags:

Wed, 03 Nov 2010

Gnash from git

Gnash has moved from bzr to git, at least for the moment - Savannah's bzr setup is slow and unlikely to improve, so the choice is git or Launchpad, apparently. (Thinking selfishly, I'm a lot more familiar with git than with bzr, so I hope it stays this way.) My instructions from July have changed only slightly:

git clone git://git.sv.gnu.org/git/gnash
cd gnash
./autogen.sh
./configure --enable-renderer=agg \
            --enable-media=GST \
            --enable-gui=gtk \
            --with-plugins-install=system
make
sudo make install
sudo make install-plugins

Buried near the end of the bug reports wiki page is a useful tip for debugging - export GNASH_OPTIONS=writelauncher before starting the browser, and gnash will write out the instructions for starting a local copy.

In practise, these instructions seem to appear as a file called /tmp/gnash-debug-1.sh, and that will reference a file matching /tmp/gnash-cookies.* - so don't bother trying to dig through the debug log.

With this tip, it's possible to get the browser out of the loop, and focus on debugging gnash (which should be enough for most problems). At least, that's what I hope - I've spent the last hour or so just figuring this stuff out. Hmpf.

Posted: 03 Nov 2010 22:38 | Tags:

Flattr-y will get you nowhere

Dato pointed out on my post yesterday that I had omitted to link to the Ikea catalogue. And then it hit me - I am completely failing to monetize this blog! (Sadly, Ikea aren't in a position to give me any kickbacks right now.)

Since my money would be spent on innovative Swedish design in any case, I present a new microdonations system: Flattr-pack. I'll add a "Flattr-pack this!" button to everything I write, and then you can send me furniture with one easy click.

Unlike other systems, this has the advantage that no one will be taking a 10% cut of your donations. Awesome!

Or maybe not.

For those who don't know what I'm on about, Flattr is a website that lets you donate small amounts of money to other websites. It has been proposed to use this site to support free and open source software (FOSS).

Now a quick modern anthropology lesson: in a 1998 essay titled "Homesteading the Noosphere", Eric Raymond conjectured that FOSS society is a gift economy; your reputation is proportional to how much you give away.

At first sight, microdonations drop neatly into this system; after all, the users are giving money away, right? And yet somehow, I don't think those users are gaining much in terms of reputation. Not in the same way as if they reported bugs, say; joined a localization team; or even just turned up to conferences and volunteered to sit on the front desk.

Both types of activity could be described as "donations" - but in one case, the donation benefits the whole community around the project, and in the other it goes to just a few top developers. It's a plain old exchange economy in disguise. I do hope that those users are not dissuaded from making the more generous donations just because it's more convenient to whip out a credit card. That would not be in their long-term interests, or those of the community as a whole.

I fear this scheme could also incentivize some oddly inefficient behaviour; writing blog entries purely for their donation potential, say, or even content-free search-engine optimization posts.

Speaking entirely personally, I do not plan to join in.

Posted: 03 Nov 2010 00:49 | Tags: ,

Mon, 01 Nov 2010

Boxes

Today I bought two Ikea boxes. Possibly the best £8 I have ever spent - I still have a load of bits of paper to sort out, but now they're all hidden from sight in a sleek, black and chrome rivet-effect container.

More than simply reclaiming my sofa from the piles of notes, they seem to point to a higher truth; they fit their purpose in a way that is hard to articulate, like some platonic Form. Taking complexity, and making it manageable; but more than that, elegant.

At some point, I lost the ability to explain to my friends and family what it is I spend my spare time doing. I feel isolated; I cannot express what motivates me, or even what it is I do. In fact, sometimes I can't even describe it to myself. Perhaps I never could.

I don't believe that you can buy happiness; but if I surround myself with metaphors, maybe I can buy clarity.

Posted: 01 Nov 2010 18:42 | Tags:

< November 2010 >
SuMoTuWeThFrSa
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
282930    

Contact

Tim Retout tim@retout.co.uk
JabberID: tim@retout.co.uk

Comments

I'm afraid I have turned off comments for this blog, because of all the spam. Let's face it, I didn't read them anyway. Feel free to email me.

Links

Copyright © 2007-2011 Tim Retout