0

我正在为实时流实现 mpeg-dash 视频服务器,

分块流并将块添加到 mpd - 有效,请参见示例

<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="Live" availabilityStartTime="2015-07-09T15:10:46.775640Z" minimumUpdatePeriod="PT10.0S" timeShiftBufferDepth="PT1.0M" maxSegmentDuration="PT20.0S" minBufferTime="PT1.0S" profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
<Period id="1" start="PT0S">
<AdaptationSet group="1" mimeType="video/mp4" segmentAlignment="true" maxWidth="640" maxHeight="480" startWithSAP="1">
<SegmentTemplate timescale="1000" media="$RepresentationID$/$Time$.m4v" initialization="$RepresentationID$/init.vmoov">
<SegmentTimeline>
<S t="625" d="11000"/>
<S t="11625" d="12000"/>
<S t="23625" d="7200"/>
<S t="30825" d="9800"/>
<S t="40625" d="10760"/>
<S t="51385" d="10520"/>
<S t="61905" d="11640"/>
<S t="73545" d="9160"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="ad/a" codecs="avc1.4D401E" width="640" height="480" frameRate="25" bandwidth="1000000"></Representation>
</AdaptationSet>
<AdaptationSet group="2" mimeType="audio/mp4" segmentAlignment="true">
<SegmentTemplate timescale="1000" media="$RepresentationID$/$Time$.m4a" initialization="$RepresentationID$/init.amoov">
<SegmentTimeline>
<S t="721" d="10922"/>
<S t="11643" d="11990"/>
<S t="23633" d="7210"/>
<S t="30843" d="9792"/>
<S t="40635" d="10752"/>
<S t="51387" d="10539"/>
<S t="61926" d="11627"/>
<S t="73553" d="9173"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="ad/a" codecs="mp4a.40.02" audioSamplingRate="48000" bandwidth="66750"></Representation>
</AdaptationSet>
</Period>
</MPD>

但是当我尝试实现滑动播放列表时

(例如将有 5 个块,新块将替换旧块。目前我只打印更新的 SegmentTimeline 而不更改任何其他值。)

播放器在 .mpd 刷新后停止播放。

分段时间 - 是流的实际时间线。(即与 .m4* 文件相同)

我需要为带有滑动播放列表的实时视频实现哪些属性/元素?

4

1 回答 1

3

更新时间线很好,没有其他必要。

根据MPEG-DASH 标准,MPD 元素中的“类型”属性只能设置为“静态”(即VoD 内容)或“动态”(用于直播流)。将其设置为“实时”会导致清单文件无效,并且诸如Bitmovin 播放器dash.js之类的播放器要么使用“静态”(因为它是默认值),要么根本无法识别它。

音频编解码器不应该有前导零,即应该使用“mp4a.40.0 2”而不是“mp4a.40.2”

已经有 DASH 实时流服务器可用,例如使用 NGINX 和nginx-rtmp-module,所以你也可以查看它们在做什么。

于 2015-07-23T13:02:15.530 回答