[linux-dvb] hi,a very simply question about DVBsnoop

Christophe Thommeret hftom at free.fr
Tue Dec 5 08:27:01 CET 2006

Le mardi 05 décembre 2006 04:39, allanye at 163.com a écrit :
> Hi all,
> I am a new learner of DVBsnoop.
> now Dvbsnoop can run in my cygwin shell.and I can run some simple command
> like $ /dvbsnoop -if test.ts -n 1 0x00 -hexdumpbuffer 1.txt

dvbsnoop -s ts -if test.ts -nph -tssubdecode -n 1 0x00

The table is decoded when all ts packets are retrieved.
Be aware that when reading from binary, -n 1 reads only the first packet 
whatever its pid. So, better try -n 10000 to have a chance to get the 
But the best is to write a little filter prog and run something like that:
cat test.ts | tsfilter 17 | ./dvbsnoop -s ts -if /dev/stdin -nph -tssubdecode 
17 | less

ts2filter would look like:

int main(int argc, char **argv)
  int pid, pid1;
  unsigned char buf[188];


  do {
    if (n==188) {
      pid = (((buf[1] & 0x1f) << 8) | buf[2]);
      if (pid==pid1)
  } while ( n>0 );

Christophe Thommeret

More information about the linux-dvb mailing list