Justin Rec
Justin Rec

Reputation: 21

MPD MPEG-DASH - Shows only one bitrate

Help. I wont show bitrate.
player.getBitrateInfoListFor("video"); Shows only one bitrate - 454948

manifest.mpd generated by GPAC

 <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"); Shows only one bitrate - 454948

Upvotes: 0

Views: 918

Answers (2)

Suresh Murali
Suresh Murali

Reputation: 801

Your MPD file shows that all videos are in separate adaptation set.

Problem is in the command you use to segment videos in MP4Box. You have to set "profile" parameter while segmenting videos using MP4Box.

-profile NAME specifies the target DASH profile: onDemand, live, main, simple, full, and two profiles from the DASH-IF: dashavc264:live, dashavc264:onDemand. This will set default option values to ensure conformance to the desired profile.

MP4Box command to segment videos with onDemand profile:

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

Source: GPAC's DASH support in MP4Box

Upvotes: 0

Anonymous Coward
Anonymous Coward

Reputation: 1265

Assuming the video Representations are interchangeable versions of the same content, they should all be within a single AdaptationSet so the client knows it may switch between them dynamically.

As you currently have it, the client will select the most appropriate AdaptationSet at start up (probably the first since there are no other indicators) and correctly determines there is only one bitrate available.

Upvotes: 1

Related Questions