
This guide will help you set up a media server to be able to play videos on your Series 3 TiVo, using pyTiVo. (Note: this post was moved from my old blog, but has been updated a bit)
First, install ffmpeg:
$ sudo apt-get install ffmpeg
Then, install git (needed to grab pyTivo):
$ sudo apt-get install git-core
Then, grab the latest version of the pyTivo script (Look at the Current Release page to verify that you have the right version):
$ cd /usr/share $ sudo git clone git://repo.or.cz/pyTivo/wmcbrine.git $ sudo mv wmcbrine pyTivo
Edit /usr/share/pyTivo/pyTivo.conf:
$ cd /usr/share/pyTivo $ sudo cp pyTivo.conf.dist pyTivo.conf $ sudo vi pyTivo.conf
The only thing that I changed is to comment out the default video share, and add my own:
[Movies] type=video path=/data/Video/Movies [Television] type=video path=/data/Video/Television [Music] type=music path=/data/Audio/Music
Run pyTivo:
$ sudo python /usr/share/pyTivo/pyTivo.py
Verify that things are working correctly — on the Tivo, go to “Now Playing List” and look for the shares. If they appear and you can browse to them, you’re almost done!
One issue I had was with transferring the videos. When I transferred them to the TiVo, it had a message of “unknown mpeg2 codec” or something to that effect. Apparently the package for ffmpeg on Intrepid doesn’t have all of the codecs needed. To install them, run the following:
$ sudo apt-get install libavcodec-unstripped-51
After I did this, videos were able to be transferred just fine.
The last thing to do is to make pyTiVo start automatically on bootup. To do this, simply copy the following script to /etc/init.d:
#!/bin/bash
# chkconfig: 2345 99 05
# description: pyTivo server
### INIT INFO
# Provides: pytivo
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-description: pyTivo server
# Description: Start and stop the pyTivo server.
### END INIT INFO
RETVAL=0
start() {
echo -n "Starting pyTivo: "
pgrep -f pyTivo.py
RETVAL=$?
[ $RETVAL -eq 0 ] && echo "pyTivo already running: Exiting" && exit 1
# this call actually starts pyTivo.
python /usr/share/pyTivo/pyTivo.py > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}
stop() {
echo -n "Stopping pyTivo: "
pkill -f pyTivo.py
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
sleep 1
start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL
Note: I didn’t write this – I just grabbed it from somewhere when setting it up – let me know if you wrote it so that I can give you credit!
After creating the script, make it executable:
$ sudo chmod u+x /etc/init.d/pytivo
Then create links to /etc/rc3.d and /etc/rc1.d:
$ sudo ln -s /etc/init.d/pytivo /etc/rc3.d/S99pytivo $ sudo ln -s /etc/init.d/pytivo /etc/rc1.d/K99pytivo
This should make it so that pytivo starts automatically upon bootup.
Hopefully you’ve found this guide useful. Next time, I’ll be talking about how to make the videos show up perfectly on the TiVo, with appropriate titles, etc.
Related posts:



Hi Ed,
This is really awesome. I am not too fluent in Linux but have a new machine for the house. I started off trying out Fedora. I know I came very close (piecing this all together, but still got stuck.
then I loaded Ubuntu. Wow what a difference! I did run into a problem. If you have a minute and can step me through it, I would be grateful. My tivo (Series 2) boxes can see my server, but there are no movies showing. I have 2 .avi files and an MPG. Any ideas?
Also, I have never programmed a Perl Script before. Where should this script reside?
thanks again!
Len Winter
lwiphone@winterfamily.us
Hey Len, Thanks for the visit. If you’re still having trouble with this, let me know via email (edsfamily@gmail.com) and I can try to help you out. Scripts can reside anywhere. I usually keep them in my home directory, but they can be moved to /usr/local/bin or wherever you want really.
Ed
Thanks! These instructions were easy to follow (maybe even more so than on the project’s site).
I got it up and running with no problems (Music only) on an Ubuntu 8.10 machine this morning.
There are fewer and fewer reasons to use windows these days!
Beau
All of these scripts you’ve been posting are making me think about installing ubuntu on my of boxes. Good stuff!
Chris Pugh´s last blog ..Five Reasons Why You Should Be Using WordPress
[...] with the metadata about the program, which is in pyTivo format. For more info, see my guide on how to set up pyTivo as a media server for [...]