This is NOT an official BBC page.
STOP PRESS: the online radio player now contains (most of the time?) an unobsfucated "play in standalone player" link which can be used directly. (200604)
The BBC allows listening to radio programmes online from their website. Various pages contain "listen" links of two types:
Simple URLs point to the audio stream and can easily be fed into an external player that understand the RealAudio protocols and encoding. If a player does not accept the http URL, it may need the real streaming URL that is contained within the HTTP response:
$ curl http://www.bbc.co.uk/radio4/arts/ram/agoodread.ram rtsp://rmv8.bbc.net.uk/radio4/tue1630.ra?
The rtsp URL can be fed to a player, like mplayer for instance. Mplayer can also play the http URL directly using the -playlist option. Some players allow saving the stream to disk (for mplayer, use the -dumpstream option).
The "Player URLs" open an extra window that only works on some browsers and one player, making it unusable for many people. It does not seem to bring any useful feature.
Fortunately, it is possible to get rid of this player and find the equivalent simple URLs that can be fed directly to a media player.
To find these URLs from a web browser, go to the player page and use the "view frame source" option in your web browser, for the player frame (that is the part of the screen with the play buttons and volume control). This will show HTML which contains an embed link. The one after the noscript tag is readable, and at the time of writing looks like this:
<noscript> <embed src="/radio/aod/shows/rpms/radio4/today.rpm" ...
This turns into the following absolute URL, usable with a player:
http://www.bbc.co.uk/radio/aod/shows/rpms/radio4/today.rpm
It seems the pattern is regular and so the latter form can be guessed from the "Player" URLs.
I have written a quick and dirty Python script that can modify a BBC web page and add direct links to the RealAudio streams for programmes that are only available through the "player" interface. It can also extract the links into a simple HTML list, as shown here for radio 4 (extracted from the original BBC listen again page; note it is not updated in real time so may get out of date).
It shows two links, http and the actual rtsp link it points to as explained above. (The http link is found by extracting it from an <embed> tag in the player page.)
It appears that an error message is displayed when following the http link from a web page, trying to force the user to go through the BBC player. Fortunately, these URLs work fine when fed directly to a player or low level HTTP client. The error seems to be triggered by the Referer (sic) HTTP field, so disabling this in a browser or copy pasting the link should bypass this inconvenience.
The patch/listing script only deals with Player URLs because simple URLs are usable directly. The radio 4 page strangely includes a mix of encumbered and plain URLs, unlike say the BBC7 listen again page.
2005-01-29