ziutek / dvb

DVB/MPEG-TS library (pure Go)
BSD 3-Clause "New" or "Revised" License
99 stars 17 forks source link

Added pes support for stream_id 0xbd, indicating private_stream_1 #12

Closed marc-ostrow closed 3 years ago

marc-ostrow commented 3 years ago

Added stream_id 0xbd, indicating private_stream_1.

We are receiving KLV private PES data on our single program transport streams. Typical Headers look as follows.

[000001bd002c81800525339fe61f305f31385f323134323837373434315f32355f313631363930323031393339393131380a]
[000001bd002c81800525339ffd95305f31395f323134323838343136335f32355f313631363930323031393431383338360a]
[000001bd002c8180052533a1150b305f32305f323134323839323533315f32355f313631363930323031393435393937350a]

stream_id is 0xbd, Flags are present, PTS is present, and the remaining data in the packet completes the PES packet. The header's PktPayload looks like the following from above

0_18_2142877441_25_1616902019399118
0_19_2142884163_25_1616902019418386
0_20_2142892531_25_1616902019459975

Frankly, I don't know what the first 4 fields are, but the 5th is Epoch microseconds which we need, and associated with PTS from the PES packet.