Tivo and the Linux PC

My Windows XP system is fully interfaced with our Tivo over the home network. In Windows XP I can "convert" a *.tivo file to *.mpg, edit out commercials, and burn to DVD. Since I can do that on Windows, I have decided to try that in Linux. Tivo, the company, provides a Tivo Desktop program to its subscribers that allows them to download from the Tivo to the PC. Tivo Desktop versions are only available for Windows XP and Vista and the Mac OS. No such Tivo Desktop is available for Linux. However, you can "talk to the Tivo" via a web browser and download a recorded program to the PC. Adding to that, some astute Linux folks came up with a program that will "convert" a *.tivo file to *.mpg. To top it off, some other Linux folks developed a simple mpg editor that can be used to "cut" a commercial from the mpg file.

There are EIGHT STEPS to this Tivo/Linux activity. They are described below (Note that I have not finished them all).

Step 1 - Download Tivo File to PC

OPTION #1 - Basic Browser Access

This first step is to download a *.tivo file from the Tivo to the Linux PC. I did this and it is pretty cool as Tivo has an unsupported Browser (that is, it is there but Tivo, Inc. gives no support to it) interface that works with FireFox. It is quite simple as follows:

  1. All downloads currently go to the Documents folder and I do not know how to change this. Anyway, this is where all *.tivo files will be saved until I learn how to set up an alternate download folder.
  2. Open FireFox
  3. Enter the IP address of the Tivo in the Address Bar of FireFox using the https:// protocal for local server. In my case this is
  4. Reply OK to the many Linux/FireFox warnings about the "Certification" of the address for the Tivo (i.e. ignore the warnings). Actually, there are options to check to bypass this certification check for access occassions to the Tivo.
  5. Finally, the Tivo Logon box will appear.
  6. Enter tivo for the user name/ID
  7. Enter your Media Access Key supplied to Tivo subscribers for the password
  8. A window will appear listing all the recorded programs on the Tivo.
  9. Click the download link button at the right of the program you wish to download.
  10. Tivo again will display a window requiring the user name/ID and password
  11. Respond to the Download Save Window click the OK button.
  12. The Tivo file will be downloaded and saved in the documents folder.
  13. Close FireFox when the download is complete.
OPTION #2 - Enhanced Browser Access

Users in the Tivo Community Forum's Tivo To Go Forum developed a special html page to "talk" to the Tivo and gain access to its recorded programs. This special xhtml page is an enhancement over using just a basic web url access. The enhanced page provides additional information and suport to the downloading of recorded Tivo programs to the PC.

Before we go any further, some settings need to be changed because there is a new security feature in Firefox 3.0. The TiVo returns a self signed certificate which Firefox by default won't trust and blocks the connection. Here's the steps to fix this:
  1. Open the Firefox options menu by clicking Tools->Options.
  2. In the options, go to the Advanced options and click "View Certificates".
  3. In the Certificate Manager, go to the "Servers" tab and click "Add Exception..."
  4. In the "Add Security Exception" window enter the TiVo's ip address from the nowplaying file after the https:// in the location textbox. For example if the ip address is, then enter
  5. Click Get Certificate and then make sure the "Permanently store this exception" checkbox is checked and click "Confirm Security Exception".
  6. Repeat steps 3 to 5 for each TiVo if you have multiple Tivos.
  7. Now Firefox 3 and the Tivo will be able to shake hands.
Now, you must download the special xhtml file that provides the enhanced features. You must edit the file and this might seem a bit involved. However, just follow the steps below.
  1. Open Firefox and go to this link:
  2. After you enter the above link and hit return, Firefox will say it is done but you will be looking at a blank page. Believe it or not, it is there but you cannot see anything yet because the page's single job is to "talk" to the Tivo. You must make some entries into the xhtml such as the Tivo's address so that the "talking" can take place.
  3. Now, save the xhtml file:
    Right Click in the display window of Firefox and Click "View Page Source"
  4. The editor for Firefox such as gEdit which I use will open and display the xhtml code
  5. Near the beginning of the file, you will see the following lines:
    //[ "Location" , "Tivo's IP" , total gigabytes used to record shows ]
    tivo[0]=[ "Living Room","", 0 ];
    //tivo[1]=[ "Master Bedroom" , "" , 29.25 ];
    //tivo[2]=[ "Den" ,"" , 69.25 ];
    //tivo[3]=[ "Kitchen" , "" , 109.25 ];
    //tivo[4]=[ "Bathroom" , "" , 0 ];
    var mak='0123456789'; //your media access key
    var totalGB = tivo[0][2];
    var itemCount = 25; // shows to download per request (comment out to use max which is 128)
  6. In the above, the green needs to be changed. The green that is there is just temporary stuff put there by the writers of the xhtml code. So, with gEdit, change the applicable text as follows:
    Replace the with your real IP address for your Tivo. You can get this from your router's menu.
    Replace the 0 with the number of available gigabytes on your Tivo's harddrive. I have a 160 gig drive so I put in 150 leaving 10 free for the Tivo Program.
    Replace the 0123456789 with your real media access key provided by Tivo, Inc.
  7. Click File, Click Save, Navigate to a desired Folder, Enter tivo_nowplaying.xhtml for the fail name, and Click Save. The edited XHTML file is now ready to use.
  8. Open Firefox, Click File, Click Open File, Navigate to the folder with the xhtml file, and Click tivo_nowplaying.html, and Click Open
  9. You will now be looking a a table describing all the recorded programs available for download on your Tivo.
  10. You can select multiple recordings at once with this enhanced set-up. The 25 in the last line above sets the ceiling to 25 recordings for download at a single session.

