帮助。我不会显示比特率。
player.getBitrateInfoListFor(“ video”);
仅显示一种比特率-454948
GPAC生成的manifest.mpd
<Period duration="PT0H21M48.338S">
<AdaptationSet segmentAlignment="true" group="1" maxWidth="270" maxHeight="480" maxFrameRate="2070000/93437" par="270:480" lang="und">
<Representation id="1" mimeType="video/mp4" codecs="avc3.640015" width="270" height="480" frameRate="2070000/93437" sar="1:1" startWithSAP="1" bandwidth="454948">
<SegmentTemplate media="480_bbb/segment__track1_$Number$.m4s" timescale="2070000" startNumber="1" duration="8280000" initialization="480_bbb/segment__track1_init.mp4"/>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" group="1" maxWidth="202" maxHeight="360" maxFrameRate="2070000/93437" par="202:360" lang="und">
<Representation id="2" mimeType="video/mp4" codecs="avc3.64000D" width="202" height="360" frameRate="2070000/93437" sar="1:1" startWithSAP="1" bandwidth="281508">
<SegmentTemplate media="360_bbb/segment__track1_$Number$.m4s" timescale="2070000" startNumber="1" duration="8280000" initialization="360_bbb/segment__track1_init.mp4"/>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" group="1" maxWidth="134" maxHeight="240" maxFrameRate="2070000/93437" par="134:240" lang="und">
<Representation id="3" mimeType="video/mp4" codecs="avc3.64000B" width="134" height="240" frameRate="2070000/93437" sar="1:1" startWithSAP="1" bandwidth="182832">
<SegmentTemplate media="240_bbb/segment__track1_$Number$.m4s" timescale="2070000" startNumber="1" duration="8280000" initialization="240_bbb/segment__track1_init.mp4"/>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" group="1" maxWidth="80" maxHeight="144" maxFrameRate="2070000/93437" par="80:144" lang="und">
<Representation id="4" mimeType="video/mp4" codecs="avc3.640009" width="80" height="144" frameRate="2070000/93437" sar="1:1" startWithSAP="1" bandwidth="99667">
<SegmentTemplate media="144_bbb/segment__track1_$Number$.m4s" timescale="2070000" startNumber="1" duration="8280000" initialization="144_bbb/segment__track1_init.mp4"/>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang="und">
<Representation id="5" mimeType="audio/mp4" codecs="mp4a.40.2" startWithSAP="1" bandwidth="66056">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"/>
<SegmentTemplate media="audio_bbb/segment__track2_$Number$.m4s" timescale="48000" startNumber="1" duration="192000" initialization="audio_bbb/segment__track2_init.mp4"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
player.getBitrateInfoListFor(“ video”); 仅显示一种比特率-454948
答案 0 :(得分:1)
假设视频表示形式是相同内容的可互换版本,则它们都应该位于单个AdaptationSet中,以便客户端知道它可以在它们之间动态切换。
正如您目前所拥有的,客户端将在启动时选择最合适的AdaptationSet(可能是第一个,因为没有其他指标)并正确地确定只有一个比特率可用。
答案 1 :(得分:0)
您的MPD文件显示所有视频都位于单独的改编集中。
问题是用于在MP4Box中分割视频的命令中。使用MP4Box分割视频时,您必须设置“配置文件”参数。
-profile NAME指定目标DASH概要文件:onDemand,实时,主要,简单,完整和DASH-IF中的两个概要文件:dashavc264:live,dashavc264:onDemand。这将设置默认选项值,以确保符合所需的配置文件。
MP4Box命令使用onDemand配置文件对视频进行细分:
MP4Box -dash 4000 -frag 4000 -rap -profile onDemand -segment-name %s/segment_ -url-template -out manifest.mpd video144.mp4#video video240.mp4#video video360.mp4#video video480.mp4#video audio.mp4#audio