# Settings

To configure Zapping choose Edit Preferences . The Preferences dialog contains the following sections.

## Video Device

In this section you can select the device file name of the kernel device to be used in capture mode. On Linux common names are:

- `/dev/video`

- `/dev/video0`

- `/dev/video1`

- `/dev/video2`

- `/dev/v4l/video`

- `/dev/v4l/video0`

On FreeBSD:

- `/dev/bktr`

- `/dev/bktr0`

- `/dev/bktr1`

- `/dev/bktr2`

Changes will take place after you quit and restart Zapping.

There is no dialog to select an XVideo device, Zapping uses the first device it finds. This will be corrected in a future version.

## Audio Device

Here you can select an audio device to record sound. Usually a kernel device is the best choice. If your TV card has audio sampling hardware and the driver supports this, you can also select the TV card as recording device. This will free the soundcard to record from other sources.

Common kernel device names are:

- `/dev/dsp`

- `/dev/dsp0`

- `/dev/dsp1`

and so on. Click on the down arrow of the device file entry to see a list of devices found by Zapping.

If the audio output of your TV card connects to an audio input of your soundcard, or when your TV card has no audio capabilities, you will want to select Control volume with soundcard mixer. This has two advantages:

- Zapping will properly set the volume control on the soundcard mixer and the TV card, you will not have to start a mixer application.

- When you change the volume or mute audio, recording is not affected.

When you select a kernel device as audio recording device, you should also enable this option to determine the correct audio input line.

Common mixer device names are:

- `/dev/mixer`

- `/dev/mixer0`

- `/dev/mixer1`

and so on. Click on the down arrow of the device file entry to see a list of devices found by Zapping.

## VBI Device

In this section you can select the source of Teletext and Closed Caption data. The DVB PES format is used for digital TV VBI transmissions in Europe. Zapping does not support digital TV yet, but it can read DVB files. For normal operation however you should choose a kernel device. Common device names are:

- `/dev/vbi`

- `/dev/vbi0`

- `/dev/vbi1`

- `/dev/vbi2`

And on Linux only:

- `/dev/v4l/vbi`

- `/dev/v4l/vbi0`

The VBI device name should match the video device name. When for example the video device is `/dev/video2` or `/dev/bktr2` the corresponding VBI device is usually `/dev/vbi2`.

A VBI proxy allows two or more applications to read from the same VBI device, for example Zapping and Nextvepg. When this option is selected Zapping will access the chosen VBI device through the proxy, or directly if the proxy is not installed or is not running. The proxy is a service of the ZVBI library, currently it works only on Linux.

## Main Window

You can set the following preferences:

Save window geometry

- Zapping does not support session management yet. When this option is selected, it will save the window geometry on exit and restore on startup in a non-standard way.

Show tooltips

- Whether to show tooltips.

Disable screensaver

- In video mode (not it Teletext mode) disable the screensaver from blanking the screen.

Save control values per channel

- When this option is selected Zapping saves and restores brightness, contrast, audio volume and other settings when you switch channels.

Enter channels by

- When you enter channel numbers on the numeric keypad or with your remote control, Zapping can interpret the numbers differently. In the United States you will want to choose by RF channel number (1 to 125). You can also choose by the number of the channel in the channel list, the first channel has number 0.

Title bar contents

- Here you can customize the appearance of the main window title bar. You can enter a string which is displayed literally, except for the following jokers:

  `$(alias)`

- Name of the current channel, e.g. BBC1

`$(index)`

- Number in the channel list

`$(id)`

- RF channel name, e.g. S02

`$(freq)`

- Tuning frequency

`$(standard)`

- Video standard (PAL, NTSC, SECAM, …)

`$(input)`

- Current video input on the TV card

## Video Options

You can set the following preferences:

Fullscreen video resolution

- When switching to fullscreen or background mode, Zapping may not be able to enlarge the video to cover the whole screen, but it can change the display resolution to approximate the size of the video. Here you can select a particular resolution, automatic selection, or no change of display resolution.

Capture size under XVideo

- With the XVideo extension the image scaling hardware of your graphics card can be used to display captured video at almost any size. Here you can select the size of the captured video when using XVideo:

  320 × 240

- Fixed size 320 × 240 pixels.

Interlaced (window size)

- The largest size supported by the video capture hardware, or the window size if smaller. You may want to enable the deinterlacer (see below) to reduce interlace artefacts.

