How are access units aligned within PES packets in Apple's HLS?

╄→гoц情女王★ 提交于 2019-12-04 17:43:13

I'd like to know how it's done specifically in HLS - not necessarily any other MPEG-2 TS application.

HLS is a standard MPEG-2 TS stream. HLS does not do it any differently, except limit to a single audio and singe video stream. And limit codecs to AVC/AAC/MP3

For the rest of the answers, I will assume you are referring to the AVC codec. (AAC and and MP3 have different answers)

How many access units should one put in a PES packet payload?

One. However for efficiency, the last NALU may be truncated on a TS boundary, and the remainder prepended to the next AU at the start of the next PES. This is optional, but it does reduce bitrate.

I'm wondering which prefix start codes (if any) are present in PES packets.

MPEGTS requires annex B style start codes. One start code before every NALU. An AU will have several NALUs as AUDs are required in mpegts.

I assume that the one preceding the first NAL unit within an access unit is useless and mustn't be put. Right?

Completely wrong. Every NALU must begin with a start code,

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!