Reputation: 21
How to produce a video with a certain bitrate in dash.js
I have bitrate 0 - 248kb 1- 495kb 2 - 742kb 3 - 990kb 4 - 1225kb 5 - 1840kb
I want open video in 990kb.
I do
player.setAutoSwitchQualityFor('video', false);
player.setQualityFor("video", 3);
It is necessary to wait until the old bitrate and the buffer have loaded how can i change the bitrate without waiting for the buffer ?
Upvotes: 0
Views: 1001
Reputation: 1261
The documentation for dash.js covers all this stuff: http://cdn.dashjs.org/latest/jsdoc/index.html
You can set the initial bitrate using setInitialBitrateFor
: http://cdn.dashjs.org/latest/jsdoc/module-MediaPlayer.html#setInitialBitrateFor__anchor
player.setAutoSwitchQualityFor('video', false);
player.setInitialBitrateFor("video", 3);
You can change bitrate more quickly using setFastSwitchEnabled
to true: http://cdn.dashjs.org/latest/jsdoc/module-MediaPlayer.html#setFastSwitchEnabled__anchor
player.setFastSwitchEnabled(true);
Upvotes: 1