From LinuxTVWiki
Revision as of 05:20, 3 April 2005 by Guidod (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The szap tool is part of the LinuxTV dvb-apps. It is used to tune DVB-S channels.

command line

usage: szap -q
         list known channels
       szap [options] {-n channel-number|channel_name}
         zap to channel via number or full name (case insensitive)
     -a number : use given adapter (default 0)
     -f number : use given frontend (default 0)
     -d number : use given demux (default 0)
     -c file   : read channels list from 'file'
     -x        : exit after tuning
     -r        : set up /dev/dvb/adapterX/dvr0 for TS recording
     -l lnb-type (DVB-S Only) (use -l help to print types) or 
     -l low[,high[,switch]] in Mhz
     -i        : run interactively, allowing you to type in channel names
                 or -n numbers for zapping


If it is being run in a terminal then it will present status information. The "status" is a bitflag series, the "signal" is signal strength (higher better), the "snr" is signal to noise ratio, the "ber" is the block error ration (lower better), the "unc" is uncorrected blocks (lower better) and finally the message "FE_HAS_LOCK" that shows when tuning has been successful.

# szap MTV
zapping to 14 'MTV':
sat 0, frequency = 11739 MHz V, symbolrate 27500000, vpid = 0x0bd7, apid = 0x0bd8
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
status 1f | signal bdbd | snr dcdc | ber 00000000 | unc ffffffff | FE_HAS_LOCK

When exiting the tool (via Control-C) the tuning will usually fail after a few seconds. This is a frequently asked question - the dvb driver will deactivate the tuner to save power consumption leaking to the LNB. This deactivation is not done in less than a second but instead the deactivation delay is set to five seconds. Upon loadm it is possible to hand over a variable setting that will never deactivate even after leaving "szap".


By default (unless "-c" is given) then a "$HOME/.szap/channels.conf" will be read for getting tuning parameters for each channel. Usually this file is being filled via dvbscan. If you use multiple dvb cards then it is possible to move the channels.conf file down into "$HOME/.szap/0/channels.conf" "$HOME/.szap/1/channels.conf" respectivly (selected via "-a" option).

Remember that the recording output must always be activated via the command line ("-r"). The szap tool can not enable multiple video streams in a DVB-S transport stream. Therefore even simple recording tools (like copy) will work and create a file that can be played by tools that understand DVB packet structures.