Changing Buffer Size of QMediaPlayer

怎甘沉沦 提交于 2021-01-28 04:02:20

问题


I have implemented a Videoplayer using Qt5.1 QMediaPlayer, however I would like to know if there is a way to control the buffer sizes for streaming media from a URL so as to cater for different connection speeds. In addition, is there a way to determine how much of the content being streamed has been completely downloaded.


回答1:


The buffer size is based on the keyframes contained in the video track, the range between 2 keyframes defines the size of each buffered piece and as far as I know this value cannot be modifed in any way from the client-side, the source video should be re-encoded with different parameters in order to modify the size of the buffering pieces. By any chance, are you using x264? if so, you should read about keyint and min-keyint from MeWiki, lower keyint = shorter buffered pieces.



来源:https://stackoverflow.com/questions/17920248/changing-buffer-size-of-qmediaplayer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!