Biggest noninterlaced

- Interlaced video looks strange when scaled. This mode is similar to Interlaced, except noninterlaced video will be captured.

Favorite picture sizes

- Here you can customize the Appearance submenu of the video window context menu. To add new line, click on the Add button. To remove a line, click on the line and then the Remove button. To change values, click on a line and then the desired column.

Resize using fixed increments

- When you select this option, the video window can only assume sizes which are a multiple of 32 pixels.

## Keyboard

In this section you can customize accelerators. Note that built-in accelerators such as those associated with menus or channel number entering on the numeric keypad take precedence over user configured ones.

To add new accelerator, click on the Add button. To remove an accelerator click on the line and then the Remove button. To change a command, click on the line and type a new command in the command entry. Click on the down arrow to see a list of commands. To change a keyboard shortcut, click on the line and column.

## Audio Options

Here you can select whether Zapping should automatically mute audio when the application starts, or before it quits.

## OSD Options

Some operations such as entering a channel number or changing the audio volume by keyboard can display a status message. Here you can customize this On Screen Display.

Display mode

- Whether to display messages superimposed onto the video (OSD), in a status bar of the video window, in a separate console window, or not at all.

Remove after

- How long the message remains visible in OSD mode.

Font

- Font to be used in OSD mode.

Foreground color

- Foreground (text) color to be used in OSD mode.

Background color

- Background color to be used in OSD mode.

## VBI Options

Enable VBI decoding

- When this option is selected, Zapping will capture and decode VBI data transmitted by the current TV station. This enables Teletext browsing, Teletext subtitles, Closed Caption, and Zapping can automatically name the station (if the information is transmitted, respectively).

Device file

- A dedicated kernel device is necessary to capture VBI data. If this is supported by your TV card and its driver, you can select the VBI device here. Common names are:

  - `/dev/vbi`

  - `/dev/vbi0`

  - `/dev/vbi1`

  - `/dev/vbi2`

  - `/dev/v4l/vbi`

  - `/dev/v4l/vbi0`

  The device should correspond to the selected kernel video device. Zapping will try to find it automatically, but this may fail. Changes will take place after you quit and restart Zapping.

  XVideo does not support VBI data capturing. You will be able to use VBI services only if your device also has a kernel driver.

## Teletext plugin

Teletext implementation

- The Teletext standard knows different implementation levels. The built-in Teletext browser supports them all, but you can choose to see pages as displayed by simpler decoders. Note most stations still only transmit at the basic levels 1.0 or 1.5.

Default encoding

- Some stations fail to transmit a complete character set code, so the Teletext viewer may not display the correct font or national characters. You can select your geographical region as an additional hint.

Page memory size

- With this option you can limit the size of the page cache in memory. A complete set of pages of one station will require around 1000 KiB. When the limit is reached, Zapzilla will remove the last recently used pages and you must wait for retransmission to see them. Frequently visited pages like page 100 or subpages which take longer to reload get priority.

Number of channels in page memory

- The page memory can contain pages of more than one channel. When the limit is reached, Zapzilla will remove pages of the last recently used channel first.

Brightness and contrast

- These values change the brightness and contrast of the text in Teletext windows or the main window.

Scaling

- You can freely resize Teletext windows. There are different ways to scale the image, some give better visual results, others are faster.

## Recording plugin

In this section you can create different named recording configurations.

### Caption and subtitle recording

Zapping can record caption and subtitles as text files. To enable this select Subtitle file and the desired format and encoding. The name of the file will be the same as that of the audio/video file, with an appropriate extension (for example `.sub` for the MPSub format).

The Update live caption at line breaks option applies to real time Closed Caption, which does not appear page by page on the screen but as typed by the captioner. Zapping records the caption accordingly. However when this option is selected caption will appear line by line when played back, which may look better.

You can record the displayed subtitles or one channel or page of your choice. Closed Caption channels are numbered 1-8, Teletext pages 100-899. Multilingual recording is not supported yet.

## Subtitle plugin

Teletext default encoding

- Some stations fail to transmit a complete character set code, so the Teletext subtitle viewer may not display the correct font or national characters. You can select your geographical region as an additional hint.

Show double height characters

- Often Teletext subtitles are transmitted with double height characters. They may be more readable but also cover a larger area of the screen. When this option is selected Zapping shows Teletext subtitles as transmitted, otherwise it converts the subtitles to normal height.

