Gnash and cookies

A new release of Gnash, version 0.8.9, is due in the near future. Plenty of bugs have been fixed, but some users are still going to have problems playing YouTube videos. Here's a short explanation. At some point last year, YouTube started setting HTTP cookies in your web browser, to keep track of which of their video servers is nearest to your machine. This lets them provide a better experience for you (I guess)....

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.

November 19, 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....

November 15, 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....

November 10, 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....

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....

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....

Gnash and BBC glow

One thing I noticed having started to use gnash is that the BBC's iPlayer website (UK-only, I believe) gives a message like "You do not have Flash player installed" - not merely complaining about the version, but actually not recognising gnash as a Flash player at all. Cue some digging. The BBC's pages use glow, an in-house JavaScript library (available under the Apache 2.0 License) to detect whether Flash is installed....

Gnash

Adobe aren't supporting their flash player on amd64 right now. The cognitive dissonance gets a little draining, anyway, and I've seen the hoops I'd have to jump through to get the 32-bit version running. So I'm going to try tracking gnash trunk for a while. First impressions: gnash seems easier to build than it used to be (or maybe I just read the instructions this time). I chose the AGG graphics backend, with gstreamer and gtk....