我一直在尝试学习 MP4Box 和 Dash,我正在取得一些进展,但我似乎无法让我的视频正常工作。我按照说明将播放器添加到一个简单的 html 页面,并用它测试了 Dash 测试页面中已知的 MPD,一切都与播放器完美配合,因此我缩小了 MPD 文件的范围。
我通过 Dash 验证器运行了我的 MPD 文件,但它失败了。我收到以下错误:
Start XLink resolving
=====================
XLink resolving successful
Start MPD validation
====================
Line:Col[5:20]:cvc-elt.1: Cannot find the declaration of element 'MPD'.
MPD validation not successful - DASH is not valid!
BUILD FAILED
/var/www/html/conformance/current/webfe/mpdvalidator/build.xml:65: Java
returned: 4
Total time: 53 seconds
我正在使用 MP4Box 对 mp4 进行分段,因此它可能是一个不正确的命令。我正在使用,这是我正在使用的命令:
MP4Box -dash 4000 -frag 1000 -rap -segment-name segment_ rogue_one.mp4
当我查看 MPD 文件时,我不确定我在寻找什么,但我确实通过它查看是否可以找到任何明显的错误,但它看起来不错。这是我的 MPD 文件:
<MPD type="static" xmlns="urn:mpeg:DASH:schema:MPD:2011" profiles="urn:mpeg:dash:profile:full:2011" minBufferTime="PT1.5S" mediaPresentationDuration="PT0H2M28.34S">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>Media Presentation Description for file rogue_one.mp4 generated with GPAC </Title>
</ProgramInformation>
<Period start="PT0S" duration="PT0H2M28.34S">
<AdaptationSet>
<ContentComponent id="1" contentType="video"/>
<ContentComponent id="2" contentType="audio" lang="eng"/>
<Representation id="1" mimeType="video/mp4" codecs="avc1.640029,mp4a.40.02" width="1920" height="816" sampleRate="44100" numChannels="2" lang="eng" startWithSAP="1" bandwidth="7969270">
<SegmentList timescale="1000" duration="10050">
<Initialization sourceURL="rogue_one_dash.mp4"/>
<SegmentURL media="segment_1.m4s"/>
...
<SegmentURL media="segment_43.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>