首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Dash.js播放器中播放具有多个句点的MPD文件

无法在Dash.js播放器中播放具有多个句点的MPD文件
EN

Stack Overflow用户
提问于 2019-03-05 08:28:22
回答 1查看 740关注 0票数 1

我是MPEG-破折号主题的新手,我正在处理一个包含两个句点的MPD文件,每个时间段都有自己的初始视频和片段信息。每个时期也有不同的持续时间。当我尝试在Dash.js Player (http://reference.dashif.org/dash.js/1.3.0/samples/dash-if-reference-player/index.html)上播放它时,在第一阶段结束时,视频会像图中一样停止,并且不会成功地传递到第二阶段。如何安排MPD文件中的每个时间段?你能提出一个解决办法吗?在此之前,非常感谢您。

MPD文件结构:

代码语言:javascript
复制
<?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>
EN

回答 1

Stack Overflow用户

发布于 2021-12-09 09:47:22

您应该在句号中给出一个参数"start“,如下所示:

代码语言:javascript
复制
 <Period duration="PT0H0M9.667S" id="0" start="PT0S">

同样,对于第二个阶段,您应该:

代码语言:javascript
复制
<Period id="1" duration="PT0H0M12.417S" start="PT0H0M9.667S">
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54998386

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档