1. Guido Draheim
  2. trac-dvbcronrecording-plugin


Clone wiki

trac-dvbcronrecording-plugin / DvbCronRecordingInstallation

=>English DescriptionDeutsche Beschreibung

DvbCronRecording Installation

You can get a complete set of RPMs at the buildserver site including the trac modules. The tarball itself can be compiled into an rpm based on "rpm -ta $filename". If you do prefer to use distutils / setup.py then you can unpack the source tarball and run "setup.py install".

For proper usage you do also need "gnutv" and "szap" from the dvb tools, please consult LinuxTV.org LinuxTV_dvb-apps

You need to run the "scan" utility from the LinuxDVB package once to create a channels.conf - this one should be copy-n-paste to the channels.conf Edit screen of the plugin. After that create a selection of channels and start adding recording times.

Download the Tarball

Currently the most current source snapshot is hosted on the buildserver at home:guidod:tools:scm/trac-dvbcronrecording-plugin

There are also snapshots posted to the Sourceforge download service at dvbcronrec/files

Installing the Program

The DvbCronRecording application is built with standard Python distutils providing a setup.py. Potentially it could also be distributed as a pypi package but that is currently not the case. If you do already know how to work with Python distutils installation then you can just go for it - download the source tarball, unpack it locally on your disk and run

  • python setup.py install

The source tarball does also feature an rpm spec file that will internally run the python setup.py install. You can build an rpm directly by using

  • rpmbuild -ta DvbCronRecording-xxx.tar.gz
  • followed by an installation of the resulting rpm
  • rpm -i RPMS/noarch/trac-dvbcronrecording-plugin-xxx.noarch.rpm

The source tarball does also feature a GNUmakefile but it is only used during local development to run "setup.py install" and to restart the local trac-server for testing. You may however want to use "make rpm" to build a local series of RPM files for installation.

Remember that you can get prebuilt RPMs from the opensuse buildserver at home:guidod:tools:scm/trac-dvbcronrecording-plugin

Ensure LinuxDVB app utils

Remember that the Trac module is just a frontend that generates a couple of scripts. For further installation and usage you do need the LinuxTV.org LinuxTV dvb-apps utils.

  • On Opensuse the package is called just "dvb" / in Opensuse 11.3 it is dvb-1.1.1_20100509-1.7

Check proper installation by running the required command line utilities in a terminal

  • "gnutv -h"
  • "scan -h"

Create Channels.conf

Now you need to get a proper "channels.conf" that lists the available tuning parameters for your DVB device. The LinuxDVB "scan" utility is able to generate such a chnannels.conf - so login to your recorder box and run

  • scan /usr/share/dvb/dvb-s/Astra-19.2E > channels.conf

The dvb "szap" utility expects the channels.conf to be in a subdirectory of your and that is where the DvbCronRecording plugin expects the channels.conf to be as well. So please create a subdirectory and move the channels.conf into that place.

  • cd
  • mkdir -p .szap/0
  • mv channels.conf .szap/0/channels.conf

If you have multiple DVB cards then please rerun scan with a different "-a" adapter option and move it to some .szap/x/channels.conf where "x" is number that you will use later on in the trac setup.

When you are ready then you can use "szap" or "gnutv" for a test. Essentially the generated scripts will use the following command for dvb recording:

  • gnutv -adapter 0 -channels ~/.szap/0/channels.conf -out file testrecording.mpg -timeout 20 3sat

Trac Plugin Configuration

Remember that you need to go to the Trac Admin panel to activate the new plugin. After that you get a new main navigation entry ".recording." that represents the application.

Go to the "channels.conf view" and press "channels.conf edit". This will open a long text input box - open the channels.conf text file and cut-and-paste the content of the channels.conf into the text input box. Be sure to select the correct "adapter" since any earlier values associated with that adapter will be removed. After "SAVE" the trac local channels.conf database table will know all your tuning channels. (TODO: allow to use button to read the channels.conf directly from disk).

Go the the "channels list" and start to select a subset of your channels.conf entries as your favourite channels that you want to record from. These entries will be used to fill a combobox list - only the items in this channels list are available for recording.

Now your ready for recording - if you do have multiple DVB cards then you may also want to fill in the "tuning list". After adding another tuning entry you will be able to add another channels.conf and you can then choose channels from the second DVB card to be listed in the "channels list" of input feeds that you may want to record from.

Copy the recording-update-change.cron

The frontend assumes that the Webserver and/or Trac is run in a chroot'ed environment at "/srv". That's why it does NOT expect that it can see the real "channels.conf" that is used by cron later on. It does also NOT expect it can actually write to /etc/cron.d/* - however there is an iniadmin option that you can choose to tell that it may write the /etc/cron.d/entries directly.

In the standard setup however you would go to the main recording list and run "Activate!". This will generate a number of scripts in a dvbcronrecording directory on your disk. One of the files is called "recording-update-change.cron" which is responsible to copy the other generated files out of the chrooted environment into your system cron location. During the first setup you need to copy this file manually:

  • cp /srv/dvbcronrecording/recording-update-change.cron /etc/cron.d/recording-update-change.cron

Create recording user and permissions

This is optional - by default the iniadmin options will use "root" as the user that will open the DVB device in order to write the mpeg file on the disk. This may be fine in some installations but you may also want to use another use user account with less priviledges.

Also note that the target directory of your recorded mpg files should be writeable by the webserver / trac-server so that you are able to delete recorded files using the trac web interface.