Freevo

 

Recordserver

Site Index:

  1. Introduction
  2. Setup
  3. Start manually
  4. Start with initscripts
    1. Gentoo
    2. Debian
    3. Other distributions
  5. Schedule Favorites

Introduction

Freevo's recordserver is a helper program which is running in the background. It is a standalone persistent process that runs separately from the main freevo process that you see on your TV or monitor. It even does not have to be running on the same machine. Please be aware that it is a network application and your freevo machine should not have wide open access from the internet without a firewall limiting what ports outsiders can connect to. It takes care of your scheduled recordings and favorites. It creates the FXDFiles for the recorded shows and launches the recording application. You must provide the recordserver with the right command for recording. This is done via the variable VCR_CMD in local_conf.py. The recording command depends on the type of your TV card, so have a look at TVConfig for that.

Before you attempt to use the recordserver, you should make sure your TV card is already configured properly. If you can watch a tvshow successfully, you can try to setup the recordserver (The hard work is the TVConfig).

Note : If you open the TV Guide to test TV, take a show that is running at the moment. If you take a show that is still to come, freevo will try to schedule it for recording and as the recordserver is not yet running, you will receive an error.

Setup

You will have to tell freevo, where your recordings should be saved:

TV_RECORD_DIR = '/path/to/somedir'

Moreover you can/need change the following config options in local_conf.py :

TV_DATEFORMAT = '%e-%b' # Day-Month: 11-Jun
TV_TIMEFORMAT = '%H:%M' # Hour-Minute 14:05
TV_DATETIMEFORMAT = '%A %b %d %I:%M %p' # Thursday September 24 8:54 am

This is for the name freevo will give recorded files:

TV_RECORDFILE_MASK = '%%m-%%d %%H:%%M %(progname)s - %(title)s'

You can even use a recordserver which is running on a different machine. Just put its name or ip here instead of localhost:

TV_RECORD_SERVER_IP = 'localhost'
TV_RECORD_SERVER_PORT = 18002

It is best when the the recordserver is run by the same user that is also running freevo. Otherwise you will probably get problems with permissions sooner or later. These options give you the possibility to change the uid and gid your recordserver is running with. If you want to run freevo or the recordserver as root, do so at your own risc.

TV_RECORD_SERVER_UID = 0
TV_RECORD_SERVER_GID = 0

This option tells the recordserver to start every recording X minutes before the scheduled start and also stop it X minutes later than scheduled. This is useful, when the times in the TV guide, are not hundred per cent right. It must be set to a value in seconds although at the moment it has only the precision of one minute.

TV_RECORD_PADDING = 0 * 60

Start manually

You can start the webserver manually:

freevo webserver start

And also stop it manually:

freevo webserver stop 

Start with initscripts

You probably want to have the recordserver running all the time in the background, so it is best if you start it by an initscript at boot time. It is then running independently from freevo, that means you can start and stop freevo, while the recordserver is persistent. The way how you start the recordserver with a initscript depends on your distribution. Maybe there are already scripts copied to the right place by your distributions installation tool, and you just have to edit them to your liking. There are some examples of such scripts in freevo/boot .

Gentoo

If you emerged freevo from portage :

rc-update add freevo default

Debian

One just has to copy a appropriate script to /etc/init.d/. After that create a link form /etc/rcX.d, where X stands for the runlevel in which you want the recordserver started. The default runlevel is usually 2. The link's name must be of the form SXXrecordserver, where S stands for start script and XX gives a number in what order the scripts are to be called during the init process. The script itself can be one of the example scripts from the freevo package or just something as easy as:

#!/bin/sh
/bin/su - freevo -c "freevo recordserver start"

which starts the recordserver with the rights of the user freevo.

Other distributions

PleaseUpdate

Schedule Favorites

There are two ways to reschedule the favorites when you grab new xmltv listings. You can grab your listings with the freevo tv_grab helper. It will grab the listings, recache them and reschedule the favorites.

PleaseUpdate : how to setup this in local_conf.py (I'm not using it)

But sometimes it is not possible to grab the listings with the freevo tv_grab helper (if you use a custom script). Then you have to run the freevo reschedulefavorites helper :

freevo schedulefavorites

Of course you don't want to run it manually every day, Add the following example to your crontab, it will recache freevo tvguide (speedup) and reschedule the favorites every day at 3h55 am (I grab my listings at 2h00 am) :

55 03  * * *    root    freevo cache > /dev/null && freevo schedulefavorites > /dev/null

last edited 2005-01-05 12:46:40 by JohnMolohan
current version: http://freevo.sourceforge.net/cgi-bin/doc/Recordserver