Closed Caption foreground and background color

- With these settings you can override the default white on black color of Closed Caption. They have no effect when the station transmits other colors.

Roll live caption

- When this option is selected real time caption rolls smoothly, otherwise it rolls line by line. In overlay mode smooth rolling would flicker excessively, is therefore always disabled.

Brightness and contrast

- These values change the brightness and contrast of caption and subtitles.

Scaling

- You can freely resize subtitles. There are different ways to scale the image, some give better visual results, others are faster.

## Screenshot plugin

In this section you can customize the screenshot plugin.

Completion command

- A shell command to execute after the image has been saved. The following environment variables will be set:

  `$SCREENSHOT_PATH`

- The fully qualified filename of the saved image, e. g. `/home/my/shots/image2.jpg`

`$CHANNEL_ALIAS`

- Name of the current channel, ⪚ BBC1

`$CHANNEL_ID`

- RF channel name, ⪚ S02

`$CURRENT_STANDARD`

- Video standard (PAL, NTSC, SECAM, …)

`$CURRENT_INPUT`

- Current video input on the TV card

Skip x pictures before grabbing

Grab on clicking ok

- By default a screenshot is taken when you open the screenshot dialog. When this option is selected, it will be taken when you click the OK button of the dialog.

Add toolbar button

- Add a button to the main window toolbar which opens the screenshot dialog.

## Deinterlace plugin

Zapping has a deinterlace plugin based on code from the Windows TV application DScaler. Currently deinterlacing is only possible with Video4Linux2 drivers on x86 CPUs with MMX. In this section you can customize the plugin. To enable deinterlacing choose a method from the top menu list:

Video Deinterlace (Bob)

- This method is based on Gunnar Thalin's VirtualDub filter. If it detects weaving artifacts in the current image it uses bob to get rid of them. This method has a tendency to bob rather too much and gives poor results on fine static images. It uses the most recent two frames for the calculations and is not as CPU intensive as the more recent Greedy methods. Options:

  Resolution

- Horizontal resolution of images. Choosing a lower resolution may help if your CPU is too slow. This option is available for all methods.

Weave Edge Detect

- Weight used to help detect edges. Higher values makes edge detection stronger.

Weave Jaggie Threshold

- Threshold used to determone if pixel should be bobed. Higher values mean fewer bobed pixels.

Video Deinterlace (Weave)

- This was one of the earliest video deinterlace methods. It used three fields in the calculation and works well on slow moving material but tends to comb on fast moving material.

Video Deinterlace (2-Frame)

- This method uses the current frame and the last two to determine whether to bob or weave a given pixel. This gives better results on both stationary and moving images than the above two methods however it uses more CPU.

Simple Weave

- This method just combines the most recent even and odd fields. This causes motion artifacts and is provided for comparison.

Simple Bob

- This uses only the most recent field and fills the lines in between with interpolated pixels. This method has in may ways been superceded by Scaler Bob.

Scaler Bob

- Uses the current field and lets the video card scaler size the picture to fit the screen. Produces reasonable results for fast moving images. This method uses very little CPU and is recommended on lower spec machines.

Even Scanlines Only

- This method displays only the even fields and uses hardware scaling. It reduces bob artifacts at the cost of loss of information. This method was originally intended to be used with game consoles.

Odd Scanlines Only

- Like Even Scanlines Only, but displays only odd fields.

Blended Clip

- This method is designed mostly for experimentation by those interested in what works for video deinterlacing. It is probably not the single best method for anything but it can be used to create custom deinterlace methods for special purposes. Somewhat CPU intensive

Video (Greedy, Low Motion)

- The Greedy Low Motion deinterlace method is designed to give good results on low motion video source, using less CPU than some others. Good on slower machines but it will give awful results on high motion video material like sports. Quite by accident, it can also do a decent job on poorly mastered 3:2 or 2:2 pull down film source material like some anime movies, regardless of low or high motion.

Video (Greedy, High Motion)

