Ack! This site is moving to tomhorsley.com since Comcast's efforts to improve their world's worst customer service ranking apparently include terminating web hosting for their existing customers.

Wallpaper

Hey! My new TiVo (using the appropriate tools) allows me to download recorded programs to my computer, so I can finally start putting together the MythBusters computer wallpaper collection I've always wanted.

First (and favorite) is the water heater rocketing through the roof of the little red house:

Exploding Water Heater first aired Nov 7, 2007

And who could forget splitting a car with a rocket sled powered “snowplow”:

Myth Evolution first aired Nov 18, 2009

How many balloons does it take to lift the cameraman's 3 year old daughter Matty? (Answer about 3500 :-).

Pingpong Rescue first aired Nov 3, 2004

The blue slush drink hitting the pressure plate struck me as particularly artistic:

Soda Cup Killer first aired March 24, 2010

Methane gas/air mixture being ignited by a neon sign transformer:

Blue Ice first aired April 13, 2011

Sewer gas explosion launching man hole covers:

Drain Disaster first aired November 2, 2011


tools

First you poke around through the TiVo menus and dig up the Media Access Key provided by your specific TiVo box.

Then you point firefox at the IP address of your TiVo box using https and login with the user name tivo and the media access key as the password. You'll have to placate firefox into accepting the self-signed SSL certificate from the TiVo the first time you do this.

Now you can browse through the recorded programs and find the one you want to download. Each program seems to have two different links available to download, a MPEG-PS and a MPEG-TS file. I have no idea what the difference is, but I've always used the MPEG-PS, and everything has worked OK.

Anyway, I right click the MPEG-PS link for the show I want, and select Copy Link Location. Then in a shell, I run the get-tivo script tell it where I want to save my copy as the first argument and and paste in the URL I copied from firefox above as the 2nd argument to the script (putting it in single quotes is a good idea). The get-tivo script looks like:

#!/bin/sh
#
# First arg is base name of file to store download in (this script will
# append .mpg to the name).
#
# Second arg is the URL, probably obtained via Copy Link Location in web
# browser pointed at the tivo box (almost certainly need to put this in
# quotes).
#
# Downloads the file from the tivo to $1.mpg in current directory
# (takes about 4 or 5 minutes per gigabyte).
#
# The ultra secret media access key provided by the tivo box:
#
mediakey=NNNNNNNNNN
#
if [ $# -ne 2 ]
then
   echo usage get-tivo destination-file-name tivo-url 1>&2
   exit 2
fi
cookies=/tmp/$$cookies.txt
filename=$1
shift
if [ -f "$filename.mpg" ]
then
   echo "$filename.mpg" already exists, not downloading. 1>&2
   exit 2
fi
echo Starting file transfer, this will probably take a while...
curl -s --digest -k -u tivo:$mediakey -c $cookies "$@" | \
   tivodecode --mak $mediakey -o "$filename.mpg" -
rm -f $cookies
ls -l "$filename.mpg"

This script uses the tivodecode tool (which was already available in the fedora repos). It also uses curl (but that is on most every linux box already).

After a bit of a wait, that gets you an mpg file, now you need to extract the screenshot you want. I use mplayer (available in the rpmfusion repos) with a script like this:

for i in lb li ci md fd
do
   mkdir $i
   cd $i
   mplayer -ss 00:59:08 -frames 900 -vf pp=$i -nosound \
      -speed 100 -vo png:z=1 ../WaterHeater.mpg
   cd ..
done

That gibberish runs mplayer on the video file starting at 59 minutes and 8 seconds into the show (determined by playing the show with the onscreen display enabled to see what time the water heater blew up). It plays 900 frames and outputs the video one frame at a time to a png image file. It does all that 5 times, once for each of the deinterlacing filters available in mplayer (lb li ci md fd). Now it is just a question of sorting through the giant collection of images to find the interesting frames and comparing them to see which filter produced the best result. Some final tweaking with gimp (if required) and you are done. (And no Windows machine was ever involved :-).

Page last modified Sat Nov 5 13:21:15 2011