无法在dash.js播放器中使用多个时期播放MPD文件



我是MPEG-DASH主题中的新手,并在具有两个时期的MPD文件上工作,并且每个时期都有其自己的初始视频和细分信息。而且每个时期的持续时间都不同。当我尝试在dash.js player(http://reference.dashif.org/dash.js/1.3.0/samples/dash-if-if-reference-player/index.html)上玩它时时期,视频停止如图所示,并且不会成功地传递到第二阶段。我应该如何在MPD文件中安排每个期间?您能建议解决方案吗?非常感谢。

MPD文件结构:

<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 0.7.0-rev0-gbd5c9af-master  at 2019-03-04T17:10:17.070Z-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H0M22.084S" maxSegmentDuration="PT0H0M4.000S" profiles="urn:mpeg:dash:profile:full:2011">
 <ProgramInformation moreInformationURL="http://gpac.io">
  <Title>output_general_dash.mpd generated by GPAC</Title>
 </ProgramInformation>
 <Period id="0" duration="PT0H0M9.667S">
  <AdaptationSet segmentAlignment="true" subsegmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="24000/1004" par="16:9" lang="und">
   <Representation id="1" mimeType="video/mp4" codecs="avc3.640028" width="1280" height="720" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="3734878">
    <SegmentList timescale="24000" duration="96000" presentationTimeOffset="0">
     <Initialization sourceURL="segment_3730_init.mp4"/>
     <SegmentURL media="segment_3730_1.m4s"/>
     <SegmentURL media="segment_3730_2.m4s"/>
     <SegmentURL media="segment_3730_3.m4s"/>
    </SegmentList>
   </Representation>
  </AdaptationSet>
 </Period>
 <Period id="1" duration="PT0H0M12.417S">
  <AdaptationSet segmentAlignment="true" subsegmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="24000/1003" par="16:9" lang="und">
   <Representation id="1" mimeType="video/mp4" codecs="avc3.640028" width="1280" height="720" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="1531757">
    <SegmentList timescale="24000" duration="96000" presentationTimeOffset="737280">
     <Initialization sourceURL="segment_1530_init.mp4"/>
     <SegmentURL media="segment_1530_1.m4s"/>
     <SegmentURL media="segment_1530_2.m4s"/>
     <SegmentURL media="segment_1530_3.m4s"/>
     <SegmentURL media="segment_1530_4.m4s"/>
    </SegmentList>
   </Representation>
  </AdaptationSet>
</MPD>

您应该给出"开始"在时期标签中也如下:

 <Period duration="PT0H0M9.667S" id="0" start="PT0S">

在第二阶段类似地,您应该:

<Period id="1" duration="PT0H0M12.417S" start="PT0H0M9.667S">

最新更新