- This method works at two levels. By default, at the Basic Level, it is a normal deinterlace method, with the following features:

  - A merge of Blended Clip, Greedy Low Motion, and some new stuff

  - Greedy implied pulldown, like the Greedy Low Motion method

  - Parm blending like the Blended Clip method, for less sizzling.

  - Lookahead motion detection

  - Diagonal Jaggie Reduction to smooth out the stair step effect in moving diagonal lines. This is accomplish by horizontally smoothing only the rapidly moving pixels, leaving the stationary ones alone. If a diagonal edge is not moving then it won't be jagged anyway under Greedy High Motion.

  - Slider adjustments for Max Comb, Motion Threshold, and Motion Sensitivity. However the defaults should be okay for most cases.

  Basic Level is compatible with all MMX, Pentium II, AMD K6-II, K6-III, Celeron and above machines. Performance will probably be about that of the Greedy 2-Frame method.

  There is also an Advanced Level (experimental) which is invoked if you check any of the boxes in the panel. A machine supporting the Intel SSE instruction set is needed. The Advanced options should run on Athlons, Intel P-III, P4, and the faster Celerons.

  Using the Advanced Options is very sensitive to machine performance and dropped frames, so you may have to lower your Resolution if you get jerkiness.

  The new check box enabled features are:

  - Built in 3:2, 2:2, and n:m Pulldown. This does pulldown matching, not removal, so all frames are displayed. I think this eventually will work better with video overlays and live TV viewing that is extensively edited, but it still needs improvement.

  - In-Between Frames. This gives judder reduction for those of us with fixed 60 HZ RTPV's. In a 3:2 pulldown situation it will select an appropriate pair of fields to average once out of every 5 frames. This can effectively display every new input frame 2 1/ 2 times. It will cause a small amount of motion blur every fifth frame but I personally leave it turned on all the time now for a smoother film picture sequence. It will also work with 2:2 pulldown (I think) but there one half of the frames will be averaged and the motion blur may not be acceptable.

  - Adjustable Edge Enhancement. This is due to an idea posted by this forum's MR. Wigggles. It enhances only a small amount, on the horizontal axis. When turned on you can use a slider to adjust it.

  - Adjustable Median Filter. Also due to Mr. Wigggles, this can help filter noise. However if set over about 3-5 it will also cause motion artifacts on fast moving scenes. Also has a slider.

  - Vertical Filter. This is a post-deinterlace software vertical filter that can remove both noise and some leftover deinterlace artifacts. It gives results similar to the hardware version available on the Advanced Video Flags screen, but not so extreme and without the jitter.

Greedy 2 Frame

- This method tries to combine the best features of the 2-frame algorithm with the looking ahead ability of the greedy method. I find this methods works well on sports and other high motion material. With static images and low quality sources there may be unacceptable levels of bobbing. This method uses four fields and has a configuarable motion detect. Motion is detected on a two pixel basis. This is the current default method for faster processors as it gives the best all round performance. Options:

  Greedy 2 Frame Luma Threshold

- Luma differences above this will be interpreted as movement.

Greedy 2 Frame Chroma Threshold

- Chroma differences above this will be interpreted as movement.

Video (TomsMoComp)

- This method is the latest and greatest method from Tom Barry. This new method improves on some of the older methods in two important ways. Where there is motion, the bob pixels are generated by looking along a series of diagonals as well as simple the ones above and below. Also when there is motion the code will try and spot slowly moving objects and will try and maintain the detail on those objects. The combined effect of these two searches is a big jump in picture quality and also a big jump in CPU usage. A 1 GHz CPU is required to use this method. Options:

  Search Effort

- This setting controls how much CPU is used by the method by controlling how big an area the method will search looking for matches. A Search effort (SE) of 0 means that all pixels are smart bobbed and is not recommended. SE = 1 does no motion compensation, but doesn benefit from the diagonal bob interpolation. SE > 1 starts to do true MoComp with increasing CPU demands. You should use the highest value that allows you to run any other filters etc without dropped frames.

Use Strange Bob

- This was some test code added by John Adcock to try and reduce the number of errors in the diagonal searches. It is not recommended.

Video (MoComp2)

- This is a new method that should be considered a work in progress. At the moment it is a motion adaptive method with diagonal interpolation based on: T. Chen, H.R. Wu; & Z.H. Yu, "Efficient deinterlacing algorithm using edge-based line average interpolation" Optical Engineering, Volume 39, Issue 8, (2000). This method also incorporates built in chroma smoothing to help disguise MPEG chroma problems.

  The method should be a general use one but at the moment most consider TomsMoComp to give a better picture. As this method uses less CPU than TomsMoComp it may be well suited to those who run a lot of filters. Note the built in chroma smoother means that this method may give better results with digital sourced material such as DVD or DVB.