?

Log in

Previous Entry | Next Entry

Stream Tivo programs to XBMC project

Having list a hard drive last week, I rebuilt my Lubuntu desktop. In an effort to get the sound working properly, I followed a very good article for XBMC Install and Config HOWTO for Linux on AMD Graphic Based Systems (FUSION) - XBMC XVBA. I have never checked out XBMC, so I thought why not. So far it's pretty cool.

If you know me, I am a long time Tivo user and really like it. I am glad my Cable provider has offered up a CableCard so I can enjoy all the features of their service and my Tivo verssus being forced to a use a DVR that does not have all the same features.

Knowing a little about tivodecode and very little about XBMC, I felt, like others have, that I should be able to watch or stream the recordings I have on my Tivo through XBMC.

Goal: Using XBMC, view a listing of programs that have been recorded to my Tivo. Upon selecting a program, watch it like any other video or movie in XBMC.

Elements:
- XBMC
- Tivo
- tivodecode
- Media Access Key (MAK)
- URL for Now Playing XML
- cURL or wget
- mPlayer

So to start off with, I know I can navigate to the IP addres of my Tivo using HTTPS and can browse the Now Playing list and download Tivo files. I also know I can call upon a URL and get an XML version of this as well. For this example, lets say the Tivo has an IP address of 192.168.1.100 and the MAK is 4155552222

wget:
wget --no-check-certificate --http-user=tivo --http-password=4155552222 -O tivo_now_playing.xml "https://192.168.1.100/TiVoConnect?Command=QueryContainer\&Container=%2FNowPlaying&Recurse=Yes"

So that gives us a list we can manipulate and download links. Downloading the Tivo file to your computer, you can play it through mPlayer by streaming it out of tivodecode. Here is an example command:

tivodecode -m 4155552222 /media/DroboOne/Tivo/American\ Horror\ Story\ -\ Afterbirth\ \(Recorded\ Thu\ Oct\ 11\ 2012\ 03\ 00AM\ FXP\).TiVo | mplayer -vf pp=lb -cache 32768 -

So this will decode the Tivo file and stream it right to mplayer. There are example curl calls to grab the Tivo file, stream it to tivodecode, and then stream that to mplayer. So the next steps is to figure out how to get XBMC to perform all this for me.

Comments

( 9 comments — Leave a comment )
(Anonymous)
Nov. 30th, 2013 03:21 pm (UTC)
I just found this post after Googling to accomplish something similar. Any new progress to report?
ctuck
Dec. 3rd, 2013 01:57 am (UTC)
No major progress so far. I am still looking at it. XBMC is all new to me, so there is a bit of a learning curve and not a lot of tutorials on making new modules/add-ons.
ctuck
Dec. 3rd, 2013 02:05 am (UTC)
Feel free to reach out to me directly if you want to try and collaborate on it. Maybe we can put together what we know.
ctuck
Dec. 30th, 2013 04:31 pm (UTC)
(Anonymous)
Dec. 18th, 2013 10:44 pm (UTC)
I have a PHP script that obtains all of the information from the TiVo and generates URLs for downloading. I have never got wget to work for the shows so I have always used Curl to get the job done. It gathers all of the information and echoes everything to a shell script. It uses CURL for downloading, tivodecode for decrypting, and I even have it setup at the moment to use HandBrakeCLI for converting MPG files to H.264 (MP4) (SD since it's only on a Linux machine with a Pentium 4 processor) for streaming over the internet using a site hosted on Apache2. (For my personal use of course) Having a HDTV in my room, I have a Raspberry Pi in which I have XBMC on. I'd love to find a way to stream a raw MPG file using tivodecode to XBMC without having to go through the trouble of waiting for the download. Raspberry Pi's are only 700 MHz, so even if I had to, I would just find a way to have the .tivo stream go through the server, and push the MPG stream over to XBMC on the Pi for watching instantly.
ctuck
Dec. 19th, 2013 12:17 am (UTC)
Sounds like a good setup. I have an RPi too, so I could test that. I thought about making a PHP Script to do the work of converting it and then use Red5 or something then stream the video directly to a flash player. Seems easier to just use XBMC so far. I wish I had more time tyo tinker on this and learn XBMC. Still looking for a good place to start making add-ons for it.

Have you tried using tivodecode to stream direct to mplayer or something on the RPi to see if it's fast enough? It should be.
ctuck
Dec. 27th, 2013 01:08 am (UTC)
FYI, if anyone is following this post, I have started working on the Add-On. I am new to Python, yet it does not scare me. First step is to get a Listing from Now Playing. Should have an update soon.
(Anonymous)
Feb. 7th, 2014 10:54 pm (UTC)
I saw that you were having issues with tivodecode and mplayer. I don't think tivodecode has any issues without a source. I think your problem is that you are using wget. I could never get wget to work with my tivo recordings correctly, so I just used curl. As stated on the tivodecode site. Wget may have fixed it since then.

Note: Due to improper chunked-encoding handling in wget and/or the tivo web server, using wget to download .TiVo files will result in them being corrupt and they will not decode. Please use curl, or if you are a wget developer, please fix wget.
ctuck
Feb. 9th, 2014 01:15 am (UTC)
tivodecode allows you to work with STDIN and STDOUT. In my current python I am chunking down the file via HTTP, not wget. I also tried piping the HTTP stream directly to tivodecode. Still working on it. Let me know if you have any other advice.
( 9 comments — Leave a comment )

Profile

End Up
ctuck
Chris, Doer of Things
Plays Well with Fire!

Latest Month

August 2015
S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Page Summary

Powered by LiveJournal.com
Designed by Tiffany Chow