是否可以使用 mediaelement.js 设置缓冲区大小?
是否可以使用 mediaelement.js 设置更大的缓冲区大小?
我们的想法是尝试以稍长的启动时间为代价来换取更流畅的播放,反之亦然。
Is it possible to set a larger buffer size with mediaelement.js?
The idea would be to experiment with trading off a smoother playback at the cost of a slightly longer startup time,or visa versa.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这在当前的 MEJS 实现中是不可能的。
This isn't possible with the current implementation of MEJS.
随着时间的推移,自适应比特率 (ABR) 流媒体变得越来越普遍,我认为值得更新的是,虽然最初的问题仍然有效,但 ABR 提供了一种以牺牲视频质量为代价实现更快启动的方法,或更慢的启动速度和更好的质量。
ABR 格式流本质上意味着不只是单一比特率。
创建视频的多个比特率版本,并将每个版本分解为等长(按时间)的块 - 例如 10 秒的块。
然后,客户端播放器能够从当前网络条件下最合适的比特率流中选择下一个块 - 如果网络繁忙,它可以下降到下一个块的较低比特率,反之亦然(如果网络良好) 。
它还允许视频通过最初选择较低的比特率来更快地启动,然后在视频播放后在网络条件允许的情况下逐步提高到更高的比特率。
您可以通过右键单击并查看“书呆子统计”选项来查看 YouTube 上比特率步骤的可视化 - 请参阅下面的示例:
您还可以查看可用的比特率,并强制玩家选择一个单击右下角的“滚轮”即可选择一个。
As time has passed and Adaptive Bir Rate (ABR) streaming has become much more common, I think it is worth updating to say that while the original question is still valid, ABR provides a method to allow quicker startup at the cost of video quality, or slower startup and better quality.
ABR format streaming essentially means that there is not just a single bit rate.
Multiple bit rate versions of the video are created and each one is broken down into equal length (by time) chunks - e.g. 10 second chunks.
The client player is then able to select the next chunk from the most appropriate bit rate stream for the current network conditions - if the network gets busy it can drop down to a lower bit rate for the next chunk and visa versa if the network is good.
It also allows a video to start more quickly by selecting a low bit rate initially and then to step up to higher bit rates, network conditions allowing, once the video is playing.
You can see a visualisation of the bit rate steps on YouTube by right clicking and looking at the 'stats for nerds' option - see example below:
You can also see the available bit rates, and force the player to select a single one by clicking on the 'wheel' in the bottom right hand corner.