Search blog.co.uk

Archives for: January 2008

Who dares, wins

by cc0028 @ 2008-01-28 - 23:15:05

A streaming video follow-up

Well, I'd written to the Welsh TV channel (S4C) and told them that I didn't think that they could justify telling their viewers that they needed Windows media player when I'd just proved that you could use at least three others on Windows and four others on Linux, and fair play they had altered their wording a bit. They changed it to say that other players were available for non-Windows platforms, but that there was no guarantee that they'd work, or that they would support sub-titles.

I confess that this annoyed me a bit. Firstly, I thought that they were deliberately avoiding saying that there were other players available for Windows, and secondly I thought that it was a bit rich to suggest that these other pieces of software somehow might not work. So I wrote again and also translated my feelings to English for the benefit of the developers of Microsoft's rivals, to whom I sent the following:

I've just got annoyed with my favourite TV channel because of their treatment of non-WMP video players. I thought you might at least like to know what's being said, even though I doubt very much that there's anything anyone can do about it.

The story's a long one, so I'll cut it short.

I'm referring to the Welsh TV channel, S4C. Until recently they said on their website, "You will need Windows Media Player" in order to watch their programmes. I pointed out to them that in my experience at least the following worked on Windows:

* xine
* MPlayer
* vlc

... and that those all worked on Linux too, along with Kaffeine, of course.

They have now changed their wording to the following:

"You will require a media player capable of playing windows media 9 files, such as Windows Media Player. Other players are available for non-windows platforms, but these aren't guaranteed to work, nor support subtitles (sami) files."

There are two things wrong with this in my view:

* The alternatives are not just for non-Windows platforms
* There is no reason to suppose that the alternatives are any less likely to work than WMP (except for the sub-titles, where they may be correct. I wouldn't know. I don't need them).

I've told them what I think, but I doubt if it will make a difference.

Guenter Bartsch, the main xine developer, wrote back and said that he understood that I was annoyed, but that perhaps we should accept that they were just trying to avoid having to support anything but the Microsoft software, and should just be happy that they'd altered their wording at all. He also pointed out, as I had when talking to S4C, that the main problem was in the use of proprietary codecs instead of public ones like Ogg.

And I thought that would be the end of it.

This evening, just out of a vain hope, I again accessed the S4C site: and guess what. Yep, they've altered their wording again. Here's how I announced the change to the South Wales Linux User Group:

S4C have now changed their site to read:

"Byddwch angen chwaraewr cyfryngau sydd yn gallu chwarae ffeiliau
Windows Media 9, er engraifft Windows Media Player. Mae chwaraewyr
eraill ar gael ond nid oes sicrwydd y bydd rhain yn cefnogi ffeiliau
isdeitlau (sami)."

That is ...
"You will need a media player that can play Windows Media 9 files, for
example Windows Media Player. Other players are available but there is
no certainty that these will support subititle files (sami)"

Fantastic.

No sooner had I sent this off, than an email dropped into my mailbox from S4C confirming that they'd changed their wording.

I have written back thanking them for their patience and saying that I could not have written it better myself.

Well done S4C. My faith is restored.


 
 

Streaming video in Linux

by cc0028 @ 2008-01-05 - 20:25:07

Or how to watch telly on Linux when the channel thinks everyone uses Windows ...

Up until yesterday, you could have written on the back of a postage stamp everything I knew about streaming video. You might need, perhaps, half a sheet of A4 now: so I still don't know a lot, but I know more than I did. Here's why.

On a visit to the S4C Web site recently, I noticed that they were offering the facility to view some of their programmes on a computer. These were either programmes that had already been broadcast and had been saved to a file, or programmes currently being televised. "Ooh! There's lovely" I thought, as you do if you live in this part of the world, and clicked on a link to a programme shown earlier of a concert by the harpist Catrin Finch. I have this Catrin Finch problem: but let's not go into that.

The only response I got to clicking on the link was an error message saying that, "mms is not a registered protocol". The protocol MMS, it appears is a Microsoft proprietory video streaming format, and so not a lot of help to those of us who do not run Windows computers. Now, I've lived for nearly sixty-one years without needing mms so I'm pretty certain I could carry on without it, but it did appear to me that it was a bit unfair of S4C to provide content for Windows users only. So I wrote to S4C to see what they had to say.

I had an email back from them explaining that they felt that they had to use the most popular video streaming format, and referring me to some Web sites that turned out not to be of much use. It was pretty obvious from the reply that they weren't going to change their policies just for me, although I did point out that Linux users, minority or not, paid just as much for S4C as anyone else and ought therefore to get the same service as everyone else. It also occurred to me that if they applied their argument to language usage, S4C would not exist. It is the highest cost per capita television channel in the UK and serves 1% of the UK population. I didn't say that, though. Instead I just wrote that we'd have to agree to differ.

All this did start me thinking though, which is usually a dangerous thing, but in this case turned out fairly well.

