Haxin Mainframes

A blog about stuff I do, find interesting, or want to blab about..

How to Record Live Video From PyCon

PyCon has so many awesome talks! The problem is that they are happening at the same time!

To deal with this I have a 2 part solution:

  • First I goto a page I want to watch and run this JS code I whipped up to grab the actual video URLS:

JS Code:

for (m in player_jwobject.config.modes) {
    console.log(player_jwobject.config.modes[m].type);
    if (player_jwobject.config.modes[m].config.levels) {
        for (l in player_jwobject.config.modes[m].config.levels) {
            console.log(" - " + player_jwobject.config.modes[m].config.levels[l].file)
        }
    }
};

Note that this code gives you both html5 and flash options for streaming video. And will look like this:

html5
 - http://50.16.83.230:8080/webcast-low.webm?q=1363375116439
 - http://50.16.83.230:8080/webcast-high.webm?q=1363375116439
flash
 - http://50.16.83.230:8080/webcast-low.flv?q=1363375116439
 - http://50.16.83.230:8080/webcast-high.flv?q=1363375116439
download
  • Chose and dump one of these streams. Either will probably work fine however I chose to low quality html5 stream:

Command to run (requires mplayer):

mplayer -dumpstream "http://50.16.83.230:8080/webcast-low.webm?q=1363375116439"\
 -dumpfile interpetermplayer

Or use ffmpeg:

ffmpeg -i http://50.16.160.194:8080/webcast-high.webm\?q\=1363381000621 pycon.webm

This will save the webm stream to a file called: interpetermplayer