dvbsnoop - FAQ

Some questions and answers...

  1. Q: What is dvbsnoop?
    dvbsnoop is a mpeg analyzer for viewing/debugging mpeg or dvb based stream information, send via digital TV. You may also use dvbsnoop to analyze mpeg compliant streams stored on filesystem or other media... dvbsnoop analayzes and displays mpeg, dvb dsm-cc, mhp, etc. data and structures in human readable form. dvbsnoop is not designed to be fault tolerant - damaged or braindead stream information could lead to odd results.

  2. Q: What do I need to run dvbsnoop?
    dvbsnoop runs on Linux - supporting DVB API 1 or DVB API 3. (DVB API 3 is part of Linux kernel 2.6.)
    To use the realtime sniffing mode you need a dvb card installed into your system. To analyze a stream file, you just need Linux (or Cygwin for MS-Windows).

  3. Q: Under what license is dvbsnoop?
    dvbsnoop is published under "GPL".

  4. Q: May I re-use dvbsnoop code or ideas for my own project?
    dvbsnoop is published under "GPL". So yes, you may recycle dvbsnoop code, if you are publishing your project under GPL, too. If you are using dvbsnoop (basics, ideas, code), please place a link/note to the dvbsnoop homepage in your project.

  5. Q: What is DVB and digital TV?
    Have a look at http://www.dvb.org. Also Google is very helpfull for explanations.

  6. Q: What features does dvbsnoop provide?
    Have a look at the feature list...

  7. Q: Is there a BBS or newsgroup/maillist to ask questions?
    Well, you might use the linuxtv maillinglist (or post a question to the tuxbox forum (German BBS, but you may also post questions in English).)..

  8. Q: I found a bug, what to do?
    Interaction between standards organizations (ETSI, ITU, ISO, ...) and also between standards itself sometimes is very complex, especially when standards are enhanced or collide with other drafts. So bugs are very likely (also programming bugs...). Due to missing or proper test streams, some features are implemented without possible real life testing... Please report any bug or odd behavior.

  9. Q: How do I know the PIDs to sniff on?
    The PAT section ("dvbsnoop -nph 0x01") provides the necessary information. Use program PIDs in the PAT to decode the PMT section.
    To see if there are any "hidden" PIDs, use "dvbsnoop -s pidscan".

  10. Q: How do I tune into a frequency with dvbsnoop?
    dvbsnoop doesn't do tuning. It's only designed to sniff...
    Use dvbtune, or a GUI like dbox2's "Neutrino" to tune into a transponder or frequency...

  11. Q: Why can't I snoop the PID 0x1FFF?
    PID 0x1FFF is a NULL packet, used for stuffing. The availablity of this PID depends on the firmware (ucodes) of your dvb hardware.

  12. Q: Why can't I snoop some PIDs?
    Depending on your DVB card firmware or driver, a PID which is already occupied by another process may not be available to dvbsnoop. In this case close all dvb applications (TV-, streaming-, EPG-applications).

  13. Q: Can I snoop multiple PIDs?
    Currently not (DVB-API 1 and DVB-API 3). But there is a workaround: depending on your DVB hardware you may save a complete transport stream (raw binary data) or a multiple pid transport stream as file. You can analyze this transport stream using "dvbsnoop -s ts -tssubdecode -if filename ..."

  14. Q: Can dvbsnoop "follow" PIDs?
    Yes. Use the option "-spiderpid". This will enable dvbsnoop to recursivly follow PIDs. Use also option "-n <count>" to limit PID read cycles...

  15. Q: Why can't I see any data analyzed by dvbsnoop?
    Did you tune into a valid transponder/frequency containing a DVB stream? Use dvbtune, szap, VDR, Neutrino, Enigma or any other tool to tune to a DVB service (program)... Use "dvbsnoop -signal" to check if you are tuned and locked into a transponder and are in-sync.

  16. Q: What to do on "read error , buffer overflow"?
    The dvb data stream on the selected PID is too fast for dvbsnoop to decode. Packets are lost. The reason for this might be high PID bandwidth, slow cpu (e.g. a set top box - PCs should have sufficient cpu power), or output is sent to a "slow" terminal (e.g. via network connection). To avoid this, save the binary stream to file (option -b) and analyze the stream file. If the buffer overlow still consists while saving the stream to a file, try to save the stream to a fast media (e.g. virtual disk/ram disk, - on many systems /tmp might be such a ram file system).

    As of version 1.3.69 you might use the command line option "-buffersize xxxx" to set a larger demux buffersize. Size will be given in KBytes (see usage description or feature list). dvbsnoop's default buffersize is 256 KBytes.

  17. Q: I get strange output on SECTIONs...
    Use the option -crc to enforce valid data. If a packet is delivered in sync to dvbsnoop, depends on your DVB hardware/firmware. Also I observed that some firmware is clearing the "scrambled" flag in TS packets, even if the transport stream or PES is scrambled or wrongly descrambled (e.g. because you didn't subscribe to this channel). dvbsnoop tries to analyze the stream as unscrambled stream (which will lead to odd analyzing reports, of course).

  18. Q: Why is the command option "-sync" default and otherwise on SECTIONs mode "-nocrc" default?
    Unsynced TS or PES is useless, because decoding will be completly gaga. On sections -nocrc is default, because there might be private sections (e.g. ECM) or DSM-CC sections with no or different CRC calculations (e.g. dsm-cc datagram). Software packet sync is default as if 1.4.10 and cannot be switched off.

  19. Q: Can I filter or customize the dvbsnoop output?
    On Unix you may find many tools to tweak or filter the output of dvbsnoop, using "grep", "nawk", "perl" or other stuff.. (e.g.: dvbsnoop -nph 0x00 | grep -i "pid").

  20. Q: Can I filter dvb input?
    Currently you only can filter dvb stream input, using PID filters on sections and when reading from a transport stream file. But plans are to enhance input filter capabilities. There are requests by different persons: positive/negative filter mask, filtering "bytes" on specified packet positions, and also requests for really enhanced content (output) filters.

  21. Q: Can dvbsnoop decode private/user defined data?
    Basically: Yes. You have to tell dvbsnoop which provider's private scope to use. (e.g. commandline option: "-privateprovider premiere.de"). If dvbsnoop is aware of this provider, it will decode the private data structures.

  22. Q: Can dvbsnoop decode the private data of provider/service XYZ?
    Try "dvbsnoop -help", to see if the provider name is listed. If not, someone has to send information about the private descriptors and tables to the author.

  23. Q: Does dvbsnoop analyze MPEG video/audio stream content?
    dvbsnoop decodes meta information about dvb and mpeg streams, but does not analyze video or audio stream content in detail, which is described outside ISO/IEC 13818-1 / ITU H.222.0. There are other good tools available to analyze e.g. mpeg video I-frame rates, compression rates, mpeg vectors, etc.. You may use dvbsnoop in combination with these tools. Latest versions of dvbsnoop are doing a rough ISO/IEC 13818-2 analyze of a mpeg stream.

  24. Q: Can I use dvbsnoop to do remote sniffing of DVB over a network?
    Yes! Using special network programs like netcat (nc) or dvbstream/rtpdump, dvbsnoop may also be used to do remote sniffing and decoding. Basically, you may use unix "pipes" to push a dvb data stream over a network and use a receiving program piping the data stream to dvbsnoop. Please see the examples on the man page.
  25. Q: Will there be a XML output option for dvbsnoop?
    Planned... But it needs major rewriting of some dvbsnoop routines and behavior.

  26. Q: Why is dvbsnoop command line based (pure text output)?
    You can use some easy perl-/shellscripts and tools like GNU-PLOT or MRTG to create fancy graphics from dvbsnoop output (e.g. bitrate figures, pid usage, etc.). For post-processing dvbsnoop output, you may use the full range of unix tools and scripting languages (grep, perl, python, mrtg, gnuplot, etc.).
    Also you might review the dvbsnoop output - saved to a file - with a simple text editor and search for certain information in the stream. Basically said: command line based programs offers you a whole punch of postprocessing possibilites - e.g. for expert usage and data post processing.

  27. Q: Will there be a graphical interface for dvbsnoop?
    Not planned. But when XML output is implemented, there might be some future options the implement an GUI-Addon.

  28. Q: Will there be a Windows port?
    Currently no plans, because you would need the DVB-API on Windows (One of the major problem on Windows is: there is no standard api for dvb devices...).
    But you may use dvbsnoop as offline analyzer (option: -if filename) using e.g. CYGWIN. CYGWIN based dvbsnoop will run in a commandline window (cmd.exe) or in an CYWIN environment.

  29. Q: Can I use dvbsnoop without DVB cards installed?
    Yes, you can. But without dvb reception hardware, you will not able to do realtime sniffing of the dvb traffic, of course.
    But you may use dvbsnoop as offline analyzer (option: dvbsnoop -if filename).

  30. Q: Future development of dvbsnoop?
    I'm also involved in other projects and too bad for my software projects: there is also a "real" life... ;-)
    So, future development of dvbsnoop depends on my sparetime for dvbsnoop...
    But if you are interrested in enhancing dvbsnoop, any help is welcome...