创建MPEG-DASH初始化段 [英] Create MPEG-DASH Initialization segment

查看:135
本文介绍了创建MPEG-DASH初始化段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在HLS和MPEG Dash之间转换.我无法访问原始的完全串联的视频文件,只能访问各个HLS段.

I am looking to convert between HLS and MPEG Dash. I do not access to the original fully concatenated video file, only the individual HLS segments.

在向MPEG Dash进行这种转换时,我需要为Dash清单.mpd文件提供一个初始化部分.

In doing this transformation to MPEG Dash I need to supply an initialziation segment for the Dash manifest .mpd file.

我的问题是:

  1. Dash视频初始化段的结构是什么?
  2. 如何在不需要原始完整文件的情况下生成/创建一个文件?

也许一个解决方案将涉及使MP4Box将'.ts'HLS段转换为可自动初始化的Dash'.m4s'段,但是我不确定如何进行此操作?

Perhaps a solution would involve getting MP4Box to convert the '.ts' HLS segments to Dash '.m4s' segments which are self initializing, but I am unsure how to go about this this?

任何想法都值得赞赏.

非常感谢.

更新: 使用原始hls片段流式传输的片段.视频一直播放,但只是黑色.

UPDATE: Snippet to stream using original hls segments. Video plays all the way through but is just black.

  <Representation width="426" height="238" frameRate="25" id="238p 400kbps" bandwidth="400000">
    <SegmentList timescale="25000" duration="112500">
           <SegmentURL media="video_0_400000/hls/segment_0.ts"/>
           <SegmentURL media="video_0_400000/hls/segment_1.ts"/>
          <SegmentURL media="video_0_400000/hls/segment_2.ts"/>
    </SegmentList>
   </Representation>
</AdaptationSet>

推荐答案

Dash视频初始化段的结构是什么?

What is the structure of a Dash video initialization segment?

初始化段包含初始化视频解码器所需的信息.初始化段是可选的(请参阅ISO/IEC 23009-1).

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

对于 ISO BMFF (通常称为mp4),其中包括moov框(指定在ISO/IEC 14496-12中).对于 MPEG-TS ,通常没有初始化段.当存在时,它包含几个在 PES 中承载初始化数据的数据包.

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?

如果目标播放器支持必需的功能,则将HLS转换为MPEG-DASH并不重要.首先,您需要一个支持MPEG-TS的播放器.然后,您实际上不需要初始化段,因为初始化数据包含在每个HLS段中.要将HLS播放列表转换为MPEG-DASH mpd,必须创建segment listsegment template.这是一个示例:

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>
...

如果目标播放器不支持MPEG-TS或SegmentList,则必须使用MP4Box之类的外部工具将HLS流转换为MPEG-DASH.

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.

这篇关于创建MPEG-DASH初始化段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