Archive

Posts Tagged ‘UCLA’

UCLA Bruincast greasemonkey link ripper

March 25th, 2009 3 comments

Just a quick post on the simple greasemonkey script that rips UCLA Bruincast video links (obviously you need access). I made it for my brother, so he can download lectures for classes he would like to save. Here’s the short greasy script. (Remember, rename the urls from “http:” to “rtsp:”). To grab the DSL links simply replace ‘LAN’ with the text of the link. Enjoy!

// ==UserScript==
// @name           BruinCastPageLinks
// @namespace      hawflakes.unoc.net
// @description    Grabs Links on a page
// @include        http://www.oid.ucla.edu/webcasts/courses/*
// ==/UserScript==
 
// Greasemonkey Script written by Jonathan Wong, Copyright 2009
// Script is freeware (Use at your own risk!).
 
Links = findXPathNodes("//a[text()='LAN']/@href");
PrintString="";
 
for(i=0;i<links .snapshotLength;i++)
{
	PrintString=PrintString+Links.snapshotItem(i).value+"\n";
}
 
GM_openInTab("data:text;charset=UTF-8," + encodeURI(PrintString).replace(/&nbsp;/g,"&amp;nbsp;"));
 
function findXPathNode(xpath, start,doc)
{
	var result = (doc == null ? document : doc).evaluate(xpath,(start == null ? document : start), null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ,null);
	return (result.snapshotLength > 0 ? result.snapshotItem(0) : null);
}
 
function findXPathNodes(xpath, start,doc)
{
	return (doc == null ? document : doc).evaluate(xpath,(start == null ? document : start), null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ,null);	
}
 
function elem(tagname,content)
{
	var ret = document.createElement(tagname);
	ret.innerHTML = content;
	return ret;
}
</links>
Categories: Education, Useful Apps Tags: ,

UCLA streams – Real Media (.rm)

March 25th, 2009 No comments

So apparently mencoder only seems to work for asf,wmv,avi,mpeg streams, and does not like real media streams (I think this is purely due to the fact I do not have real media codecs on this machine and therefore -ovc/-oac options would not work anyway). So I’ve defaulted back to using mplayer for ripping the real media streams. Fortunately, I had remembered seeing this, which pretty much explains what one needs to do.

For UCLA, the linked .rm file is actually just plain text that gives you the actual url. However, in the case of UCLA (like stanford), one can simply replace “http” with “rtsp”.


mplayer -noframedrop -dumpfile out.rm -dumpstream rtsp://url.rm

The most interesting piece of information is that on windows, it is possible for mplayer to rip streams even if it can’t actually play it. For example, my Windows machine (what I’m using atm) does not have real player or alternative/hacked rm codecs on it, and therefore I can’t actually play .rm. However, I was able to rip it and someone else was able to play it. This does make sense.