开发者

where to start/split mpeg2-ts

开发者 https://www.devze.com 2023-03-13 06:59 出处:网络
I am writing a server which live streams mpeg2-ts on HTTP and I wondered what\'s the best position to split an mpeg tran开发者_如何学运维sport stream. The stream is going to be played by iptv set-top

I am writing a server which live streams mpeg2-ts on HTTP and I wondered what's the best position to split an mpeg tran开发者_如何学运维sport stream. The stream is going to be played by iptv set-top boxes and I have no idea how these devices behave.

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


You can start with every 188-byte TS packet (0x47 is the start code). The MPEG decoder automatically jumps in at the first I frame. You can do tricks like MS Mediaroom does with sending burst I-frames, but this requires heavy changes to your client (and patent royalities).


To be safe you should use self-initializing TS segments. Such segment must include the 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.

See more: GPAC - Apple HLS Introduction

0

精彩评论

暂无评论...
验证码 换一张
取 消