|
Namedvbsnoop - DVB and MPEG stream analyzerSYNOPSISdvbsnoop [-s mode] [options] piddvbsnoop [-s mode] [options] -if filename [pid] dvbsnoop [-s mode] [options] -b [pid] > binary.file dvbsnoop [-s mode] [options] DescriptionDVBSNOOP is a text based DVB and MPEG stream analyzer for viewing/debugging stream information, e.g. send via digital TV. You may also use dvbsnoop to analyze mpeg compliant streams stored on DVD or other media. Dvbsnoop analyzes and displays MPEG, DVB, DSM-CC, MHP, etc. data and structures in human readable form. Possible stream types are TS (tranport streams), PS (program streams), PES (packetized elementary streams) or SECTIONS (service information streams).DVBSNOOP also has some additional functionallity to analyze receiver (set top box, dvb card) data, bandwidth of a transport stream, pid scan, etc. Using special network programs like netcat (nc), dvbsnoop may also be used to do remote sniffing and decoding. For post-processing dvbsnoop output, you may use the full range of unix tools and scripting languages (grep, perl, python, mrtg, gnuplot, etc.). UsageDvbsnoop provides an online and offline input and different snoop/decoding modes (see below).Using dvbsnoop 'online' requires dvb-api compliant devices (http://www.linuxtv.org) to grab live stream information from e.g. satellite or cable tv or data streams. You will also need DVB compliant hardware (e.g. DVB-S pci card or a linux based setop box like dbox2 or Dreambox) to receive DVB data streams. To tune into a transponder or frequency, please use a program like 'szap', 'dvbtune' or a DVB-GUI like 'Enigma', 'Neutrino', 'MythTV', 'VDR', etc.. The 'offline' mode enables you to analyze binary stream files (e.g. transport stream files or PES files). Some options are specific for the selected modes. You may try different combinations of command line options to get best results. A short FAQ for common questions and example decoding output can be found at http://dvbsnoop.sourceforge.net. Basic Decoding Selection Mode Command Line Options
General Command Line Options
General Decoding Output Command Line Options
Device Selection Command Line OptionsDvbsnoop uses default devices, defined by the DVB API. On some platforms or if using multiple dvb cards, you may want to override default settings, e.g. to select a different tuner.
SECTION Mode (SEC) Specific Command Line OptionsThe following command line options are special to the 'SECTION' decoding mode:
Transport Stream (TS) Mode Specific Command Line OptionsThe following command line options are special to the 'Transport Stream' decoding mode:
PES or PS Mode Specific Command Line OptionsThe following command line options are special to the 'PES' (packetized elementary stream) or 'PS' (program stream) decoding mode:
PID Scan Mode Specific Command Line OptionsThe following command line options are special to the 'PID Scan' discovery mode:
Bandwidth Mode Specific Command Line OptionsThere are no special command line options for the 'Bandwidth' display mode.
Signal Mode Specific Command Line OptionsThere are no special command line options for the 'Signal Strength' display mode.
Frontend Info Mode Specific Command Line OptionsThere are no special command line options for the 'Frontend Info' display mode.
ExamplesExamples how to use dvbsnoop:Display EPG, 10 sections: dvbsnoop -s sec -nph -n 10 0x12 dvbsnoop -s sec -ph 3 -n 10 -crc 0x12 Display sections tree (1 packet each) using private provider data: dvbsnoop -s sec -spiderpid -privateprovider premiere.de 0x00 Display sections tree (1 packet each) skipping "empty" pids: dvbsnoop -s sec -spiderpid -timeout 15000 0x00 Display PAT transport stream (ts) and do subdecoding of sections and descriptors: dvbsnoop -s ts -pd 4 -tssubdecode -nph 0x00 Read PES (e.g. Videotext, Video, Audio) stream: dvbsnoop -s pes 0x28F dvbsnoop -s pes 0x28F -b > pes.bin.file Read PS from file and do not show hex dump: dvbsnoop -if hdtv_ps_file.mpg -s ps -ph 0 -nohexdumpbuffer -n 30 Show current signal strength: dvbsnoop -s signal dvbsnoop -s signal -pd 9 -n 100 -timeout 100 Show bandwidth usage of a PID 0x1FF: dvbsnoop -s bandwidth -n 1000 -pd 2 0x1FF dvbsnoop -s bandwidth -buffersize 256 -n 1000 0x1FF Do PID scan of a tuned transponder (different display levels): dvbsnoop -s pidscan -pd 1 dvbsnoop -s pidscan -pd 6 dvbsnoop -s pidscan -pd 9 -maxdmx 12 Show frontend info: dvbsnoop -s feinfo -pd 9 Try to scan all sections, read 2 packets per PID: dvbsnoop -nohexdumpbuffer -spiderpid -n 2 0x0000 Save 1000 packets of a transport stream to a file: dvbsnoop -b -n 1000 -s ts 0x200 > ts_file.pid0x200.bin dvbsnoop -b -n 1000 -s ts -tsraw > ts_file.bin Read transport stream (ts) from file and decode: dvbsnoop -s ts -if ts_stream.bin dvbsnoop -s ts -if ts_file.pid0x200.bin 0x200 Simple filter for some PID values, some examples: dvbsnoop -n 5 -nph 0x00 | grep -i "PID: " dvbsnoop -spiderpid -nph -n 10 0x00 | grep -i "PID: " | sort | uniq dvbsnoop -s signal -pd 9 | ./perl-statistics-prog.pl Other simple filter examples: dvbsnoop -s sec -f 0x4E -m 0xFF 0x12 dvbsnoop -s sec -f 0x4E.34.00 -m 0xFF.FF.0F 0x12 dvbsnoop -s sec -f 16.00 -m 255.255 0x12 dvbsnoop -s sec -nph -n 5 0x10 | grep -i "frequency" dvbsnoop -s ts -nph 0x100 | grep -i 'Transport_error\|^PID' Selecting devices: dvbsnoop -s feinfo -pd 9 -frontend /dev/dvb/adapter0/frontend1 dvbsnoop -s feinfo -pd 9 -adapter 0 -devnr 1 dvbsnoop -s feinfo -pd 9 -adapter 2 Sending dvbsnoop data over network, using netcat: dvbsnoop -s pes 0x28F -b nc -q ServerName 31337 Do remote decoding of dvb data over network using dvbsnoop and netcat: streaming site: dvbsnoop -s ts 0x0065 -b nc -q ServerName 31000 reveiving site: nc -l -p 31000 dvbsnoop -nph -s ts -tssubdecode -if - You may also use e.g. dvbtools for sending dvb data over a network: dvbstream .... --> dumprtp dvbsnoop -s ts -if - NOTESdvbsnoop tries to decode all of the data it receives, e.g. if you try to decode a video or audio stream in section mode, dvbsnoop may assume a section table and will decode the data wrong. In this case the decoding will be garbage. Using the '-crc' option should prevent this (if supported at the hardware/driver level).dvbsnoop does not do DVB stream validation. dvbsnoop assumes correct DVB streams. Corrupted streams or streams with wrong semantics (e.g. incorrect length information) will result in wrong decoding output. For this reason, the use of '-crc' options is strongly recommended. Depending on the firmware of your dvb card, dvbsnoop may not be able to sniff on pids, which are occupied by other processes. This is no bug, this is a driver/firmware issue. SIGNALSdvbsnoop catches signals to provide smooth program termination. SIGHUP, SIGQUIT and SIGTERM will terminate dvbsnoop smoothly. SIGABORT will abort at once after flushing buffers. SIGKILL will just kill down dvbsnoop (OS specific).BUGSPlease check http://dvbsnoop.sourceforge.net for bug reports.Bug reports: http://sourceforge.net/tracker/?group_id=85040 SEE ALSOdvbtune (1), dvbstream (1).AcknowledgmentsDVBSNOOP was written by Rainer Scherg (rasc).Copyright (c) 2001-2006 Rainer Scherg Additional patches and bugfixes/-reports were provided by members
of the tuxbox project - bringing digital TV to linux based set top boxes
(e.g. "dbox2" digital tv receiver) and also by users of dvbsnoop
(see the ChangeLog file for credits).
Visit the GSP FreeBSD Man Page Interface. |