Avicap EPG Electronic Program Guide

## Avicaps EPG Electronic Program Guide

back to Avicap Index
docu by: Alexander Rawass (alexannika@users.sourceforge.net)
if anyone can write a better documentation - please do it and tell me
Avicap's EPG display can display EPG information that has been saved in the xml 'xmltv' format.
This format is supported for linux and analogue TV by those projects:

- nexTView EPG Decoder 'nxtvepg'
- xmltv project

I've only tested it with nxtvepg.

### Preparing nxtvepg for usage with Avicap

You have to download and install the latest nxtvepg package.
Make sure that you TV card is correctly configured (with kv4lsetup), then start nxtvepg.
Avicap or any TV apps should better not run while nxtvepg is running??
nxtvepg will start searching your xawtv channels for EPG providers.
If found, it will start aqcuiring the EPG data via the vbi blank between each TV frame.
This will take some time, this process is rather slow.
Let it run for some time.
Then exit nxtvepg.
Now get nxtvepg to produce a xml-output of it's aqcuired data, that is readable by avicaps EPG-browser, like this:
nxtvepg -dump xml -provider <hex of provider> >/tmp/epg.xml
To know about the hex number of the epg provider, open up the 'view statistics' window in nxtvepg, and look for the hex num after 'CNI'.
It's probably a good idea to read the nxtvepg documentation at this point.

### Avicaps EPG browser

If you click 'Electronic Program Guide' in your Avicap menu, the EPG module will start and open up its window.
Per default, the EPG data will be read from /tmp/epg.xml , but you can change that in the epg config dialog.
Depending on the size of your EPG data file and on your number of regexps, it may take some seconds til the window comes up.

#### EPG Browser window

On the left side is a channel table - this is yet not functional.
In the middle you'll see the EPG guide of today, a display that looks like the tables in your movie guide (or, at least like mine ;-)).
If you're not seeing any data, you should click 'EPG Config' and configure your EPG data file.
In the top strip, you can change the day you are currently seeing.
With 'Toggle Display' you switch from guide display to table display.
The table display is rather unusuable imho, better not use it.
'EPG Config' starts the EPG configuration.
'Edit Regexps' opens the regexp editor, where you can edit regexps to highlight or block programs by name.

#### EPG Configuration

At first use, you should set the 'EPG xml filename' to the xml data file of the provider you want to use.
Any changes in this field need a restart of Avicap to have effect. Yet.
When the EPG module has found a correct EPG xmltv file, it will display a list
'EPG Provider to Avicap channel mappings'
The EPG module doesn't know, which epg channel is which avicap channel, so you have to select the correct channels there, to have your EPG guide be displayed in correct order.
You can also select the color, with which the EPG strip of that channel will be colored.
I recommend rather light colors, like you can see in the screenshots.
The spinboxes 'day starts at' and 'day ends at' are yet not functional.
With 'recording starts/ends N mins before/after program' you can select the time margin, that gets sent to the timertable, when you add recordings from the EPG display to the timertable.

#### EPG Display/Guide Display

If you're EPG config is correct, you will see in the middle of the EPG window the guide display.
It looks like a TV guide, it's also nicely colored if you select sane colors.
If you move your mouse around, you can see the full description of the program at the bottom of the guide display.
If you press the middle mouse button and hold it, you can move the display around to where you like it.
If you press the right button, a popupmenu will show up, see below.
If you have set regexps, then highlighted programs will (currently) appear in green, blocked programs in near-black (nearly unreadable).
If you have a pending recording in the timertable, it will also show up with a blue shading across the timespan, where the recording will happen.

#### Guide Popup Menu

In the popupmenu, you can add the current selected program to your highlight- or blocklist, and you can also add the program to the list of pending recordings in the timertable.

#### Regexps, Regexp Edit, blocking and highlighting programs

With Avicaps EPG module, you can use regular expressions to highlight or block programs by title name or description string.
Press 'Edit Regexps' in the EPG window, and the Regexp edit window will appear.
In the textedit, you can edit your regexps by hand, like in a text-editor.
The regexps have following syntax:
[#](title:|desc:|both:)(block:|high:)regexp
Huh? For example, these are valid epg regexps:

- title:high:.*Star.Trek.*
  will highlight all program which have 'Star Trek' or 'Star-Trek' etc in their title.
- desc:high:.*Doris.Day.*
  wil highlight all programs which have the string 'Doris Day' or alike in their description.
- title:block:^X.Files$
  will say goodbye to one of my most despised series in TV
- desc:block:.*Scully.*
  will do that and even more
- # title:block:whatever
  will do nothing, cause # at the start of a line is a comment

Note: we're using Qt's QRegexp here, they are regexps, not wildcards, so you should know what you do.
I recommend you to use a normal text-edit to edit the regexps, that's easier and more comfortable than in the 'Edit Regexp' window.
The Regexp file is ~/.avm/avicap-regexps
If you press 'Re-read regexps', the EPG module will re-read this file from disk (after you've changed it in an external editor)

#### What I do with these blocking features

I am using the blocking features of Avicap's EPG display to not know and see violence in TV at all any more, I've completely blocked all those (mostly american) series, where the audience can enjoy itself by watching people in fear, running for their lives, and can amuse themselves with pictures where the blood runs from the walls, and people get cut in half for the enjoyment and amusement of YOU, the viewer.
Currently, I've blocked 78 series in german TV this way.
Soon, this will include a password lock.