videojs-http-source-selector icon indicating copy to clipboard operation
videojs-http-source-selector copied to clipboard

Does not work with DASH

Open waakobrian opened this issue 6 years ago • 8 comments

Plugin failing to work with DASH videos. I checked out the DEMO at https://vod.dev/ but it uses m3u.....

Am i missing something??? I cant seem to make this plugin to show qualities with DASH streams.

waakobrian avatar May 26 '19 13:05 waakobrian

Hi, I am also facing similar issue when try with DASH (.mpd) videos. Does anyone has solution to switch between multi bitrate / qualities DASH stream?

bishnupradhan avatar Aug 13 '19 13:08 bishnupradhan

I think these developer hasn't paid attention to documentation nor on examples videojs has wasted my whole week.

khizarbajwa007 avatar Mar 04 '20 14:03 khizarbajwa007

It works for me. By default the bitrate options is empty because it was taken from videojs-contrib-quality-levels. I think videojs-contrib-quality-levels still not support to fetch the bitrate options from mpd file, so we should add the options manually with this tutorial. However, that is not the best practice. I want to fetch the options from the mpd file metadata, luckily DashJS provide the ability for that.

This is the example how I fetch quality data from dashjs and add the options to videojs-contrib-quality-levels. (Notes: you should install dashjs first)

const levels = player.qualityLevels()
const bitrates = player.dash.mediaPlayer.getBitrateInfoListFor('video');
const availableQualities = bitrates.map(({ height, bitrate, width }) => {
      return {
        id: height.toString(),
        height,
        width,
        bandwidth: bitrate,
        bitrate,
        isEnabled_: true,
        enabled: toggleQuality
      }
    })

 availableQualities.forEach(quality => {
      levels.addQualityLevel(quality)
    })

suryakun avatar Sep 23 '20 06:09 suryakun

It works for me. By default the bitrate options is empty because it was taken from videojs-contrib-quality-levels. I think videojs-contrib-quality-levels still not support to fetch the bitrate options from mpd file, so we should add the options manually with this tutorial. However, that is not the best practice. I want to fetch the options from the mpd file metadata, luckily DashJS provide the ability for that.

This is the example how I fetch quality data from dashjs and add the options to videojs-contrib-quality-levels. (Notes: you should install dashjs first)

const levels = player.qualityLevels()
const bitrates = player.dash.mediaPlayer.getBitrateInfoListFor('video');
const availableQualities = bitrates.map(({ height, bitrate, width }) => {
      return {
        id: height.toString(),
        height,
        width,
        bandwidth: bitrate,
        bitrate,
        isEnabled_: true,
        enabled: toggleQuality
      }
    })

 availableQualities.forEach(quality => {
      levels.addQualityLevel(quality)
    })

Thanks @suryakun . Can you please include the example of toggleQuality function as well? Thanks!

mikehatfield avatar Jan 03 '21 02:01 mikehatfield

It works for me. By default the bitrate options is empty because it was taken from videojs-contrib-quality-levels. I think videojs-contrib-quality-levels still not support to fetch the bitrate options from mpd file, so we should add the options manually with this tutorial. However, that is not the best practice. I want to fetch the options from the mpd file metadata, luckily DashJS provide the ability for that. This is the example how I fetch quality data from dashjs and add the options to videojs-contrib-quality-levels. (Notes: you should install dashjs first)

const levels = player.qualityLevels()
const bitrates = player.dash.mediaPlayer.getBitrateInfoListFor('video');
const availableQualities = bitrates.map(({ height, bitrate, width }) => {
      return {
        id: height.toString(),
        height,
        width,
        bandwidth: bitrate,
        bitrate,
        isEnabled_: true,
        enabled: toggleQuality
      }
    })

 availableQualities.forEach(quality => {
      levels.addQualityLevel(quality)
    })

Thanks @suryakun . Can you please include the example of toggleQuality function as well? Thanks!

here's here's dynamic player m3u8/mpd/mp4/youtube https://sahilkashyap64.github.io/hls/index5.html

here's video.js dash player with quality selector https://sahilkashyap64.github.io/dash-player-buydrm/index.html

