PDA

View Full Version : Downloading Shows from Series 2 HTTPS page with Linux Curl



cojonesdetoro
10-17-2009, 04:12 PM
I was able to download a show with curl in linux by doing the following:

curl -c cookie --insecure --digest -u tivo:9999999999 -o nowplaying.html "https://192.168.x.x/nowplaying/index.html"

Then parsing out the URLs of shows I wanted and downloading with this:

curl -c cookie --insecure --digest -u tivo:9999999999 -o nowplaying.html "https://192.168.x.x"
curl -c cookie --digest -u tivo:9999999999 "http://192.168.x.x/download/Show%20URL.TiVo?Container=%2FNowPlaying&id=2405825&Format=video/x-tivo-mpeg" > "Show URL.TIVO"

Where:9999999999 is the Media Access key and 192.168.x.x is the Tivo's IP. (If you don't know what this means you might have a hard time implementing this.)

Once I got the Tivo file down I use tivodecode-0.1.4 to convert to mpeg and other tools to convert to Xvid.

I got a whole script that does it but it's not fit for distribution. However, with the commands above you can roll your own.

I got fed up with Tivo desktop. This doesn't download much faster but it mostly works and is not bloatware.

Edit: Now that I think about it, I can probably go straight to Xvid on-the-fly because curl/tivodecode can go to stdout and tivodecode/ffmpeg can take stdin. Gotta try that out.

Edit2: Yup this works. straight from Tivo to mp4 avi.

curl -c cookie --digest -u tivo:9999999999 "http://192.168.x.x/download/Video.TiVo?Container=%2FNowPlaying&id=3050599&Format=video/x-tivo-mpeg" | ./tivodecode --mak 9999999999 -v -o - -- - | ffmpeg -qmax 8 -i - -s 720x480 -vcodec msmpeg4v2 video.avi

I can possibly get better compression but the mpeg settings I have now give me decent quality.

Note: You can get URLs for each show by looking at source of Tivo https file or right-click-copy on download link from browser.

Edit 3: I have a pretty automated method for grabbing shows this way and will post some scripts once it seems to be wroking right. I got a script that gets the nowplaying list, filters out junk I don't want to extract and downloads the shows direct to mp4 avi. It's not as nice as other methods but at least it doesn't require a hacked Tivo.