http://dvbsnoop.sourceforge.net/
Get
tarballs at: http://sourceforge.net/projects/dvbsnoop
Get
the latest source at: http://cvs.tuxbox.org/
Get DVB drivers at:
http://www.linuxtv.org
dvbsnoop is a DVB / MPEG stream analyzer program.
Its purpose is
to debug, dump or view stream information (e.g. digital television broadcasts)
send via satellite, cable or terrestrial. Streams can be SI, PES or transport
streams. DSM-CC and MHP will follow...
Basically you can describe dvbsnoop
as a simple stream analyzing program, similar to TCP network sniffer programs
like snoop on Sun Solaris or tcpdump under Linux.
The
programm was mainly written to learn and understand the DVB protocol structures
and streams sent via sattelites. Out of this reason, the programm ist not
performance optimized, but it will hopefully do its job.
Rainer Scherg
(rasc)
dvbsnoop is published under GPL:
License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
Yes, the standard disclaimer for all non-commercial software (;-)):
You may use this program freely, but on your own risk.
There is no garantee,
that this programm will fit your needs in any way. Also this program might not
compile on your computer - and if so, it may crash your computer or even eat
your cat.
By the way: It is strictly forbidden to use this program for hacking encrypted TV channels.
dvbsnoop is based on the linux dvb api. You need the dvb driver installed on your computer to use dvbsnoop. dvbsnoop is text-based, so it should work on any unix based system, which offers shell access and dvb support installed.
Download a tarball for dvbsnoop at:
http://sourceforge.net/projects/dvbsnoop.
Unpack
the tar archive using the 'gzip -d / bzip2 -d...' and 'tar xvf
...' commands.
Or get the latest source from the cvs at:
http://cvs.tuxbox.org/:
Please read
the checkout information.
dvbsnoop is part of the tuxbox/dbox2 project and
located in the /apps/dvb directory.
dvbsnoop is part of the dbox2 cdk. The dbox2 is a powerful digital
satellite receiver (set top box) with a network interface.
Just follow the
installation instructions of the dbox2 cdk:
cd cdk ./autogen.sh ./configure make .dvbsnoop |
Check out dvbsnoop from the cvs or download a tarball. If your distribution still uses Linux kernel 2.4, then you probably need to set the path to your DVB API header files by appending
CPPFLAGS=-I/path/to/dvb-kernel/linux/include
to the configure command.
cd dvbsnoop ./autogen.sh ./configure make |
Important: Currently I'm working with a dbox2 only (I do not own a dvb card for my linux server) - so I do not know if dvbsnoop is working on a linux based PC smoothly.
dvbsnoop is a commandline tool. Here comes a introduction in
brief...
To tune in a transponder, use a proper tuning program like
dvbtune (see: http://www.linuxtv.org) or a GUI based DVB
program like Neutrino or Enigma which is running on a dbox2 or on
a Linux-PC (see: http://www.tuxbox.org).
dvbsnoop [options] pid
pid can be
any unsigned number within the legal pid number range.
The PID can be
specified in hex, octal or decimal version (using C-syntax -notation).
e.g.:
hex: 0x1A, octal: 0722 , decimal: 6932
Some important command line options: | |||
Options | Description | Default | |
-demux device | demux device | default device | |
-dvr device | dvr device | default device | |
-frontend device | fe device | default device | |
-s
[sec|ts|pes| pidscan| bandwidth|signal|feinfo] |
snoop type sec = Sections, ts = Transport Stream pes = Packetized Elementary Stream., pidscan = transponder PID scan bandwidth = pid data rate statistics signal = frequency/transponder signal statistics feinfo = show information and parameters of frontend |
[-s sec] | |
-f filter | filtervalue for '-s sec' demux max demux filter usage value in "-s bandwidth" |
[-f 0] | |
-m mask | maskvalue for 'sec' demux | [-m 0] | |
-crc | CRC check when reading 'sec' (depends on your driver implementation) |
[-nocrc] | |
-nocrc | No CRC check when reading 'sec' | [-nocrc] | |
-buffersize KB | demux buffersize in KBytes (sec, ts, pes) e.g. -buffersize 512 or -buffersize 1024 0 = use dvbsnoop default buffersize for a snoop type. (default buffersize is 256 KB) |
[-buffersize 0] | |
-n count | receive count packets (0=no limit) | [-n 0] | |
-timeout ms | Section read timeout in ms (0=no timeout) | [-timeout 0] | |
-spiderpid | follow up referenced PIDs (sections only). Sets "-n 1" | ||
-tssubdecode | Subdecode PES or Section from TS packets | ||
-b | binary output of packets (disables other output) ("stream" output) | ||
-if | input file, reads from binary file instead of demux device | ||
-ph mode | print hex buffer, modes: 0=none, 1=hexdump, 2=hex line, 3=ascii line, 4=hexdump2 |
[-ph 1] | |
-nph | don't print hex dump (= -nohexdumpbuffer -ph 0) | ||
-pd verbose | print stream decode (verbose level 0..9) | [-pd 7] | |
-npd | don't print decoded stream (= -pd 0) | ||
-hexdumpbuffer | print read data as hexdump prior to decoding | [-hexdumpbuffer] | |
-nohexdumpbuffer | suppress hexdump print of read buffer | [-hexdumpbuffer] | |
-t[n|d|f] | print timestamp (no, delta, full) | [-tf] | |
-help | usage information... | ||
more options | please see man page! |
(default values are in square brackets...), bold options are most used...
dump PID Hex 10 (sections mode). This command will dump the NIT
transmission within the dvb data stream.
To ensure data integrity on
hardware/driver level, use the -crc option - otherwise you may
get garbage data analyzed... (E.g.: Trying to decode a mpeg2 video stream PID
as section, will fail with -crc switch on. With -nocrc) you may get odd
results!) Also on DVB-T signal strength may vary and result in garbage
sections....
~/bin > ./dvbsnoop 0x10 | more DvbSnoop Vers. 1.0a -- (c) Rainer Scherg --------------------------------------------------------- SECT-Packet: 00000001 PID: 16 (0x0010), Length: 282 (0x011a) Time received: Thu 16.10.2003 21:43:07.954 --------------------------------------------------------- 0000: @ . . . . . . . . . . . . . . . 0000: 40 f1 17 00 01 e9 01 01 f0 00 f1 0a 04 ff 00 01 0010: . . C . . . . P . . . . u . . . [...] 0100: . . . S . . . . C . . % D u . 0100: 20 00 04 04 53 00 01 f0 0d 43 0b 01 25 44 75 01 0110: . . . . . l . . z 0110: 92 81 02 20 00 04 6c d5 b5 7a PID: 16 (0x0010) NIT-decoding.... Table_ID: 64 (0x40) [= network_information_section - actual network] section_syntax_indicator: 1 (0x01) reserved_1: 1 (0x01) reserved_2: 3 (0x03) Section_length: 279 (0x0117) Network_ID: 1 (0x0001) [= Astra Satellite Network 19.2E / Satellite / SES] reserved_3: 3 (0x03) Version_number: 20 (0x14) Current_next_indicator: 1 (0x01) Section_number: 1 (0x01) Last_Section_number: 1 (0x01) reserved_4: 15 (0x0f) Network_descriptor_length: 0 (0x0000) reserved_5: 15 (0x0f) Transport_stream_loop_length: 266 (0x010a) Transport_stream_ID: 1279 (0x04ff) Original_network_ID: 1 (0x0001) [= Astra Satellite Network 19,2°E | Société Européenne des Satellites] reserved_1: 15 (0x0f) Transport_descriptor_length: 13 (0x000d) DVB-DescriptorTag: 67 (0x43) [= satellite_delivery_system_descriptor] Descriptor_length: 11 (0x000b) Frequency: 18453072 (= 11.99250 GHz) Orbital_position: 402 (= 19.2) West_East_flag: 1 (0x01) [= EAST] Polarisation: 0 (0x00) [= linear - horizontal] Modulation (Sat): 1 (0x01) [= QPSK] Symbol_rate: 2576384 (= 27.5000) FEC_inner: 3 (0x03) [= 3/4 conv. code rate] Transport_stream_ID: 1115 (0x045b) Original_network_ID: 1 (0x0001) [= Astra Satellite Network 19,2°E | Société Européenne des Satellites] reserved_1: 15 (0x0f) Transport_descriptor_length: 13 (0x000d) DVB-DescriptorTag: 67 (0x43) [= satellite_delivery_system_descriptor] Descriptor_length: 11 (0x000b) Frequency: 19292789 (= 12.66275 GHz) Orbital_position: 402 (= 19.2) West_East_flag: 1 (0x01) [= EAST] Polarisation: 0 (0x00) [= linear - horizontal] Modulation (Sat): 1 (0x01) [= QPSK] Symbol_rate: 2228224 (= 22.0000) FEC_inner: 4 (0x04) [= 5/6 conv. code rate] Transport_stream_ID: 1117 (0x045d) Original_network_ID: 1 (0x0001) [= Astra Satellite Network 19,2°E | Société Européenne des Satellites] reserved_1: 15 (0x0f) Transport_descriptor_length: 13 (0x000d) DVB-DescriptorTag: 67 (0x43) [= satellite_delivery_system_descriptor] Descriptor_length: 11 (0x000b) Frequency: 19304997 (= 12.69225 GHz) Orbital_position: 402 (= 19.2) West_East_flag: 1 (0x01) [= EAST] Polarisation: 0 (0x00) [= linear - horizontal] Modulation (Sat): 1 (0x01) [= QPSK] Symbol_rate: 2228224 (= 22.0000) FEC_inner: 4 (0x04) [= 5/6 conv. code rate] Transport_stream_ID: 1119 (0x045f) Original_network_ID: 1 (0x0001) [= Astra Satellite Network 19,2°E | Société Européenne des Satellites] reserved_1: 15 (0x0f) Transport_descriptor_length: 13 (0x000d) DVB-DescriptorTag: 67 (0x43) [= satellite_delivery_system_descriptor] Descriptor_length: 11 (0x000b) Frequency: 19341685 (= 12.72175 GHz) Orbital_position: 402 (= 19.2) West_East_flag: 1 (0x01) [= EAST][...] |
dump 10 packets of PID 0x12 (EIT, ...) in sections mode, using the fpid
filter 0x50 and pid mask 0xff.
-nph and -pd 3 tells dvbsnoop not to print a
hexdump and restrict output to print decoded streams at verbose level 3.
Timestamps should be printed in 'delta'-mode... Also check crc, to ensure
packets are vaild! (invalid packets will not be displayed - this is driver
dependent..)
~/bin > ./dvbsnoop -n 10 -td -f 0x50 -m 0xff -nph -pd 3 0x12 DvbSnoop Vers. 1.0a -- (c) Rainer Scherg --------------------------------------------------------- SECT-Packet: 00000001 PID: 18 (0x0012), Length: 528 (0x0210) Time (delta) received: 0.068 (sec) --------------------------------------------------------- PID: 18 (0x0012) EIT-decoding.... Table_ID: 80 (0x50) [= event_information_section - actual transport stream, schedule] section_syntax_indicator: 1 (0x01) Service_ID: 12003 (0x2ee3) [= --> refers to PMS program_number] Version_number: 6 (0x06) Current_next_indicator: 1 (0x01) Section_number: 112 (0x70) Last_Section_number: 176 (0xb0) Transport_stream_ID: 1089 (0x0441) Original_network_ID: 1 (0x0001) [= Astra Satellite Network 19,2°E | Société Européenne des Satellites] Segment_last_Section_number: 112 (0x70) Last_table_id: 80 (0x50) [= event_information_section - actual transport stream, schedule] Event_ID: 674 (0x02a2) Start_time: 0xcec0181500 (=2003-10-16 18:15:00 [UTC]) Duration: 0x0010000 (= 01:00:00 [UTC]) Running_status: 0 (0x00) [= undefined] Free_CA_mode: 0 (0x00) [= unscrambled] Event_ID: 675 (0x02a3) Start_time: 0xcec0191500 (=2003-10-16 19:15:00 [UTC]) Duration: 0x0010000 (= 01:00:00 [UTC]) Running_status: 0 (0x00) [= undefined] Free_CA_mode: 0 (0x00) [= unscrambled] Event_ID: 676 (0x02a4) Start_time: 0xcec0201500 (=2003-10-16 20:15:00 [UTC]) Duration: 0x0010000 (= 01:00:00 [UTC]) Running_status: 0 (0x00) [= undefined] Free_CA_mode: 0 (0x00) [= unscrambled] ========================================================== --------------------------------------------------------- SECT-Packet: 00000002 PID: 18 (0x0012), Length: 774 (0x0306) Time (delta) received: 0.048 (sec) --------------------------------------------------------- PID: 18 (0x0012) EIT-decoding.... Table_ID: 80 (0x50) [= event_information_section - actual transport stream, schedule] section_syntax_indicator: 1 (0x01) Service_ID: 12040 (0x2f08) [= --> refers to PMS program_number] Version_number: 6 (0x06) Current_next_indicator: 1 (0x01)[...] |
~/bin > ./dvbsnoop -n 1 -nph 0x12 dvbsnoop Vers. 1.1.7 -- http://dvbsnoop.sourceforge.net/ --------------------------------------------------------- SECT-Packet: 00000001 PID: 18 (0x0012), Length: 185 (0x00b9) Time received: Tue 2003-11-11 00:02:22.485 --------------------------------------------------------- PID: 18 (0x0012) EIT-decoding.... Table_ID: 79 (0x4f) [= event_information_section - other transport stream, present/following] section_syntax_indicator: 1 (0x01) reserved_1: 1 (0x01) reserved_2: 3 (0x03) Section_length: 182 (0x00b6) Service_ID: 28206 (0x6e2e) [= --> refers to PMS program_number] reserved_3: 3 (0x03) Version_number: 15 (0x0f) Current_next_indicator: 1 (0x01) Section_number: 1 (0x01) Last_Section_number: 1 (0x01) Transport_stream_ID: 1073 (0x0431) Original_network_ID: 1 (0x0001) [= Astra Satellite Network 19,2°E | Société Européenne des Satellites] Segment_last_Section_number: 1 (0x01) Last_table_id: 79 (0x4f) [= event_information_section - other transport stream, present/following] Event_ID: 25605 (0x6405) Start_time: 0xceda010500 (=2003-11-11 01:05:00 [UTC]) Duration: 0x0003000 (= 00:30:00 [UTC]) Running_status: 1 (0x01) [= not running] Free_CA_mode: 0 (0x00) [= unscrambled] Descriptors_loop_length: 155 (0x9b) DVB-DescriptorTag: 77 (0x4d) [= short_event_descriptor] Descriptor_length: 16 (0x10) ISO639_2_language_code: deu Event_name_length: 11 (0x0b) Event_name: "Abendschau" -- Charset: Latin alphabet no. 5 Text_length: 0 (0x00) Text: "" DVB-DescriptorTag: 80 (0x50) [= component_descriptor] Descriptor_length: 6 (0x06) reserved_1: 15 (0x0f) Stream_content: 1 (0x01) Component_type: 1 (0x01) == Content&Component: (= video, 4:3 aspect ratio, 25 Hz) Component_tag: 1 (0x01) ISO639_2_language_code: deu Component-Description: "" DVB-DescriptorTag: 80 (0x50) [= component_descriptor] Descriptor_length: 6 (0x06) reserved_1: 15 (0x0f) Stream_content: 2 (0x02) Component_type: 3 (0x03) == Content&Component: (= audio, stereo (2 channels)) Component_tag: 2 (0x02) ISO639_2_language_code: deu Component-Description: "" DVB-DescriptorTag: 84 (0x54) [= content_descriptor] Descriptor_length: 6 (0x06) Content_nibble_level_1: 2 (0x02) Content_nibble_level_2: 0 (0x00) [= news/current affairs (general)] User_nibble_1: 0 (0x00) User_nibble_2: 0 (0x00) Content_nibble_level_1: 8 (0x08) Content_nibble_level_2: 0 (0x00) [= social/political issues/economics (general)] User_nibble_1: 0 (0x00) User_nibble_2: 0 (0x00) Content_nibble_level_1: 11 (0x0b) Content_nibble_level_2: 15 (0x0f) [= user defined] User_nibble_1: 2 (0x02) User_nibble_2: 0 (0x00) DVB-DescriptorTag: 78 (0x4e) [= extended_event_descriptor] Descriptor_length: 85 (0x55) Descriptor_number: 0 (0x00) Last_descriptor_number: 0 (0x00) ISO639_2_language_code: deu Length_of_items: 0 (0x00) Text_length: 79 (0x4f) Text: "* Sondersitzung Abgeordnetenhauses<br>* Untreue im Amt<br>* S-Bahnhof Kolonnenstraße" -- Charset: Latin alphabet no. 5 DVB-DescriptorTag: 105 (0x69) [= PDC_descriptor] Descriptor_length: 3 (0x03) reserved_1: 15 (0x0f) Programme_identification_label: 0x5d805 [= month=11 day=11 hour=0 min=5] DVB-DescriptorTag: 95 (0x5f) [= private_data_specifier_descriptor] Descriptor_length: 4 (0x04) PrivateDataSpecifier: 5 (0x00000005) [= ARD, ZDF, ORF] DVB-DescriptorTag: 130 (0x82) [= User defined] Descriptor_length: 13 (0x0d) Descriptor-Data: 0000: 0 0 : 0 5 1 1 . 1 1 # 0 0 0000: 30 30 3a 30 35 31 31 2e 31 31 23 30 30 CRC: 3952000829 (0xeb8ebf3d) ========================================================== |
Dump 200 packets of PID 0x00 in transport stream mode to an image
file.
The raw datastream will be dumped in the specified stream mode (PES,
SECTION or TS).
This file can be used, to postprocess the dvb data
streams.
Read a data stream from file and analyze the stream.
It is important
that you specify mode (si, pes, ts) and optional the pid !
Scan tuned transponder for PIDs.
This mode tries to reveal all pids
transmitted on a transponder, even pids which are not present in PAT, PMT,
etc.
This scan may take 1-3 minutes, depending on how many demux filters
dvbsnoop is using. By default dvbsnoop tries to get all demux filters it can
allocate! On some dvb cards this can result in strange behavior. To
avoid this you can use the "-f"-option to set maximum filter usage by dvbsnoop
(less filters takes more time to complete the scan).
A good practice
would be to check how many dmx filters dvbsnoop can allocate on your dvb card
(-pd 9 option) and then lower this number by at least 4 filters (using -f
option).
Remark: The PID-SCAN snoop will only detect pids, which are
transmitted during the scan phase. Pids with a low repetition rate or pids
grabbed by other applications may not be detected.
Analyze bandwidth usage of a PID.
In this example, stop if more than
1000 packets are read. for different output information, you can tweak the -pd
option.
Show signal strength statistics of tuned
frequency/transponder.
Statistics will show signal strength, bit error rate,
signal-noise ratio, uncorrected blocks ans frontend status...
Please visit the following websites for more information:
http://dvbsnoop.sourceforge.net/ | This page, dvbsnoop homepage. | |
http://sourceforge.net/projects/dvbsnoop | The project homepage of dvbsnoop, currently the dvbsnoop cvs is hosted at www.tuxbox.org. To check out the source, read the cvs information on tuxbox.org. Tarballs will be published on this site. | |
http://www.tuxbox.org | Website for linux on a dbox2 (a set top box mainly
sold/"provided" in Europe). Here you will also find a support forum for linux@dbox2. |
|
cvs.tuxbox.org http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/tuxbox/apps/dvb/dvbsnoop/ |
The CVS for linux@dbox2. dvbsnoop is part of the linux@dbox2 project applications... | |
http://tuxbox.berlios.de | The old dbox2@linux homepage. For more links on this topic, have a look on the FAQ-Section of the forum! |
|
http://www.linuxtv.org | Linux based TV, the mother of all Linux based DVB related stuff!!! To get drivers or docs about the DVB-API, this will be your first choice! | |
http://www.dvb.org | Information about DVB | |
http://www.mhp.org | Information about MHP | |
http://www.etsi.org | Standards documents: e.g. EN 300 468 | |
http://www.iso.ch | Standards documents: e.g. ISO/IEC 13818-1, ISO/IEC 13818-6 | |
irc:#dbox2 | IRC Support channel for dbox2. (use e.g. IRC server irc.freenet.de:6667) | |
http://www.linuxstb.org/ | another very good site, with a punch of good tools! | |
http://www.magicality.org/code/dvbdata/ | A tool for saving data from the Data Carousell. (from Richard Palmer ) | |
http://sourceforge.net/projects/dvbsak/ | dvbsak is a general-purpose Digital Video Broadcasting library with tools. | |
http://ardmore.net/~thepaces/vk_tools/ | MPEG analyzing tool | |
http://www.linuxdvb.tv/ | ... just have a look | |
http://www.dbox2.info | a portal site about the dbox2 set top box. | |
http://www.cadsoft.de/people/kls/vdr/ | ... not directly related with dvbsnoop, but mui mucho cool! a DVB personal video recorder running on Unix... |
Remark:
In 2003 the development CVS has been moved from
cvs.berlios.de (German sourceforge clone) to cvs.tuxbox.org! This was necessary due to
uptime problems at berlios.de.
Authors are: | ||
Rainer Scherg | (rasc) | <rasc@users.sourceforge.net> |
Andreas Oberritter | (obi) | <obi@saftware.de> |
Thanks a lot to all the members and developers of the
tuxbox@dbox2 project!!!
These heros ;-) do great support and also bugfixing
- see also the history information in the source!!
If you find a bug or odd behavior of dvbsnoop, please save the stream to
a binary file using option '-b ... > file'. This way I could do a
post-analyze.
Please send bugreports with a detailed description to:
rasc@users.sourceforge.net
Do
NOT send saved stream files or large files without permission via
email!
Bugfixes, code snipsets, etc. are welcome
DVB stream analyzer, mpeg stream analyzer, ts stream analyzer, MPEG, MPG, descriptor, digital television, satellite TV, cable TV, dvb-c, dvb-s, dvb-t, MHP, DSM-CC, SI, PES, TOT, PAT, PMT, SDT, EIT, NIT, TDST, RST, SIT, DIT, BAT, EMM, ECM, SI Tables, SSU, INT, UNT, AIT, datagram, sections, transport stream analyzer, packet elementary stream, DEMUX, ISO/IEC 13818-1, ISO/IEC 13818-6, ETSI EN 300468, ETSI EN 301162, ETSI TS 102006, ETSI EN 301192, ETSI TR 101202, ITU H.222.0, data carousel, object carousel, dvb snoop, sniff, analyze, analyse, analyser, mpeg2, IOR, BIOP, TS, PES
http://dvbsnoop.sourceforge.net/
(c)
2001-2005 Rainer Scherg (rasc)
..