I'm on the mailing list of the South Wales Linux User Group, so I posted there asking if anyone could suggest a way of getting the S4C programmes on Linux. Their combined help was truly amazing.

The first thing that I learnt was that you could obtain MPlayer for Linux. MPlayer is free, and supports the mms format. So I downloaded it and installed it. The result was that I could do this from a command line to watch Catrin Finch:

mplayer "mms://s4c.unique-media.tv/s4c_uk/bsm/hsbc_jazz_
aberhonddu___catrin_finch_ai0000803d21b8.wmv?sami=http:
//www.s4c.co.uk/sami/A290559874.smi"

The bit in quotes is the URI, and I got it by right-clicking on the link on the S4C Web page and selecting "Copy Link Location" from the context menu in Firefox. I then pasted the link text onto the command line I was using.

The results were not impressive, though. In fact the results were unwatchable with the picture stopping and starting all the time and the sound totally out of sync with the video. However, not to be deterred, I learnt next from the SWLUG faithful that you could do this:

mplayer -dumpstream "mms://s4c.unique-media.tv/s4c_uk/
bsm/hsbc_jazz_aberhonddu___catrin_finch_ai0000803d21b8.wmv
?sami=http://www.s4c.co.uk/sami/A290559874.smi"

This downloaded the stream to a file called stream.dump in the same folder as the folder from which the mplayer command was issued. Once the file had been downloaded, you could do this:

mplayer stream.dump

The results of this were better, because the stream was no longer downloading in real time: however the picture quality was still disappointing. By the way, I'm not sure how happy S4C would be to know that you could download the stream to a file like that. Does it make me a pirate?

Once again, the group had a suggestion. Had I tried xine? Well, no, I hadn't. In fact even though it came with my SUSE Linux distribution, I'd never installed it. Ten minutes later I had xine installed and tried:

xine stream.dump

The results were perfect. So I thought I'd try real time:

xine "mms://s4c.unique-media.tv/s4c_uk/bsm/hsbc_jazz_
aberhonddu___catrin_finch_ai0000803d21b8.wmv?sami=http:
//www.s4c.co.uk/sami/A290559874.smi"

No luck. Nothing.

Another post to the group and I discovered that xine didn't want to know about the final bit of the URL above: the bit starting with the question mark and ending ".smi". So I tried with this:

xine "mms://s4c.unique-media.tv/s4c_uk/bsm/hsbc_jazz_
aberhonddu___catrin_finch_ai0000803d21b8.wmv"

Absolutely perfect. Streaming video in real time.

And that would be it, really, you would think. I certainly did. I wrote back to S4C explaining to them how it was done and settled back to do some serious Catrin Finch watching. Just then another email from the SWLUG dropped into my mail box. It said:

While I was playing around with this I found this link, now I can click
on an mms link in firefox and it opens xine.

http://www.cinlug.org/node/316

Here is all you have to do (quoted from the site):

  • Open Firefox, type "about:config" (no quotes) in the address window, and click enter.
  • Right click on the window and choose <New>, then <String> from the pop-up menu that appears.
  • In the first pop-up box, enter: "network.protocol-handler.app.mms" (no quotes, and it might just be easier to cut 'n paste this into the box).
  • In the next pop-up box enter the path to Kaffeine (e.g. "/usr/bin/kaffeine").
  • Now, click in the main window again but choose <New> <Boolean>
  • In the first pop-up box, enter: "network.protocol-handler.external.mms"
  • In the second pop-up select <True>.

This only works, obviously, if you have Kaffeine - which most Linux distributions do. It would probably also work with any player that accepted the entire link location (i.e. including the bit from the question mark until the ".smi"). You would just have to change the "path to Kaffeine" bit, to "path to MPlayer", or whatever.

Now all I have to do is to click on the link in Firefox and the video opens in Kaffeine. Just, wouldn't you agree, as nature intended.

This prompted another email to S4C and the suggestion that they publish an article on their Web site explaining how to do it. Alternatively, I suggested - rather generously, I thought - that they might want to ask me to write an article that they could link to from their Web site. That way they don't have to accept any responsibility for its content.

So what do we learn from all this? A few things, I reckon.

Firstly, I learnt a fair bit about streaming video, and that can't be a bad thing.

Secondly, I learnt that the Linux community have the most incredible knack of working together to pool knowledge and to solve each other's problems. They've never failed me yet.

Lastly, I learnt that whatever it is, in the Open Source world someone will have had a crack at it and will have produced a solution. Not one of the applications that I have mentioned in this article is owned by a private company or individual. They are all the fruit of co-operative code hacking by a community of programmers interested in solving a problem. This is what programming should be like. It is more akin to a research activity than to product development: and it is done best when done openly and in a spirit of co-operation. It's why open source software works and closed source software often doesn't.

Vista, anyone? No? Didn't think so.

Happy new year to one and all - or "Blwyddyn Newydd Dda" as they say on S4C.

:)

Footer

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.