我用Bento4创建了这个MPD文件。
<?xml version="1.0" ?> <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT4.23S" mediaPresentationDuration="PT2M22.225S" type="static"> <!-- Created with Bento4 mp4-dash.py, VERSION=2.0.0-639 --> <Period>
<!-- Video -->
<AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" maxWidth="1920" maxHeight="1080">
<SegmentTemplate timescale="1000" duration="4233" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1"/>
<Representation id="video/avc1" codecs="avc1.640028" width="1920" height="1080" scanType="progressive" frameRate="24000/1001" bandwidth="3317595"/>
</AdaptationSet>
<!-- Audio -->
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="en">
<SegmentTemplate timescale="1000" duration="4233" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1"/>
<Representation id="audio/en/mp4a.40.2" codecs="mp4a.40.2" bandwidth="130559" audioSamplingRate="44100">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/>
</Representation>
</AdaptationSet> </Period> </MPD>
我上传到我的服务器,不幸的是,我收到了视频不可用的消息。
我正在使用此播放器https://reference.dashif.org/dash.js/latest/samples/dash-if-reference-player/index.html.
期待您的回复。
谢谢。
为什么视频AdaptationSet的mimeType设置为"application/dash+xml";?这是DASH清单的mimetype。正确的mimetype应该是";视频/mp4";。通常AdaptationSet携带一个contentType=";视频";属性而不是mimeType,并且音频适配Set携带contentType=";音频";。查看dash.js引用播放器中的一些示例清单,查看格式良好的清单示例。