# The Kvdr Handbook

Guido
Fiala

    gfiala@s.netic.de

2004
Guido Fiala
&FDLNotice;
03/20/2004
0.62

&kvdr; is a frontend for the vdr-daemon and displays up to 4 video overlays.

KDE
kdeutils
Kapp
dvb
video
v4l
TV

## Introduction

If you have just a desktop computer with a dvb-card and are running KDE you can have vdr running as a daemon (e.g. by init) handling all recording and use Kvdr as a viewer.

Just start kvdr, it connects to the vdr-daemon using SVDRP and lets you do anything vdr can do plus displays an overlay.

Changes:

- 0.62 seamless reconnect to vdr if it closes connection

- 0.61 changed commandline options, added new ones, added multimode for Xv, added PiP-mode for Xv+Ovl-Modes, removed the need for amixer, now use a 768x576 modeline if available, ...

- 0.52 made it compatible with KDE 3 (still compiles under KDE2)

- 0.51 initial size can be larger than PAL/NTSC, a value of 0,0 disables this feature and lets KDE2 restore settings work if applied, zapping through video devices now works in xv-mode as well (multimode, however, so far not ;-) implemented mouse pointer show-on-move/autohide feature new command line option "-x 1" completly disables overlay mode and forces xv-mode on startup new command line option "-d 1" disables modeline switch for xv-mode (desktop resolution used instead)

- 0.5 fixed reconnect after driver reload, some configuration-dialog bugfixes, implemented Xv-display including deinterlacing: Key V switches to Xv-Display, D toggles deinterlacing, (minimum size in Xv-mod is PAL/NTSC size)

- 0.42 fixed a silly bug in clipping code

- 0.41 v4l-conf is used to set up the framebuffer, Key X shows up to 4 overlays at once, fixed the bahaviour if vdr does'nt respond on SVDRP-port

- 0.4 kvdr now handles video device itself (see Configuration dialog), Key Z zaps to next video device, fixed kvdr.desktop

- 0.35 fixed missing klocale.h (caused the debian compiling problem)

- 0.34 kvdr automatically reconnects to vdr on restart, hopefully fixed Mandrake/Redhat compiling problems

- 0.33 fixed volume-restore at program startup, configuration-dialog now centered in full-screen mode, fixed KDE2-way of "Help", reintegrated DPMS handling (can be activated in kvdr.h),command line option for colour-depth

- 0.32 temporarily removed DPMS-handling, fixed one clipping-failure, 2 more key bindings

