Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

dashQualities does not enable quality selection #18

Closed
zerefel opened this issue May 26, 2017 · 6 comments
Closed

dashQualities does not enable quality selection #18

zerefel opened this issue May 26, 2017 · 6 comments

Comments

@zerefel
Copy link

zerefel commented May 26, 2017

Hey there, when I enable the dashQualities: true flag, the quality selector is not displayed in the player menu. It seems like the plugin is unable to push the available bandwidths in the array, because the Adaptation Set does not have a maxFrameRate attribute https://github.com/flowplayer/flowplayer-mpegdash/blob/master/flowplayer.dashjs.js#L78-L94
If I comment out the if check, then it pushes the values.

Here is the full mpd file that I use. It was generated by Zencoder:

<?xml version="1.0"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:mas="urn:marlin:mas:1-0:services:schemas:mpd" xmlns:mspr="urn:microsoft:playready" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011,urn:webm:dash:profile:webm-on-demand:2012" type="static" mediaPresentationDuration="PT5.035S" minBufferTime="PT1S">
  <Period>
    <AdaptationSet mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" lang="und" group="0">
      <Representation audioSamplingRate="48000" bandwidth="304899" codecs="mp4a.40.2" id="audio/audio-und">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>audio/Bk8WkCSb-_audio-audio-und.mp4</BaseURL>
        <SegmentBase indexRange="619-686">
          <Initialization range="0-618"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
    <AdaptationSet mimeType="video/webm" scanType="progressive" segmentAlignment="true" startWithSAP="1" group="0">
      <Representation xmlns="urn:mpeg:DASH:schema:MPD:2011" id="1080/0" bandwidth="2855188" codecs="vp9" width="1920" height="1080" frameRate="6171/200" scanType="progressive">
        <BaseURL>1080/Bk8WkCSb-_1080-video.webm</BaseURL>
        <SegmentBase indexRange="2339447-2339513">
          <Initialization range="0-441"/>
        </SegmentBase>
      </Representation>
      <Representation xmlns="urn:mpeg:DASH:schema:MPD:2011" id="720/0" bandwidth="1677469" codecs="vp9" width="1280" height="720" frameRate="6171/200" scanType="progressive">
        <BaseURL>720/Bk8WkCSb-_720-video.webm</BaseURL>
        <SegmentBase indexRange="1379577-1379643">
          <Initialization range="0-441"/>
        </SegmentBase>
      </Representation>
      <Representation xmlns="urn:mpeg:DASH:schema:MPD:2011" id="480/0" bandwidth="1017636" codecs="vp9" width="854" height="480" frameRate="6171/200" scanType="progressive">
        <BaseURL>480/Bk8WkCSb-_480-video.webm</BaseURL>
        <SegmentBase indexRange="833318-833384">
          <Initialization range="0-441"/>
        </SegmentBase>
      </Representation>
      <Representation xmlns="urn:mpeg:DASH:schema:MPD:2011" id="360/0" bandwidth="662513" codecs="vp9" width="640" height="360" frameRate="6171/200" scanType="progressive">
        <BaseURL>360/Bk8WkCSb-_360-video.webm</BaseURL>
        <SegmentBase indexRange="540100-540166">
          <Initialization range="0-441"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

The MPEG-DASH stream plays fine, however it is stuck at the lowest quality setting, and I don't have the option to change the level or to at least set a starting level, like it's possible with the hlsjs plugin.

Let me know if you need me to provide additional info. Thanks!

@phloxic
Copy link
Contributor

phloxic commented May 27, 2017

I'll look again into whether I can find a different criterion which identifies the adaptation set as video at that point.

On a more general level, and regarding your stream being stuck on the lowest level: I experience the same with WEBM-DASH and dash.js - please check your stream in the dash.js sample player: http://dashif.org/reference/players/javascript/v2.4.1/samples/dash-if-reference-player/

See also: https://github.com/flowplayer/flowplayer-mpegdash#stream-compatibility

@phloxic
Copy link
Contributor

phloxic commented May 27, 2017

@zerefel - quality selection should now work with your stream. Please confirm.

@zerefel
Copy link
Author

zerefel commented May 27, 2017

@blacktrash Yes, it does work now, thanks!

About feature requests, such as startLevel and smoothSwitching, can I request them and should I open new issues here on GitHub, or do you have them planned for the future?

@zerefel zerefel closed this as completed May 27, 2017
@phloxic
Copy link
Contributor

phloxic commented May 28, 2017

@zerefel - you can request them here, no prob.

Note however, that the client library works very differently compared to hls.js:

  • smoothSwitching: dash.js only knows of 'smoothSwitching', hard switching, canceling requests is not on offer, at least not directly via its API methods. The plugin already hard codes fast switch enabled - http://cdn.dashjs.org/v2.4.1/jsdoc/module-MediaPlayer.html#setFastSwitchEnabled__anchor - except for IE Edge - I don't see the need for an option. You can do api.engine.dash.setFastSwitchEnabled(false) if you want/have to.
  • something like startLevel feels against the 'spirit' of the client library as well; I'm trying to implement it as we speak, but not sure yet whether this goes too far into hacky territory.

phloxic added a commit that referenced this issue May 28, 2017
Similar to hls.js' startLevel, but with default -1 (ABR).

refs:
#18 (comment)
@phloxic
Copy link
Contributor

phloxic commented May 28, 2017

@zerefel - you can now set initialVideoQuality in the dash configuration (default -1 for automatic/adaptive); it accepts an integer as value which references the 'startLevel'.

(documentation to follow)

@zerefel
Copy link
Author

zerefel commented May 30, 2017

@blacktrash - setting initialVideoQuality in the dash configuration works as expected, I can confirm that. Thanks for your speedy response!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants