Extract mpeg transport stream header from UDP packet

I wrote a program in which I get the udp package from the multicast address. Now I need to extract mpegts from this package. I can take the udp package payload. Can someone help me extract the mpeg header from the udp package.

+4
source share
1 answer

MpegTS is usually carried over UDP using RTP. Skip the RTP header. The rest (188 * 7 bytes) is the payload, 7 TS packets. Each packet should begin with 0x47.

Update

There are several layers of packaging, each of which wraps / separates the sequence. The upper layers are quite nice, the lower (elementary stream) depends on the codec and is rather messy.

MPEG TS - MPEG PES - MPEG ES

+3
source

All Articles