Re: hi,a very simply question about DVBsnoop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le mardi 05 décembre 2006 04:39, allanye@xxxxxxx 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

try:
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 
section.
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];

  pid1=atoi(argv[1]);

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

-- 
Christophe Thommeret

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux