MPlayer the media toolkit
You may have read in another article on here, about how I use MPlayer to listen to live audio commentary that I pay a subscription for, but the provider has no intention of supporting anything other than proprietary Microsoft formats. The script that I wrote still does its job, which is a surprise because the provider has been changing things in the way that they make the media available to their subscribers.
Other than the live audio streams, they also provide video clips of highlights and interviews, which they had hitherto made available for download, to be played in a stand alone media player. This suited me fine and I had no problems in watching the clips that they made available, using MPlayer and its collection of codecs.
Moving the goal posts
Now they have decided to remove the links to download the clips and are forcing users to watch them as streamed video. This isn't a major problem for most, as Windows will allow you to do this, even using Firefox. You can also do it under various Linux distributions and on FreeBSD, using the MPlayer mozilla plug-in and MPlayer. However, being a security conscious sort, I use OpenBSD, for which there is no port of the plug-in. I may get around to compiling it for my OS, but it is not a trivial task for a novice C programmer, needing the mozilla development libraries.
The provider uses a very basic method of obfuscating the URLs of the clip's .asf/.wmv files. It is then trivial to parse the HTML markup to get the location of the stream.
However, the streams are very choppy when watched straight from the server and I have a fast broadband connection, so the problem isn't at my end. I prefer to play the file from my hard disk to have smooth playback, but this isn't as straight forward as it might be. Luckily MPlayer is a versatile program and it offers a solution.
Recording the stream
Using MPlayer to record video streams is really straight forward. I've removed the exact description of how to do it, for the reasons I explain below, but to help you to get started, you will be needing to use the -dumpstream and -dumpfile options of mplayer. Used correctly, your streamed video clip will be available as a file on your hard disk, but you'll have to wait for the length of the clip's playing time, as it really is recording it much like a video might, rather than just downloading it as a file.
I am tempted to look into what is required to port the MPlayer plug-in to OpenBSD, but I imagine that there is probably good reason why it hasn't been already. Having to make changes to the running kernel to play certain formats, via sysctl, is likely in my opinion. Not something that you want to be granting to a web browser related piece of software.
Making it available
So far, I have manually gone through the steps that I describe above, to locate and grab a stream into a local file and play it in MPlayer. These steps are easily scripted and that will be my next step. Once I have a working, flexible script, then I might make it available on the site, but I will probably only allow others to use it on request. This is to avoid allowing people to access streams that they haven't paid for, as well as to stop the provider from making further changes to stop the script from working. They haven't responded to my queries about their changes, so I take it they don't give a damn once you are a customer and have paid your fee.
After learning, from the provider, that they have recently restricted video downloads due to people abusing the feature and putting the video clips on sites such as YouTube and/or others, I have edited this article and also decided not to make my script publicly available. I only hope that whateve the provider has planned for stopping people from doing this in future, is not going to stop me playing the content that I pay a subscription for. Only time will tell.



