TivoOnUbuntu

From GRLUG

Table of contents

Tips for getting the most out of your Tivo using Kubuntu

Note: This page is a work in progress. As of right now I have not yet actually burned a working DVD.

Reason for being

This is meant as a place for me to place note on my process as I work on this task. I don't want to have to relearn this, and I thought that someone might be interested in it as well. I will try to be as detailed as I can.

I am using a Server with ubuntu 6.10 on it and a desktop with 7.10 just installed on it. I will work on two things here:

  1. Creating a DVD from shows downloaded from the tivo
  2. Putting shows downloaded (Diggnation (http://revision3.com/diggnation/)) onto the Tivo for watching in the living room

Programs we will need

  • Java - http://java.sun.com
    • Galleon runs on java and you need at least Java 5
    • Install anyway you can. I believe Ubuntu has a package for this, but I just downloaded the sun version, unzipped to opt, and added the bin dir to the path.
  • Galleon - http://galleon.tv/
    • Software that connects to the tivo
    • I am using 2.4.0 because this is the version that works for me. 2.4.1 might also work. 2.5.0 and above have a different installation process and I haven't gotten it to run on ubuntu yet. Others are having the same issues, though I am sure that it is possible with tweaking to the shell scripts.
    • The features for 2.5.0 and above seem to mostly be related to HD anyway.
    • Install - unzip to /opt
  • checkinstall - http://www.asic-linux.com.mx/~izto/checkinstall/
    • used to make debian files from source
      •  sudo aptitude install checkinstall 
  • Compiling Environment
    • for compiling and installing from source
      •  sudo aptitude install build-essential 
  • TivoDecode - http://tivodecode.sourceforge.net/
    • used to unlock the tivo file
    • Download, unzip
      •  ./configure; make; sudo checkinstall 
    • create a file ~/.tivodecode_mak containing your tivo Media Access Key (found on https://www3.tivo.com/mytivo/index.html)
  • GOPchop
    • The only reliable way if found to cut a tivo mpg file and still have synced audio
      •  sudo aptitude install gopchop 
  • ffmpeg
    • Used to transcode video
      • sudo aptitude install ffmpeg
  • exiftool
    • used to acquire the needed information from the video file
    • I just found out that the video metadata was added in the later version of the tool then what was avaliable in Ubuntu 6.06. Simply download and place in your path(I put it in my ~/bin)
      • sudo aptitude install libimage-exiftool-perl

Playing downloaded files on the Tivo

I think the command that works best for me right now is:

ffmpeg -i input.avi -pass 1 -r 29.97 -b 4096k -vcodec mpeg2video -s 720x352 -aspect 4:3 -padtop 64 -padbottom 64 output.mpg

But I am still working on it. It seems to chop .25 inches off the right and left edges when viewed on tivo.

Here is a script I am writing(modifing, the first part I found on a website) for my conversion duties.

#!/bin/sh

#This just checks out if the script was given the correct paremeters
[ $# -ne 2 -o "$1" = "-h" -o "$1" = "--help" ] &&
{ echo "${0##*/} input output"; exit 1; }

#Location of the file used during the second pass
ffmpeg="/tmp/ffmpeg.log"

#Make sure that there are no files
rm ${ffmpeg}
rm ${2}

#Creating the command line for ffmpeg
cmd="-r 29.97 -b 4096k -vcodec mpeg2video -aspect 4:3 -s 720x352 "
cmd="${cmd} -padtop 64 -padbottom 64 "
cmd="${cmd} -passlogfile ${ffmpeg} "

#Start the first pass.  This is just to create the log file
ffmpeg -i ${1} -pass 1 ${cmd} ${2}

#Remove the outpuit file because we only want the log
rm ${2}

#Now we call ffmpeg to create the actual file using the log from pass 1
ffmpeg -i ${1} -pass 2 ${cmd} ${2}

#Now that we have the file we can delete the log file
rm ${ffmpeg}

Making DVD from .tivo files