langhuihui / jessibuca

Jessibuca是一款开源的纯H5直播流播放器
https://jessibuca.com
GNU General Public License v3.0
2.04k stars 395 forks source link

播放H265视频流时延迟太高 #364

Closed quxiaohui-debug closed 3 months ago

quxiaohui-debug commented 4 months ago

我本地推了一路H265编码格式的视频流到ZLMediaKit服务,然后通过本项目demo播放器拉流播放,缓冲时间默认设置为0.2秒,但实际观察时,发现视频延迟远远不止0.2秒;如果我把缓冲时间调整为0秒,则不会有视频延迟,但播放时存在卡顿现象。对比验证了H264编码格式的视频流,则不会存在该问题。

quxiaohui-debug commented 4 months ago

使用的wasm解码器软解

quxiaohui-debug commented 4 months ago

控制台有两个警告信息 ,1:Jessibuca: [worker]: [hevc @ 0x61f730] Warning: not compiled with thread support, using thread emulation

quxiaohui-debug commented 4 months ago

2:debug.js:11 Jessibuca: [AudioContext] bufferList is large: 21

quxiaohui-debug commented 4 months ago

感觉是因为ZLMediaKit的GOP机制,导致刚开始播放时,播放器解码不过来了。

bosscheng commented 4 months ago

看下多少分辨率的流,如果是达到1080p的开源版是支持不了的,会存在解码堆积延迟的问题的。

quxiaohui-debug commented 4 months ago

不是1080P的,而且只是起播时会卡顿 ,但是播放一段时间之后稳定了

bosscheng commented 4 months ago

看下videoBuffer 设置了多大