July 26, 2010 in Personal | Comments (3)
Tags: silly
I can finally show off my weekend project! Well okay the vestiges of it started a couple weekends ago and it bled into this morning by a couple hours, but I think it still counts as a weekend project.

Jasna and I don’t have cable or an antenna for our TV, which means we download everything we watch, or borrow it from friends on rare occasions. My MacBook was starting to run near the end of its useful life as my main work computer — the trackpad was becoming unusable which meant I couldn’t depend on it when travelling — but it’s still got some life in it as a server. It was wireless networking (no cables to string around), uses very little power, is completely silent, comes with media software (Front Row) and comes with a remote control, is really small (less than 2cm tall), which makes it more or less the perfect media server.
The only downside is it was a pain to get shows onto it to watch, as you have to search for the shows manually, download them, then copy them manually over to the server. So, I decided to make a web interface.
Check here for screenshots of the new web interface for the media server. EasyNews, our Usenet provider, provides very handy services like global searches, thumbnails and AutoUnRARing. A big benefit to this is not having to wait until something has finished downloading it before watching it. So far I’ve got services for downloading from Usenet — which is where we get almost all of our TV shows to watch, downloading CFL games from TSN and just uploading individual files from your browser. At some point I need to set up scheduling so that it automatically downloads new episodes of shows when they’re released, but I guess that’s for another weekend.
I’m kind of embarrassed at how proud I am to have actually finished it in a weekend like I’d planned, especially considering I haven’t done any web development in years and years. The astute of you may have noticed I used straight-up CGI instead of technologies the cool kids are using: no love from me for PHP or RoR or Ajax or anything. Since I haven’t put any password security in yet — that’s for another weekend yet — and the box is publicly addressable via IPv6 I’ve had access to the web interface to just within our local network, but if IPv6 takes off some day it’ll be cool to be able to download movies while I’m away from home.
I can finally show off my weekend project! Well okay the vestiges of it started a couple weekends ago and it bled into this morning by a couple hours, but I think it still counts as a weekend project.
Jasna and I don't have cable or an antenna for our TV, which means we download ...
July 23, 2010 in Personal | Comments (0)
Tags: holiday, Jasna, thesis
Jasna and I just got back today from a spur-of-the-moment camping trip. We’d been wanting to have a couple days just for the two of us for a while now, and our schedules aligned, so why not? We thought camping would be more fun and relaxing than anything else, and I’ve wanted to see the towns along the Grand River forever, so we combined the two and went to Rock Point Provincial Park: it’s virtually right where the Grand River empties into Lake Erie and necessitates driving along the Grand River, a fairly nice drive.
I’ve got a grand total of 3 pictures from the trip and I’m happy with that. It wasn’t the sort of trip to you take to take pictures of. Apparently the park is known for its fossils, but we didn’t go hunting for those, either. We went down to the beach a few times — twice for moonlight swims — and spent most of the rest of our time in our campsite sitting around and talking and enjoying one another. We got a nice campsite with fairly good privacy and shade, and none of the campsites directly around us were taken. It was pretty much the perfect couple of days, only because we were together.
Jasna bought me an e-reader! She actually bought it before we’d planned on going on the trip, but I guess this seemed a good time to give it to me, and give me an easier time reading. It’s a Kobo, which I adore. I’m actually a bit of a freak in that I’m somewhat anti-paper: I often prefer reading on screen to reading on paper; maybe it’s a side-effect of growing up with a computer. The Kobo has a really beautiful display and is easier for me to read than anything I’ve ever read from, CRT, LCD or paper. The display can’t refresh very often — maybe once a second or something like that — and it’s super low-powered which makes it unsuitable for anything but reading, which suits me fine. I have only two complaints: firstly, that the font size is typically too big, but that’s a criticism of the books that are formatted for it, not the device itself; and secondly, that it’s really difficult to skip forward or backward a lot of pages at a time. With paper it’s easy to do a binary search for the page you want, but the Kobo seems determined to make you do a linear search.
I did bring my laptop, but only so I could do just enough work to make my guilt levels fall to the point where I could genuinely relax. It turns out that’s about half an hour, ha! I’m still more or less pleased with how the thesis is progressing.
Jasna and I just got back today from a spur-of-the-moment camping trip. We'd been wanting to have a couple days just for the two of us for a while now, and our schedules aligned, so why not? We thought camping would be more fun and relaxing than anything else, and I've wanted to see ...
July 2, 2010 in Personal | Comments (5)
This article is for you if you’re a Canadian football fan, you don’t have cable TV, you use an operating system which doesn’t run Microsoft Silverlight (such as Linux) and you can’t afford to go out to the bar all the time to watch football games. I may have described only one person (myself), but just in case there’s another person out there, I will describe to you how to watch your football games. I should say that while I’m no lawyer, my understanding is that what I describe here could become illegal should Bill C-32 pass, and we all hope it won’t.
The first and most important part is to install rtmpdump, a utility which you will use to actually download the video stream. I’m using a relatively ancient version of rtmpdump and I don’t think it matters particularly which version you use.
From there all that is needed is a way to get the rtmp URLs of the game you want. To use the script below, you give it a link to a game you want to download — something of the form http://watch.tsn.ca/cfl-games-on-demand/week-1-alouettes-vs-roughriders/ (one of the best football games I’ve seen in a long time, incidentally) — as an argument. It then extracts the clip IDs for each quarter (including overtime, if needed), determines the rtmp URL for each video clip, and downloads the video files in sequence.
#!/bin/bash
match_name=$(echo “$1″ | sed ‘s,\(http://.*\)\(week-[^/]*\)\(.*\),\2,’)
q=0
# get through all the videos (quarters) linked to by the given game (“episode”)
for i in $(wget –q –O — “$1″ | fgrep ‘#clip’ | sed ‘s/\(.*#clip\)\([0 – 9]*\)\(.*\)/\2/’ | uniq) ; do
src=$(wget –q –O — “http://esi.ctv.ca/datafeed/flv/urlgenjs.aspx?vid=$i” | sed ‘s@\(.*\)\(rtmp://.*\.flv\)\(.*\)@\2@’ | tr –d ‘\n\r ‘)
echo “saving from $src“
echo “saving to $match_name-$q.flv“
rtmpdump –r “$src” –o “$match_name-$q.flv“
q=$(($q + 1))
done
# create dummy file so we don’t know beforehand if a game went into overtime
if [ $q –eq 4 ] ; then
touch “$match_name-$q.flv“
fi
It’s worked well for me but there are certainly no guarantees about it. CTV could break it easily if they so wanted (if you’re reading this, CTV, please don’t be meanies. Let’s be BFFs). The only unfortunate downside to it is that CTV potentially loses out on some advertising revenue. My recommendation is to stare extra hard at the commercials to make up for it on the days you do go out to the bar to watch a game. Heading out to the stadium — at the very least whenever the Riders are in town — would also be a nice way to support the league and TSN for putting games up online.
This article is for you if you're a Canadian football fan, you don't have cable TV, you use an operating system which doesn't run Microsoft Silverlight (such as Linux) and you can't afford to go out to the bar all the time to watch football games. I may have described only one person (myself), ...