From pyTivo - Wiki
This document should currently cover Ubuntu 8.04 through 9.04.
- First, enable the multiverse Repository using this guide: https://help.ubuntu.com/community/Repositories/Ubuntu
- After multiverse is enabled, open a terminal and type:
sudo apt-get update
Python Versions 2.5 through 2.7
pyTivo requires a Python version less than 3.0. The 2.5, 2.6 and 2.7 branches are known to work. Ubuntu already comes with a suitable version.
Python Imaging Library
If you want to use the Photo plugin:
sudo apt-get install python-imaging
pyTivo requires ffmpeg. The default versions of ffmpeg that come with Ubuntu won't work for pyTivo. Support for needed codecs was stripped, to avoid patent issues. However, you can get a working ffmpeg with just a little effort:
Ubuntu 14.04 LTS (Trusty Tahir)
You should install these one at a time and in this order. If you try to do them all at once, you might end up with conflicts.
sudo apt-get install ffmpeg sudo apt-get install libpostproc52 sudo apt-get install libavdevice53 sudo apt-get install libavdevice-extra-53 sudo apt-get install libswscale2 sudo apt-get install libswscale-extra-2 sudo apt-get install libavutil52 sudo apt-get install libavutil-extra-52 sudo apt-get install libavcodec-extra sudo apt-get install libavcodec-extra-54 sudo apt-get install libavformat54 sudo apt-get install libavformat-extra-54
Ubuntu 8.10 or 9.04
The working version is in the mainstream repos (in universe or multiverse), but with the label "unstripped". Select all the "unstripped" packages to install.
sudo apt-get install ffmpeg libpostproc-unstripped-51 libavdevice-unstripped-52 libswscale-unstripped-0 \ libavutil-unstripped-49 libavcodec-unstripped-51 libavformat-unstripped-52
To get a working version, you first need to add the "Medibuntu" repository to your sources. See here for instructions: https://help.ubuntu.com/community/Medibuntu. Then, just upgrade (if you already had ffmpeg installed), or install the ffmpeg package.
sudo apt-get install ffmpeg
Or Build it Yourself
- see http://ubuntuforums.org/showthread.php?t=786095
- If you do choose to build your own ffmpeg, you should install it in the default /usr/local/bin rather than /usr/bin, which is reserved for package-managed binaries. Then just point to it in pyTivo.conf:
[Server] ffmpeg = /usr/local/bin/ffmpeg
Git will download the most updated pytivo source code available.
sudo apt-get install git-core
cd ~/ git clone git://repo.or.cz/pyTivo/wmcbrine.git mv wmcbrine pyTivo cd pyTivo cp pyTivo.conf.dist pyTivo.conf gedit pyTivo.conf ./pyTivo.py firefox http://localhost:9032/
- Note: An attempt will be made to keep this section updated with support for other forks if they become active.
Run pyTivo as a daemon
To run pyTivo as a daemon on start and in background there is an example init.d script below.
In Ubuntu 11.04 (and some earlier versions) the script can be installed as follows:
Save the script linked above to /etc/init.d/pyTivo (i.e., the directory to save into is /etc/init.d and the file name to use is pyTivo). Be sure to edit the following line in the script to point it to the location you saved pyTivo.py.
python /root/pyTivo/pyTivo.py > /dev/null 2>&1 &
You might also move pyTivo.conf into the directory /etc/pyTivo (which you'll have to manually create), in which case you'd make the above line something like this:
python /root/pyTivo/pyTivo.py -c /etc/pyTivo/pyTivo.conf > /dev/null 2>&1 &
Whether or not you move the pyTivo.conf file, the next step is to install the script:
cd /etc/init.d sudo chmod 755 pyTivo sudo update-rc.d pyTivo defaults
You can then run the following command to make sure it's working:
You should see the following:
Staring pyTivo: done
If you are using the init.d script:
cd ~/ cd pyTivo /etc/init.d/pytivo stop git pull /etc/init.d/pytivo start
- Note: Your copy of the init.d script may not be named pytivo in all lowercase letters. Substitute the appropriate name as necessary.
If you are not using the init.d script, the following commands can be used to stop pyTivo, then update, then restart:
cd ~/ cd pyTivo pkill -SIGINT -f pyTivo.py git pull python pyTivo.py > /dev/null 2>&1 &
- Note: If you don't want the output sent to null just use "python pyTivo.py"