Step 2 - Install TivoDecode Program

This second step is to download and install the program TivoDecode which converts the tivo file to a mpg file. Finding instructions that a Linux newbie can understand for doing this install was to say the least, difficult. It approached a "needle in a haystack." What I found did not include all the details of the steps; however, what I have written below includes the detail steps that a new Linux user needs for TivoDecode install:
  1. Download the tar file for TivoDecode by clicking here:
    Sourceforge Download for TivoDecode.
  2. Answer all the OK to save stuff and the downloaded file goes to the documents folder
  3. In your /home drive, create a folder in the /home/steve folder called "Installs".
  4. Move or copy the downloaded file from the documents folder to the Install folder.
  5. Right Click the copied file and select Extract Here
  6. The tar file will be extracted into the Install folder.
  7. Open Terminal
  8. At the $ command, enter
    sudo apt-get install build-essential
  9. During the above command response, you will be asked to insert your Ubuntu 7.10 CD into the CDROM drive. Then, after the CDROM stops spinning up, press the enter key. Also, answer any questions with yes.
  10. After that completes and the $ command line appears, enter
    cd Installs/tivodecode-0.1.4 This changes the current directory to the tivodecode subfolder.
  11. At the next $ command, enter
  12. At the next $ command, enter
    sudo make install.
    Ubuntu did not like this entry; however, the instructions I found said to use it. Ubuntu replied "make: *** No rule to make target `install'. Stop." So, I suspect this line is not needed.
  13. Close Terminal.

Step 3 - Convert tivo File to mpg File

This third step is to actually convert the *.tivo to *.mpg. TivoDecode requires that the TivoDecode executeable code and the *.tivo and *.mpg files be in the same directory. This can prove to be a pain and maybe there can be a mod to this; however, for now, that is the way it is. Here are the steps:
  1. Move your tivo file into the /home/steve/Installs/tivodecode-0-1.4/objects.dir subfolder with TivoDecode. A copy and paste or a click and drag will work.
  2. Open Terminal
  3. At the $ command, ente
    cd Installs/tivodecode-0.1.4/objects.dir.
    This change directory sets the playing field so that everything deals with the one folder, objects.dir, where the executable and the tivo file reside AND where the mpg file will be written.
  4. At the next $ command, enter
    ./tivodecode -m XXXXXXXXXX -o output.mpg input.TiVo.
    The "./" is a must (don't know why). Replace the "XXXXXXXXXXXXXX" with your Tivo Media Access Key. Replace "output" with the name you want to give the mpg file. Replace "input" with the name of the tivo file.
  5. The conversion goes very fast. An onscreen display line says "encryption by Qualcom" and the only way you can tell something is going on is that the hard drive busy light stays lit.
  6. When the next $ command appears, it means that a watchable mpg file has been created.
  7. Close Terminal
  8. Navigate to the file /home/steve/Installs/tivodecode-0-1.4/objects.dir/output.mpg where "output" is the name you gave your mpg file. Now, double click on the file name.
  9. The default movie player (mine is Totem Movie Player) will open and your mpg will start playing.
This was fun and it worked - that was amazing. The next thing is to edit the mpg - that is, remove the commercials. In Windows XP I do that with VideoReDo; however, no Linux version of that program exists. Read On!

Step 4 - Install Avidemux Program

This fourth step leads to the installation of a simple mpg edit program named Avidemux. A Google search lead to the discovery of Avidemux which I learned was available as a Ubuntu 7.10 package. So, all I had to do was:
  1. Click the Applications in the menu bar
  2. Click Add/Remove Applications
  3. Navigate to the Avidemux listing, select, and Click to install.

Step 5 - Remove Commercials with Avidemux

This fifth step was the simplist so far.
  1. Open Avidemux
  2. In the left pane of the Avidemux window, check the settings and change if necessary such that the following shows:
            Video......Set this to Copy
            Audio......Set this to Copy
            Format....Set this to MPEG TS A+V
  3. Click File/Open and navigate to the mpg file
  4. Using slide button, locate the beginning of a commercial and click the "A" button
    You can also use the Previous or Next Black Frame Buttons to locate commercials because commercials are supposed to have black or blank frames at their beginning and end; however, this is not always true. At any rate, the Black Buttons do work - they are similar to the auto find commercial function in VideoReDo for Windows.
  5. Using slide button, locate the end of the commercial and click the "B" button
  6. Click Edit/Delete and all the section of the mpg between points "A" and "B" is deleted
  7. Repeat the "A"/"B" stuff for each commercial thru the end of the mpg file
  8. Click File/Save, enter a new file name, and the mpg without commercials will be saved
  9. Double click the new saved file and it will open and play in the default movie player (Totem Movie Player in my case).
    (See comments about video players in the "Things I Have Learned" page. The Avidemux output videos can be played in either Totem or vlc Media Player.)

Step 6 - Install QDVDAuthor Program

This step step leads to the installation of a program named QDVDAuthor. Again, I discovered this with a Google search and I then learned it was available as a Ubuntu 7.10 package. So, all I had to do was:
  1. Click the Applications in the menu bar
  2. Click Add/Remove Applications
  3. Navigate to the QDVDAuthor listing, select, and Click to install.

Step 7 - Author mpg for DVD with QDVDAuthor

This is on my TO DO List.

Step 8 - Burn Authored Folder to DVD

This is on my TO DO List.