Create MPEG-DASH Initialization segment

*爱你&永不变心* 提交于 2019-11-30 14:06:19

What is the structure of a Dash video initialization segment?

The initialization segment contains information required to initialize the video decoder. The initialization segment is optional (refer to ISO/IEC 23009-1).

For ISO BMFF (commonly known as mp4) this includes the moov box (specified in ISO/IEC 14496-12). For MPEG-TS usually there is no initialization segment. When present it contains several packets that carry the initialization data in a PES.

How can I generate/create one without the need for the original full file?

Converting HLS to MPEG-DASH is trivial if your target player supports the required features. First you need a player that supports MPEG-TS. Then you don't actually need an initialization segment because the initialization data is contained inside each HLS segment. To convert and HLS playlist to a MPEG-DASH mpd you have to create a segment list or a segment template. Here is an example:

HLS:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXTINF:10.0,
stream0.ts
#EXTINF:10.0,
stream1.ts
#EXTINF:10.0,
stream2.ts

MPD:

...
<SegmentList duration="10">
   <SegmentURL media="stream0.ts"/>
   <SegmentURL media="stream1.ts"/>
   <SegmentURL media="stream2.ts"/>
</SegmentList>
...

If your target player does not support MPEG-TS or SegmentList then you have to convert the HLS stream to MPEG-DASH by the use of some external tool like MP4Box.

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