This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

What is the best way to parse MPEG2 TS packets with Lua

0

I would like to capture IP stream and then parse MPEG2 TS incapsulated in it, i need to findout CC counters/errors, PCR etc. function tap.packet(pinfo,tvb, calls every IP packet, can i change it to every TS packet?

asked 11 Feb '14, 13:51

vovka_morkovka's gravatar image

vovka_morkovka
11113
accept rate: 0%

retagged 26 Feb '14, 22:03

Hadriel's gravatar image

Hadriel
2.7k2939


One Answer:

1

Try this:

local tap = Listener.new("ip","mp2t")

answered 17 Feb '14, 11:39

Hadriel's gravatar image

Hadriel
2.7k2939
accept rate: 18%

but it will enter to function tap.packet(pinfo,tvb) every IP packet not every TS packet as i would expect, correct?

(21 Feb '14, 18:13) vovka_morkovka

Well I haven't tried it, since I don't have a capture file handy with TS packets and non-TS packets, but in theory it should only call tap.packet() for packets matching the filter in that second argument to Listener.new(), and thus only MPEG2 TS packets.

(21 Feb '14, 19:25) Hadriel

I have tested and it does not work as expected. I can send you capture if you want.

(26 Feb '14, 00:39) vovka_morkovka

@vovka_morkovka

Your "answers" have been converted to comments as that's how this site works. Please read the FAQ for more information.

(26 Feb '14, 02:13) grahamb ♦

Yes please send it - or put it up on cloudshark, or attach it to a new bugzilla ticket (https://bugs.wireshark.org/bugzilla/)

(26 Feb '14, 08:16) Hadriel