video - Shaka Player 在启动时选择低质量变体
问题描述
启用 ABR 后,播放会从所选曲目开始,但会快速跳转到 shaka 播放器中的最低比特率曲目:
预期的
当带宽可用时,应选择轨道(轨道 [id=14])并在同一轨道上继续。
我试过的
最初我厌倦了在 manifestparsed 事件上将 abr.defaultBandwidthEstimate 设置为 1927692(轨道 [id=14]),但它选择了下一个轨道(轨道 [id=13])。所以我做了以下找到defaultBandwidthEstimate。
defaultBandwidthEstimate = selectedTrack.bandwidth / abr.bandwidthUpgradeTarget
默认带宽估计 = 1927692 / 0.85
然后,玩家选择了所需的曲目(曲目 [id=14])。
问题
播放从所需的轨道(轨道 [id=14])开始,但在几毫秒后立即回退到最低带宽轨道。我还观察到播放器当前估计的带宽非常低。
切换历史:
[{"timestamp":1595138570.405,"id":14,"type":"variant","fromAdaptation":true,"bandwidth":1927692},
{"timestamp":1595138570.405,"id":2,"type":"text","fromAdaptation":true,"bandwidth":null},
{"timestamp":1595138578.943,"id":10,"type":"variant","fromAdaptation":true,"bandwidth":295971}]
所有曲目
[{id: 16, active: false, type: "variant", bandwidth: 5127146, language: "fr", …},
{id: 15, active: false, type: "variant", bandwidth: 2559584, language: "fr", …},
{id: 14, active: false, type: "variant", bandwidth: 1927692, language: "fr", …},
{id: 13, active: false, type: "variant", bandwidth: 1327795, language: "fr", …},
{id: 12, active: false, type: "variant", bandwidth: 695902, language: "fr", …},
{id: 11, active: false, type: "variant", bandwidth: 527931, language: "fr", …},
{id: 10, active: true, type: "variant", bandwidth: 295971, language: "fr", …}]
解决方案
ShakaPlayer 为我们提供了配置来限制它可以用于给定清单/Internet 的最小值。您可以尝试以下方法来限制 ABR 切换比特率高于给定的 minBitratePixelValue。
shakaPlayer.configure({
restrictions: {
minPixels: minBitratePixelValue,
minHeight: minBitratePixelValue
}
推荐阅读
- sql - 如何获得超出限制且不为空的元素的平均数量
- bash - 使用 COPY 从标准输入填充 Postgres 表中的特定列时出现语法错误
- google-cloud-platform - Google Cloud Platform 的 Cloud-init 脚本
- angular - Angular 通用仅适用于特定模块
- ffmpeg - 将淡化文本与重新编码视频相结合
- python - 从 xero-python-oauth2-starter-master 安装依赖项时“git@github.com: Permission denied (publickey)”
- python - 部署云功能时的问题
- css - Safari 的扭曲 css 顶部
- three.js - Threejs 使用视口和剪刀“查看裁剪”
- telegram - 如何使用 Telegram Bot 在消息中发送 url 链接或显示按钮以打开 URL 链接