如何实现mpeg-dash直播播放列表?

时间:2015-07-09 15:44:08

标签: mpeg-dash

我正在为直播流实施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 *文件相同)

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

1 个答案:

答案 0 :(得分:3)

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

根据MPEG-DASH标准,MPD元素中的属性“类型”可以仅被设置为“静态”(即,VoD内容)或“动态”(对于直播流)。 将其设置为“实时”会导致无效的清单文件,而Bitmovin playerdash.js等播放器将使用“静态”(因为它是默认值),或者他们将无法识别它所有

音频编解码器不应该有前导零,即代替“mp4a.40。 0 2”,你应该使用“mp4a.40.2”。

已有DASH直播服务器可用,例如将NGINX与nginx-rtmp-module一起使用,这样你就可以看看他们在做什么了。

相关问题