- 0.31 fixed two more problems with the overlay, does this never end :-(

- 0.3 switched to KDE2 and (hopefully) fixed the clipping problems

- 0.2 changed handling of picture sliders to instant reaction, Apply-button closes configuration dialog now, implemented Front/Rear-balance - (tested with SBLive only), fixed bug with actual channel name in grabbed images

- 0.1 initial test version

## Using Kvdr

First, you must have running vdr in daemon mode (vdr -d), listening at the port you choosed (defaults to 2001). Then simply start Kvdr and you can use keys assignments following in the next chapters.

Features:

- anything vdr can do and will do

- handles the overlay of your dvb-cards

- lets you zap through your video devices or display up to for overlays at once (if you have more than one card). However - changing the channel via vdr is currently only supported on the "primary" dvb-interface.

- the Xv-mode lets you zoom the image to larger resolutions and optionally handles deinterlacing by 50Hz half frame upscaling.

- fullscreen-mode (mouse, dpms and screensaver automatically handled)

- can be used for "remote" viewing of vdr-recordings if you have 2 dvb-cards and the remote-video-directory mounted

- let's you grab images during viewing, playback or recording in jpg or pnm format, filename is automatically generated out of channel-name, date and time.

- let's you control Brightness, Colour, Hue and Contrast of the overlay (not applied to grab-images!)

- handles 4:3 and 16:9 aspect ratios corrected with viewport-dimensions (currently at 4:3 monitors only)

- handles PAL and NTSC accordingly (but only PAL tested so far - i'am living in Germany ;-)

- stores all configuration to file

- sound-handling: mixer-channel, volume and mute using alsa/amixer

- Front/Rear-volume balance

## Command Reference

### The main Kvdr window

M.............activates menu

Return........activate selected item

Backspace.....goes to previous menu

Cursor-Up.....moves selection up | resumes a replay

Cursor-Down...moves selection down | pauses a replay

Cursor-Left...toggles rewind in replay, slow|fast depending on Pause|Play

Cursor-Right..toggles forward in replay, slow|fast depending on Pause|Play

0-9...........direct channel selection

F1,F2,F3,F4...Funktion key as shown in OSD-Menu

J | Space.....Grabs a jpg-image

P.............Grabs a pnm-image

R.............Single-Click instant Recording

O.............Toggels the overlay On|Off

C.............Opens the configuration dialog

Q.............Quits kvdr without disturbing vdr

Grey-Return...Mute On|Off

+|-...........Volume Up|Down

CTRL -|+......Rear-Volume Up|Down

H.............Shows HTML-Help

Pg-Up/Pg-Down.Emulate page up/down in vdr with cursor up/down

Z.............Zaps to next video device (0..3)

X.............Displays up to 4 overlays at once

V.............Switches to Xv-mode

D.............Toggles deinterlacing in Xv-mode (fullscreen,di-50Hz,di-field1)

I.............Toggles Picture-in-Picture-Mode during Multimode (X)

E.............Exchanges the 2 videos in Picture-in-Picture-Mode

S.............Zap's the video-device of the Picture-in-Picture

configuration dialog:

Ctrl-C|ESC....cancel configuration

Ctrl-S........apply and save configuration

Ctrl-A........apply configuration

## Developer's Guide to Kvdr

Kvdr could be enhanced with more fancy deinterlacing methods in class Xvdisplayer, switching channels on extra overlays via corresponding tuner or SVDRP (if available), switch audio output to corresponding overlay via mixerchannel, a picture in picture feature and all the required configuration for this.

## Questions and Answers

&reporting.bugs; &updating.documentation;

configure fails?

If configure fails at your system, try deleting config.cache and some of the options configure --help shows (--prefix=/opt/kde2 and --with-qt-dir=/usr/lib/qt2; according where the libs are installed at your system) If it still complains please check if you can compile other kde2-programs, only then it's a problem specific to kvdr.

No overlay is shown or it is scrambled?

At some systems the XServer reports the wrong color-bytes-depth in 24 bit Mode (32 bits, overlay is trashing the screen), in that case please use the commandline-option -b 24 to force the right mode. (see kvdr --help)

If kvdr shows only a black screen please check if kvdr uses the correct video device number, if you have read/write access rights to the device "/dev/video*" and no other application blocks the device.

If you can't switch channels or vdr is not controllable, please check if no one else (e.g. telnet or another kvdr) ist connected to vdr and if both use the same port. (see configuration dialog and vdr-manpage)

Known Bugs:

Under KDE 2.1 the KWM-option "show window content during moving" behaves different than Version 2.0, leaving the overlay behind. Because other applications like kwintv and xawtv show the same failure at my system, i assume it's not my fault, maybe even not a bug at all - it's a feature ;-) Whether deactivate it or live with it, let's see if newer version compensate for it...

-deactivating KDE-Screensaver does not work as they does'nt provide this function (to my knowledge)

-sometimes the mixer-channels in the list are not complete, restarting kvdr helps.

-i18n not complete, help appreciated

## Credits and License

&kapp;

Program and Documentation copyright 2002 Guido Fiala gfiala@s.netic.de

&underFDL;

&underGPL;

## Installation

### How to obtain Kvdr

&kvdr; can be downloaded from http://www.s.netic.de/gfiala.

### Requirements

In order to successfully use &kvdr;, you need KDE 2.x. &kvdr; uses about 5 megs of memory to run, but this may vary depending on your platform and configuration. You need at least one DVB-Card, the DVB-driver, the VDR-package and Kde. For fullscreen-switching have a 800x600 modeline in your XF86Config file, for NTSC a 640x480 one. (The first one found is automatically choosed, should have the frequency of your choice). To get sound handling working get and install alsa (amixer). The latest version of &kvdr; can be found on The &kvdr; home page.

### Compilation and Installation

In order to compile and install KApp on your system, type the following in the base directory of the Icon Editor distribution:

    % ./configure
    % make
    % make install

Since KApp uses autoconf and automake you should have not trouble compiling it. Should you run into problems please report them to the KDE mailing lists.

vdr-daemon installation details

First, get the latest dvb-driver and install it. (of course ;-), compile vdr (make REMOTE=LIRC) and copy the channels.conf, timers.conf and keys.conf in the VideoDirectory you may use.

For a quick test, you can now simply start the vdr-daemon in a terminal (of course you have to load the dvb-drivers first and launch kvdr.

$>cd DVB/driver

$>make insmod

$>cd VDR

$>vdr -v VideoDirectory -d

$>kvdr

For a sophisticated installation follow the vdr manual.

WARNING

Because of the open SVDRP port you should not run vdr in an open environment (suggest using a firewall). Also, because the DVB-card does directly write to physical grafics memory it can possibly crash your x-Server or your entire System if the frame buffer address is incorrectly specified or reported by the X-server's DGA extension (this is applicable for all overlay displaying cards).

### Configuration

Use the configuration dialog (Key-C) to change your favorite settings.

&documentation.index;