sahilkashyap64 avatar Mar 07 '21 06:03 sahilkashyap64

It works for me. By default the bitrate options is empty because it was taken from videojs-contrib-quality-levels. I think videojs-contrib-quality-levels still not support to fetch the bitrate options from mpd file, so we should add the options manually with this tutorial. However, that is not the best practice. I want to fetch the options from the mpd file metadata, luckily DashJS provide the ability for that. This is the example how I fetch quality data from dashjs and add the options to videojs-contrib-quality-levels. (Notes: you should install dashjs first)

const levels = player.qualityLevels()
const bitrates = player.dash.mediaPlayer.getBitrateInfoListFor('video');
const availableQualities = bitrates.map(({ height, bitrate, width }) => {
      return {
        id: height.toString(),
        height,
        width,
        bandwidth: bitrate,
        bitrate,
        isEnabled_: true,
        enabled: toggleQuality
      }
    })

 availableQualities.forEach(quality => {
      levels.addQualityLevel(quality)
    })

Thanks @suryakun . Can you please include the example of toggleQuality function as well? Thanks!

did you get toggleQuality function? or fix the issue

alpkahveci avatar May 03 '21 10:05 alpkahveci

It works for me. By default the bitrate options is empty because it was taken from videojs-contrib-quality-levels. I think videojs-contrib-quality-levels still not support to fetch the bitrate options from mpd file, so we should add the options manually with this tutorial. However, that is not the best practice. I want to fetch the options from the mpd file metadata, luckily DashJS provide the ability for that. This is the example how I fetch quality data from dashjs and add the options to videojs-contrib-quality-levels. (Notes: you should install dashjs first)

const levels = player.qualityLevels()
const bitrates = player.dash.mediaPlayer.getBitrateInfoListFor('video');
const availableQualities = bitrates.map(({ height, bitrate, width }) => {
      return {
        id: height.toString(),
        height,
        width,
        bandwidth: bitrate,
        bitrate,
        isEnabled_: true,
        enabled: toggleQuality
      }
    })

 availableQualities.forEach(quality => {
      levels.addQualityLevel(quality)
    })

Thanks @suryakun . Can you please include the example of toggleQuality function as well? Thanks!

here's here's dynamic player m3u8/mpd/mp4/youtube https://sahilkashyap64.github.io/hls/index5.html

here's video.js dash player with quality selector https://sahilkashyap64.github.io/dash-player-buydrm/index.html

There isn't the toggleQuality function here, could you provide it to us ? Thanks.

chetrit avatar Sep 12 '21 10:09 chetrit

这个对我有用。默认情况下,比特率选项为空,因为它取自videojs-contrib-quality-levels。 我认为 videojs-contrib-quality-levels 仍然不支持从 mpd 文件中获取比特率选项,所以我们应该在本教程中手动添加选项。 但是,这不是最佳做法。我想从 mpd 文件元数据中获取选项,幸运的是DashJS提供了这个功能。 这是我如何从 dashjs 获取质量数据并将选项添加到 videojs-contrib-quality-levels 的示例。(注意:你应该先安装dashjs)

const levels = player.qualityLevels()
const bitrates = player.dash.mediaPlayer.getBitrateInfoListFor('video');
const availableQualities = bitrates.map(({ height, bitrate, width }) => {
      return {
        id: height.toString(),
        height,
        width,
        bandwidth: bitrate,
        bitrate,
        isEnabled_: true,
        enabled: toggleQuality
      }
    })

 availableQualities.forEach(quality => {
      levels.addQualityLevel(quality)
    })

谢谢@suryakun. 您能否也包括 toggleQuality 函数的示例?谢谢!

这里是动态播放器 m3u8/mpd/mp4/youtube https://sahilkashyap64.github.io/hls/index5.html 这是带有质量选择器的 video.js 破折号播放器https://sahilkashyap64.github.io/dash-player-buydrm/index.html

这里没有 toggleQuality 功能,你能提供给我们吗?谢谢。

i found this demo https://sahilkashyap64.github.io/hls/index5.html , could chose mpd qualities,but it's js not in git and need script cooperate

R8KwEwN2hvrhY avatar Jun 28 '22 14:06 R8KwEwN2hvrhY