Where to start / split mpeg2-ts

I am writing a server on which mpeg2-ts streams are streamed over HTTP, and I wondered what is the best place to split the mpeg transport stream. The stream will be played by iptv consoles, and I don’t know how these devices behave.

I would think that the best place to start the stream is before I-Frame, but the device may need PAT and PMT packets before it starts to decode the video stream data ...

+6
source share
2 answers

You can start with each 188-byte TS packet (0x47 is the initial code). MPEG decoder automatically switches to the first I-frame. You can do tricks, such as MS Mediaroom, with sending packets of I-frames, but this requires significant changes for your client (and patents).

+1
source

To be safe, you must use the self-initializing TS segments. Such a segment should include PAT / PMT and start with an IDR frame.

For example, this is a requirement in the HTTP Live Streaming pantos draft when using I-Frame playlists.

Read more: GPAC - Introduction to Apple HLS

+1
source

Source: https://habr.com/ru/post/890696/


All Articles