我使用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。
希望得到你的回应。
谢谢。
发布于 2022-01-28 21:40:59
为什么视频AdaptationSet的AdaptationSet设置为"application/dash+xml"?这是破折号舱单的米粒类型。正确的mimetype应该是“视频/MP4”。通常,AdaptationSet带有一个contentType=“视频”属性,而不是mimeType,而音频适配集则携带contentType=“音频”。查看dash.js参考播放器中的一些示例清单,以查看格式良好的清单示例。
https://stackoverflow.com/questions/70899231
复制相似问题