Difference between revisions of "Dvbv5-zap"

From LinuxTVWiki
Jump to: navigation, search
(dvbv5-zap)
 
Line 1: Line 1:
= dvbv5-zap =
+
= The dvbv5-zap tool =
  
 
{{lowercase|dvbv5-zap}}
 
{{lowercase|dvbv5-zap}}

Latest revision as of 10:47, 13 March 2017

The dvbv5-zap tool

dvbv5-zap is a command line tuning tool for digital TV services that is compliant with version 5 of the DVB API, and backward compatable with the older v3 DVB API. It was developed as part of DVBv5 Tools suite, which resides in the v4l-utils git repositiory [1].

dvbv5-zap uses by default a new channel/service file format that it is capable of supporting all types of Digital TV standards. It can also support the legacy format used by the legacy dvb-apps.

For other dvbv5 tools, please see the main article.

The dvbv5-zap tool can be used on several different modes, depending on the parameters used.

Recording a channel

The typical use is to tune into a channel and put it into record mode:

$ dvbv5-zap -c dvb_channel.conf "trilhas sonoras" -r
using demux '/dev/dvb/adapter0/demux0'
reading channels from file 'dvb_channel.conf'
service has pid type 05:  204
tuning to 573000000 Hz
audio pid 104
  dvb_set_pesfilter 104
Lock   (0x1f) Quality= Good Signal= 100.00% C/N= -13.80dB UCB= 70 postBER= 3.14x10^-3 PER= 0
DVR interface '/dev/dvb/adapter0/dvr0' can now be opened

The channel can be watched by playing the contents of the DVR interface, with some player that recognizes the MPEG-TS format.

For example (in this specific case, it is an audio only channel, but the same could be used for audio/video):

$ mplayer -cache 800 /dev/dvb/adapter0/dvr0
MPlayer SVN-r37077-4.8.2 (C) 2000-2014 MPlayer Team
TS file format detected.
NO VIDEO! AUDIO MPA(pid=104) NO SUBS (yet)!  PROGRAM N. 0
==================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...

Recording the full MPEG stream on a transponder

It is possible to record all program IDs inside a MPEG stream. That's particularly useful on bug reports, as the output could be reproduced via a RF generator, allowing other people to reproduce the bug on some other part of the globe. Please notice, however, that such outputs are usually very big. So, you may want to record only 30 to 60 seconds.

For example, to record the full MPEG-TS for 60 seconds, for DVB-S using the GVT BrasilSat LNBf as mpeg.ts:

 dvbv5-zap -l gvt-brasilsat -P -t 60 RBI -o mpeg.ts
 Using LNBf GVT-BRASILSAT
 	BrasilSat custom GVT (bandstacking)
 	Vertical  : 11010 to 11067 MHz, LO: 12860 MHz
 	Vertical  : 11704 to 11941 MHz, LO: 13435 MHz
 	Horizontal: 10962 to 11199 MHz, LO: 13112 MHz
 	Horizontal: 11704 to 12188 MHz, LO: 13138 MHz
 using demux 'dvb0.demux0'
 reading channels from file '/home/mchehab/.tzap/channels.conf'
 tuning to 12170000 Hz
 pass all PID's to TS
   dvb_set_pesfilter 8192
        (0x00) Signal= -46.97dBm
 Lock   (0x1f) Signal= -46.97dBm C/N= 17.48dB
 Lock   (0x1f) Signal= -49.06dBm C/N= 17.63dB postBER= 0
 Lock   (0x1f) Signal= -49.06dBm C/N= 17.63dB postBER= 0
 Record to file 'mpeg.ts' started

Monitoring a Channel

The dvbv5-zap tool can also be used to monitor a DVB channel:

$ dvbv5-zap -c dvb_channel.conf 573000000 -m
using demux '/dev/dvb/adapter0/demux0'
reading channels from file 'dvb_channel.conf'
service has pid type 05:  204
tuning to 573000000 Hz
Lock   (0x1f) Quality= Good Signal= 100.00% C/N= -13.90dB UCB= 384 postBER= 96.8x10^-6 PER= 0
  dvb_set_pesfilter to 0x2000
PID FREQ SPEED TOTAL
0000 9.88 p/s 14.5 Kbps 1 KB
0001 1.98 p/s 2.9 Kbps 376 B
0010 18.77 p/s 27.6 Kbps 3 KB
0011 48.42 p/s 71.1 Kbps 8 KB
0012 1455.53 p/s 2137.8 Kbps 270 KB
...
1fff 1033.60 p/s 1518.1 Kbps 192 KB
TOT 25296.44 p/s 37154.2 Kbps 4700 KB
Lock   (0x1f) Quality= Good Signal= 100.00% C/N= -13.90dB UCB= 384 postBER= 96.8x10^-6 PER= 0


Syntax

By default the channels file is read from ```~/.tzap/channels.conf```

$ ./dvbv5-zap 
Usage: dvbv5-zap [OPTION...]
            <channel name> [or <frequency> if in monitor mode]
DVB zap utility

  -3, --dvbv3                Use DVBv3 only
  -a, --adapter=adapter#     use given adapter (default 0)
  -A, --audio_pid=audio_pid# audio pid program to use (default 0)
  -c, --channels=file        read channels list from 'file'
  -C, --cc=country_code      use default parameters for given country
  -d, --demux=demux#         use given demux (default 0)
  -f, --frontend=frontend#   use given frontend (default 0)
  -I, --input-format=format  Input format: ZAP, CHANNEL, DVBV5 (default:
                             DVBV5)
  -l, --lnbf=LNBf_type       type of LNBf to use. 'help' lists the available
                             ones
  -L, --search=string        search/look for a string inside the traffic
  -m, --monitor              monitors de DVB traffic
  -o, --output=file          output filename (use -o - for stdout)
  -p, --pat                  add pat and pmt to TS recording (implies -r)
  -P, --all-pids             don't filter any pids. Instead, outputs all of
                             them
  -r, --record               set up /dev/dvb/adapterX/dvr0 for TS recording
  -s, --silence              increases silence (can be used more than once)
  -S, --sat_number=satellite_number
                             satellite number. If not specified, disable DISEqC
                            
  -t, --timeout=seconds      timeout for zapping and for recording
  -U, --freq_bpf=frequency   SCR/Unicable band-pass filter frequency to use, in
                             kHz
  -v, --verbose              verbose debug messages (can be used more than
                             once)
  -V, --video_pid=video_pid# video pid program to use (default 0)
  -w, --lna=LNA (0, 1, -1)   enable/disable/auto LNA power
  -W, --wait=time            adds additional wait time for DISEqC command
                             completion
  -x, --exit                 exit after tuning
  -X, --low_traffic          also shows DVB traffic with less then 1 packet per
                             second
  -?, --help                 Give this help list
      --usage                Give a short usage message
      --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to Mauro Carvalho Chehab <m.chehab@samsung.com>.