ITV is the main terrestrial commercial TV network in the UK. They have a TV catch up service called ITV Player which somewhat unusually delivers programmes not using Flash but instead Microsoft Silverlight, there is a port to Linux called Moonlight, but it doesn't work for me. Today though I found out that the Scottish version of ITV; STV has its own TV-on-demand catchup service, and a rather good one too. Programmes are delivered through Flash, so they can be viewed on Linux, but that is not all; I noticed that the site also has RSS feeds, which is quite unusual for a TV-on-demand service. Naturally I wondered if this feed could be adapted for use on Boxee, so I need never miss X-Factor again.
I found two types of RSS feed on the STV player site, there were programme specific ones, these could be dropped straight into Boxee (though the web site) and the programme could then be viewed. There was also a "latest programmes" feed which didn't quite work in Boxee and would link to the page for the programme offering typically the last two episodes. I tried this feed in Boxee, but it didn't pick up a video feed, so it was time to tinker with the feed a little bit with the assistance of Yahoo Pipes. After a bit of experimentation, I noticed too that the developers of the site had even used predictable URLs for the picture files linked to the programme, so it was possible too to add this in to the feed.
The Yahoo Pipe to create this feed can be found at: http://pipes.yahoo.com/liamgh/boxeestvplayer where you can examine it and create your own versions of it. If you haven't heard of Yahoo Pipes before the idea is that it is an environment where you can take web feeds (of various kinds) and create a program that can modify the data and combine it with other data if you wish. All of this can be done visually by connecting together predefined blocks of functionality. It is quite a powerful tool for creating mashups and something I've been spending a bit of time learning recently. The videos provided by the feed are only visible in the UK for various copyright reasons, but you might be able to apply the same ideas to other scenarios.
So on to the pipe itself! It is a fairly simple pipe with humble aims. It does three things:
- Modify the link provided by the "All programmes, All Episodes" RSS feed to point to the RSS feed for a programme, rather than its web page
- Change the 'http' part of the link to 'rss' so Boxee knows this is a link to another RSS feed and will replace the contents of the menu with this RSS feed if selected
- Generate a URL for a preview picture
Once the feed is generated it can be added to Boxee by logging into http://www.boxee.tv, clicking on Feeds, then Add New, adding in the URL of the pipe, ticking Video and clicking Add Feed.
The pipe consists of five steps:
1. Fetch the feed
This just grabs the main RSS feed (http://player.stv.tv/?rss) from the site so we can process it.
2. Copy the 'link' element as 'thumbnail'
We want to provide a nice image that will show as well hover over an item in Boxee. Fortunately the image URLs on the STV Player seem to follow a pattern. This is the start of our new element, we will just create a copy of the link element and in the next step manipulate it. Oddly enough to copy an element we must use the Rename module as this can both rename and copy elements.
3. Change the content of the feed for Boxee
Here we manipulate two elements of the feed with regular expressions. The first regular expression looks for the pattern http://(.*) which means 'grab everything in the URL after the http:// part' and then replaces the content of the link element with the pattern rss://$1?rss which means create a string that starts with 'rss://' (see http://developer.boxee.tv for more information on Boxee RSS feeds), add in the stuff we grabbed (this will replace the '$1' in our expression), then add '?rss' to the end which gets STV Player to generate RSS feeds rather than web pages.
The second regular expression modifies the new element we created in the last step. It looks for a pattern of http://player.stv.tv/programmes/(.*)/ so it will grab a part of the URL which is unique to the programme, e.g. for a URL of 'http://player.stv.tv/programmes/the-x-factor/' it will grab 'the-x-factor', we then drop this into two locations in a new pattern that should give us an image URL: http://files.stv.tv/img/player/$1/$1.jpg so in our example we should get 'http://files.stv.tv/img/player/the-x-factor/the-x-factor.jpg'.
4. Map the information onto an RSS feed
The information we obtained is of course an RSS feed, but we do this step as an easy way to drop our new image thumbnail URL into the correct element for Boxee to be able to display it.
5. Output
Every Yahoo Pipe ends in a 'Pipe Output' module and ours is no different.
So now we have an RSS feed that Boxee will handle!
Boxee will use its own internal RSS renderer to give you a menu you can naviagate with a remote control, if you click on an item you will see the available episodes, then clicking on an episode will bring up the player.
It isn't a perfect feed, the control panel of the original embedded flash player is still shown. The other thing to note is that on the site the different parts of the show are shown as seperate links. Boxee will play these parts one after the other but you will notice the time remaining being shown in this control panel is for the part of the programme that you are on.
This small experiment again shows just how useful RSS feeds are. By providing quite simple RSS feeds STV have now gained functionality for programmes to be shown in Boxee at no extra cost to them. It isn't perfect, but usable. For broadcasters this is good news as they embed adverts in the videos themselves and if you use Boxee you still get to see these. It also shows how useful Yahoo Pipes can be to modify a feed that is "almost there". If you like the idea of using Yahoo Pipes to generate RSS feeds for Boxee you might also like this: Deli TV – Personally Programmed Social Television Channels on Boxee: Prototype from Tony Hirst.
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
I tweaked the Deli TV pipe to parse the stv feeds so if you bookmark something rooted on http://player.stv.tv/programmes/.* it should work okay on Deli TV :-)
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Would this work on a REVO with Linpus ???? Is the default OS on some Revo's
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
The STV Player itself might, if Linpus has Flash available. Boxee probably wouldn't so you might want to install Ubuntu on it:
http://www.greenhughes.com/content/how-install-ubuntu-and-boxee-acer-as…
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
I think this is now broken. English ITV have recently (late September) moved away from Silverlight to Adobe's Flash. I suspect Scottish ITV have made back end changes too.
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Hi Croques, have just tried the pipe and it still seems to be working, what went wrong when you tried it? I saw the changes English ITV have made, really good news. Now just hoping for more RSS feeds from ITV and 4OD.
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Hi Liam,
The final part of the chain fails for me - that is playing the video. I either get a black screen or an odd looking charity ad which plays over and over. I am running a recent svn of boxee.
Programme lists and thumbnails are fine.
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Hi Croques, I've just tried it and it is working for me, but I'm using the last release of Boxee not the SVN version (am using version 0.9.14.6992M). You have to wait for all of the sponsor messages to play unfortunately, but the the programme plays. A blank screen might be seen for a few seconds while everything loads. Not sure why you would get the same message over and over. Could you try it with some different programme entries just to make sure it isn't faulty data being supplied on one item? Thanks!
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Liam,
Well, it works! I'm not sure what was causing my earlier problems, but whatever the gremlin was, it has disappeared now. So thanks for the feedback.
May I assume the same technique could be used for Channel 4's 4OD service?
Knowing we don't generally say thank you enough, may I say how useful your blog has been in getting my Revo running. I even tried my own mifi dongle yesterday - awsome. I guess this is some spin off from your OU work; if Harold Wilson could only see the power of what he started... just brilliant!
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Thank you Croques for you kind words! I do this blog in my own time, but I it is a pleasure because I've benefited a lot over the years from the amazing work of the open source community and the willingness of people to share information through blogs and forums, so I want to do the same.
On the 4od front they have said that they are thinking about RSS feeds and an API (http://twitter.com/4od/status/4125312750) so that is really good news. RSS feeds will also make interesting mashups possible too.
Re: ITV on Boxee with a little help from Yahoo Pipes and ...
Hi,
First of all, thank you for your efforts here. I really appreciate your taking the time to try and make this work. Now, question: does this still work? I tried cloning the pipe and then running it but it gives me an error 408. I have no idea what that means so I thought I'd ask you about it. Any advice will be greatly appreciated. Thank you.