These files are included in the source and binary packages.
As the amount of documentation increases, the detailed descriptions will be distributed as a separate package.
Most users will install from a binary package
(rpm or deb). But it is also
simple to compile ZapDvb from source. Just
download the archive, unpack it, change to the unpacked folder and
type make
(no configure). After make you should
install it with sudo "./setup install
".
Three important Tips:
(1) Run the installation of a binary package from the command line
- you will eventually see more information if a problem occurs. (2)
Check if zapdvb can tune to a channel by typing
"zapdvb -z -n1
" (the output should contain the string
FE_HAS_LOCK
. (3) Start the zapdvb program from a
console with a command like "zapdvb -s -n1
" to see if
it works.
German DVB-S users should be able to run
ZapDvb as is (if their DVB drivers are working and
loaded). The default configuration is set-up for ASTRA. Users that
want to use DVB-T or DVB-C have to edit the configuration file and
change the "sourceN
=..." statements. The default
installation does not contain channel lists (other than ASTRA) any
more - the setup
program now includes a simple scan
tool. If you want another channel list, please read the
instructions in How to obtain
Channel Lists.
At this point you should know that
ZapDvb supports up to four channels lists. The GUI
is aware of the configured "sourceN=...
" statements.
If a list contains no radio channels you should set the contents
flag (a bit mask) to 1. The GUI will enable lists of TV or radio
channels depending or this flag (not on the real content). Read
more about this and other details in The zapdvb.conf File.
After installation most
features are still disabled. If you find that the basic
features of ZapDvb are working you might want to
enable more functionality using the setup
program. The
remainder of this text describes this in detail.
A while after you started to use recording frequently you will have to organise your data (audio and video recordings) . A very important point are automatic clean-ups that can prevent you from filling up your hard disk with data from periodic recording jobs. Read Overview and Introduction to learn about recording with cron and at jobs. So you will have to create at least some folders and to update the configuration file to point to these folders - see The zapdvb.conf File for details. The configured folders will be known to the GUI and the video editor and will make your life a lot easier.
The next point are user rights.
Even if you use ZapDvb from a single user account
it would be a good idea to create a zapdvb
account in
/etc/passwd
. No user logins are permitted for
zapdvb
- the account's purposes are to take the
ownership of the folders mentioned above as well as the data files
therein and to limit the rights of some background and server
processes. All users of the ZapDvb software and
the zapdvb
account should be made members of the
groups video
and audio
(you will have to
do this by hand). As a result all authorised
ZapDvb users can access the folders and data
because group members have access rights.
To create the groups, the zapdvb
account and the data folders you can start the setup
program from a console window. It will prompt you for the required
input (stop after point 4 using CNTL-C if you do not want to use
the features described in the next section of this document):
su # must run as super user cd /usr/local/share/zapdvb # change to the installation folder ./setup confing dvb # run setup in basic configure mode This is configuration part 1: allow multiple users to share zapdvb ================================================================== (1) create groups audio and video [y/n] y existing group - no action: audio existing group - no action: video (2) create user zapdvb, add to groups video, audio and users [y/n] y user created: zapdvb (3) create and initialise zapdvb's home directory [y/n] y home initialised DO NOT FORGET: Your zapdvb users should be added to the groups audio and video (4) create a set of folders (for recording and capture) [y/n] y Enter a path for the base folder (default=/home)> /mnt/dvb created folder /mnt/dvb/video created folder /mnt/dvb/video/trash created folder /mnt/dvb/video/capture created folder /mnt/dvb/audio created folder /mnt/dvb/audio/trash created folder /mnt/dvb/audio/capture DO NOT FORGET: modify zapdvb.conf to match the folder names! DVB base configuration completed.
Please do not forget to edit
zapdvb.conf
and /etc/groups
by hand, the
setup script cannot do this for you. The setup
program
can revert most configuration changes that it has made, see
Restoring the System Configuration.
If people were always willing to cooperate your configuration work would be done at this point. But there is a problem left: ZapDvb uses at and cron jobs for background recording. Some user could have queued such a job a while ago. If that job now wants to execute while another user watches life TV, the job will not get access to the DVB hardware (DVB cards can usually deliver only one program at a time). Or the other way round: if somebody else has started a background job and you try to watch life TV you only get a message telling you that the DVB hardware is busy. In this section we will learn to configure ZapDvb in Family Mode to avoids these problems.
The key points are (1) to let the cron and at jobs
run as user zapdvb
and (2) to uses the
~zapdvb
home folder to store ZapDvb's
status file. Due to (1) all users can see (and delete) all the
queued background jobs. If someone enters a new job all others can
see it. With (2) a life DVB user will get informed in detail about
a running background job.
There is one little restriction: in Family Mode you cannot directly kill a running
background job. It would be too easy for unexperienced or impatient
users (your kids?) to kill a precious recording accidentally. If
you really want to kill a running job in this mode call
"zapmcc --kill
" (which is easy in KDE, just press
Alt-F2 and enter the command in the dialog).
Another ZapDvb feature is
Remote Mode which lets clients without
DVB hardware use DVB cards on a server. On the server side
Family Mode mode must be enabled and you
must add an entry to the configuration of xinetd
(which must be installed) to start zapdvb
as a
server.
To implement Family
Mode and Remote Mode some lines
need to be added to /etc/sudoers
- which creates a
small security risk. If you can live with this let the
setup
program do the work for you (some messages from
system tools were omitted, there are also minor differences between
suse and debian installations):
su # must run as super user cd /usr/local/share/zapdvb # change to the installation folder ./setup config adv # run setup in advance config mode This is configuration part 2: advanced features (family, remote) ================================================================== (5) add entries to /etc/sudoers (used for recording) [y/n] y WARNING: All original sudo lines containing 'zapdvb' have been removed. The original file has been saved as: /etc/sudoers.debian (6) create an e-mail alias entry for zapdvb [y/n] y WARNING: YOU HAVE TO DO THIS MANUALLY! Cron and at jobs running as 'zapdvb' will send mail if something goes wrong - but no user will ever login as zapdvb. With a simple entry in /etc/aliases you can redirect the zapdvb mail to one or more real users. Run 'editor /etc/aliases' now [y/n] y (7) enable server mode for this computer [y/n] y server config created: /etc/xinetd.d/zapdvb make sure that xinetd is running ... DO NOT FORGET: Enable 'mainuser=zapdvb' in /usr/local/share/zapdvb/zapdvb.conf! Advanced configuration completed.
With the exception of Set-top
Box Mode (see README_DATA for
details) you have now completed the configuration. You could have
done this in a single step calling "setup config
".
The setup
program saves the original
files (using a suffix of suse
or debian
)
so that configuration changes can be undone easily (some messages
from system tools were omitted):
su # must run as super user cd /usr/local/share/zapdvb ./setup unconf This procedure will try to undo a previous zapdvb configuration =============================================================== WARNING: The configuration steps should have saved the original states in files ending on '.debian'. These files will be restored and the current data will be saved as '.zapdvb'. (1) Restore /boot/grub/menu.lst [y/n] y (2) No change to /etc/inittab (3) No change to 'runlevel 4' configuration (3) Disable Server Mode [y/n] y (5) Restore e-mail aliases [y/n] y (6) Restore 'sudo' configuration [y/n] y (7) Remove zapdvb's home folder [y/n] y (8) Remove the zapdvb user account [y/n] y
There is a problem:
unconf
works fine if you run it shortly after
config
, but if you modify your system in between, some
of these changes may get lost! unconf
simply restores
the data that was saved by config
, it does not merge
this with current data.
ZapDvb itself does not contain player
functionality. External players are used. These can be KDE programs
like Kaffeine, Juk and
KsCd or non-KDE apps like
MPlayer, mpg123 or
Xine. Some players are called directly from the
main menu (Juk and KsCD) which cannot be easily (re-)configured.
All other players are configurable from the
zapdvb.conf
file - see README_CONFIG for details. Here are
some tips:
Only a few features of the video player get used by ZapDvb. MPlayer has them, is reliable and starts fast (which is important for video editing). Xine and Kaffeine work but are less reliable and take longer to start. Also the View Format support works only with MPlayer, see README_CONFIG for details. So after a few experiments with other players you will download MPlayer and use it with ZapDvb. For the video editor you should tweak MPlayer's configuration a little bit. Add or change the following lines of "input.conf" to:
RIGHT seek +3 LEFT seek -3 DOWN seek -20 UP seek +20 PGUP seek +100 PGDWN seek -100
This reduces the amount of time that Cursor-Right, Cursor-Up and Page-Up will skip in input. The defaults are too large for editing video data. The current MPlayer versions honour "input skips" from stream input data - this is fine for video editing - but causes a problem: when you hit Page-Up MPlayer will read all the data that you told it to skip (100s). This takes a while as it needs some time to read the data from disk. The situation is worse with life TV: effectively the screen will freeze for 100s.
Life Radio is hard work for a player: the PC's clock and the Radio clock will not run at exactly the same speed. The player needs to stretch or squeeze the data to avoid drop-outs (underrun) are strange noises (overrun) on output. Until now only mpg123 does this job well enough for us. Mpg321 fails badly. There are still a few drop-outs with mpg123 which you should ignore as we did not pay the authors for something better (the drop-outs do not appear in recorded data anyhow).
KsCD usually does not read-out CDs digitally - instead it uses the analog output of the CD-ROM drive. For this reason you will need (on home-made computers) to install the appropriate internal cable that usually comes with a motherboard. Another problem could be that by default the volume of "CD" analog input of your sound card is muted or set to zero. Use KaMix (or AlsaMixer) to change this. On the other hand KsCD uses almost no CPU-time and works very reliably.
Recent versions of KsCD can be configured for digital read-out (e.g. no extra analog cable), but this may cause problems with copy protected CDs. Strange situation in some countries: although you have bought the CD legally, you are not allowed to play it with digital read-out.
Linux has had an archaic sound architecture: only one sound stream could be played at a time (Kernel 2.6 and alsa changed this). But KDE still uses a proprietary artsd daemon which allows KDE apps to open multiple output streams and arts does all the necessary format conversions and mixing. In theory this would work fine. In practice not all tools support artsd (mpg123, MPlayer and most others). Unfortunately artsd will sit on the only sound channel (DSP, Digital Signal Processor) and prevent non-arts-aware tools to play sound (most tools then simply wait for atsd to release the channel).
A work-around for this is to configure artsd to suspend itself after a short interval of inactivity (ZapDvb set this interval to 2s by default). This usually works but has some disadvantages (KDE sounds may get played at unexpected times - as you will notice soon). You could use the artsdsp helper tool to get around it. But unfortunately artsdsp has to patch the system call table of the player that it loads, which does not work always. You can for example modify your config file as shown below but with MPlayer this trick DOES NOT WORK.
# This is only for demonstration, see artsmode=mixed for a better solution! cmdaudio0=artsdsp artsdsp mpg123 -q - # ^ ^ ^ # | | + name of the program that artsdsp loads # | + the name (for artsdsp) that ps would show # + name of a program to execute (see man:evecv for details) # usually zapdvb/zapcvt automatically insert the second argument but # not in this case because the 1st char of "mpg123" is not a "-".
In a real configuration you should not directly
use artsdsp like in the example, please read about
artsmode=mixed
in README_CONFIG.
In Overview and Introduction we have learned that ZapDvb runs on a computer that takes one of three possible hardware roles: a (1) Set-top Box or a (2) Work Station or a (3) Server.
The Set-top Box mode works fine with a cheap bare-bone PC and a cheap LCD TV display. It offers a lot of functionality including LIRC (Remote Control) support. Read more on this in README_DATA.
Until now the discussion was centred around (2). But ZapDvb has a Remote Mode for (3): clients can transparently use the DVD card(s) of a server. Recording jobs would then run on the server, life actions on the client. The server- and network- load a moderate, try it!