I’ve been impressed with the new MPBN Capitol Connection TV channel. With veteran journalist Mal Leary heading the operation and a mission to provide easy access to the workings of the Legislature to as broad an audience as possible, the channel has the potential to greatly improve government transparency in Maine.
With such a focus on openness, I was surprised to find that the online stream of the channel is locked down hard. The only way to view the channel online is through a flash player on the MPBN website, with no option to view the feed in an external media player, no way to record what you’re watching and no access to an online archive of past clips.
Let’s fix that. Below are a series of steps that will allow you to redirect the stream to an external program and do whatever you like with it, including recording clips onto your own computer.
These instructions are for Windows, but the principles will be the same on any OS. Anyone with some basic computer skills should be able to follow the steps below, although some knowledge of the command line may be helpful.
First, you need to download two programs. We’ll use rtmpdump to intercept the stream being sent to the flash player on the website and direct it where we want (download the latest Windows .zip file here). We’ll also need an external video player. In this case I’m using VLC but a number of programs (including MPlayer) should also work. Both rtmpdump and VLC are open source and free.
Once you have downloaded and installed or extracted both of those programs, we’re going to write a command that will access the RTMP stream behind the flash player using rtmpdump. Every streaming video on the internet has a different set of variables and I won’t get into how to determine them here. Suffice to say that this is the set that will work for Capitol Connection:
C:\PATH TO RTMPDUMP\rtmpdump.exe -v -r "rtmp://mainepbn.fc.llnwd.net/mainepbn/_definst_/mcc" -W "http://www.mpbn.net/Portals/0/LLNWPlayer.swf" -o - | "C:\PATH TO VLC\vlc.exe" -vvv -
Replace the paths with the locations of these two files that you just installed on your computer. VLC will probably be found in “Program Files\VideoLAN”.
To make this code work, we can either enter it into the command line prompt (hit the Start Button and then type “cmd” in the search box to bring up an MS-DOS prompt) or paste it into notepad and save it with the extension .bat. Opening the file this creates will then execute the command.
Once you execute this command, rtmpdump will start and give you some information about the stream including the codec, framerate and dimensions of the video feed and VLC will start and begin playing the video.
Now that you have the stream playing in an external player, there are lots of things you can do. To record a video clip to your hard drive, open the View tab in VLC and select Advanced Controls. Then click the red record button and a video will be saved in ASF format to the My Videos file on your computer.
Congratulations, you just made Maine’s government a little more open.