dash mpd之$Number$

Number的计算方法:

Number = curTime(秒级)/片段时长 + startNumer


startNumber可以是正数,也可以是负数,对于直播来说,startNumber从0开始即可,对于时移来说,就是偏移的秒数除以片段时长得到


例子:

<?xml version="1.0"?>
<MPD
    type="dynamic"
    xmlns="urn:mpeg:dash:schema:mpd:2011"
    availabilityStartTime="1970-01-01T00:00:00Z"
    minimumUpdatePeriod="PT5S"
    minBufferTime="PT5S"
    timeShiftBufferDepth="PT5M"
    suggestedPresentationDelay="PT10S"
    profiles="urn:mpeg:dash:profile:isoff-live:2011"
    xmlns:xsi="http://www.w3.org/2011/XMLSchema-instance"
    xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd">
  <Period start="PT0S" id="dash">
    <AdaptationSet
        id="1"
        segmentAlignment="true"
        maxWidth="720"
        maxHeight="576"
        maxFrameRate="25">
      <SegmentTemplate timescale="1000" duration="5000" startNumber="-298292" initialization="haizeiwang-init.m4v" media="haizeiwang-$Number$.m4v"/>
      <Representation id="haizeiwang_H264" mimeType="video/mp4" codecs="avc1.4d500b" width="720" height="576" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="50877"/>
    </AdaptationSet>
  </Period>
</MPD>


或者


<?xml version="1.0"?>
<MPD
    type="dynamic"
    xmlns="urn:mpeg:dash:schema:mpd:2011"
    availabilityStartTime="1970-01-01T00:00:00Z"
    minimumUpdatePeriod="PT5S"
    minBufferTime="PT5S"
    timeShiftBufferDepth="PT5M"
    suggestedPresentationDelay="PT10S"
    profiles="urn:mpeg:dash:profile:isoff-live:2011"
    xmlns:xsi="http://www.w3.org/2011/XMLSchema-instance"
    xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd">
  <Period start="PT0S" id="dash">
    <AdaptationSet
        id="1"
        segmentAlignment="true"
        maxWidth="720"
        maxHeight="576"
        maxFrameRate="25">
      <Representation id="haizeiwang_H264" mimeType="video/mp4" codecs="avc1.4d500b" width="720" height="576" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="50877">
      <SegmentTemplate timescale="1000" duration="5000" startNumber="-298292" initialization="haizeiwang-init.m4v" media="haizeiwang-$Number$.m4v"/>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值