Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

低延迟模式 #620

Merged
merged 22 commits into from
May 12, 2024
Merged

低延迟模式 #620

merged 22 commits into from
May 12, 2024

Conversation

GD-Slime
Copy link

@GD-Slime GD-Slime commented May 8, 2024

目前完成了获取原始流、减少缓冲时间和同界面刷新视频流的功能。
缺少自动追帧和同界面刷新播放器功能。

使用低延迟模式+手动向前加速,可以将画面与弹幕延迟从6-7秒降低至1.5秒内。(均为原始流,未经过多次测试)
对比非原始流和原始流效果应该更加明显。

参考来源:

  1. https://greasyfork.org/zh-CN/scripts/453967-bilibili%E7%9B%B4%E6%92%AD%E8%87%AA%E5%8A%A8%E8%BF%BD%E5%B8%A7
  2. https://www.bilibili.com/read/cv21206210/

@ywmoyue
Copy link
Owner

ywmoyue commented May 9, 2024

好的,我周末看一下,然后把追帧加上

Copy link
Owner

@ywmoyue ywmoyue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看完没看到什么问题,后面我来提交吧

src/BiliLite.UWP/Pages/LiveDetailPage.xaml.cs Outdated Show resolved Hide resolved
@ywmoyue
Copy link
Owner

ywmoyue commented May 12, 2024

自动追帧似乎还没法做,不管哪个api都获取不到真正的已缓冲进度,Duration始终为0,BufferTime、BufferingProgress和DownloadProgress都不会更新,我看FFmpegInteropX似乎也确实没做这个 ffmpeginteropx/FFmpegInteropX#411

不过我看你加上了nobuffer参数,开启低延迟模式前后获取到的BufferTimer分别为5秒和0.001秒,可能不需要再做自动追帧了

@GD-Slime
Copy link
Author

GD-Slime commented May 12, 2024

自动追帧似乎还没法做,不管哪个api都获取不到真正的已缓冲进度,Duration始终为0,BufferTime、BufferingProgress和DownloadProgress都不会更新,我看FFmpegInteropX似乎也确实没做这个 ffmpeginteropx/FFmpegInteropX#411

不过我看你加上了nobuffer参数,开启低延迟模式前后获取到的BufferTimer分别为5秒和0.001秒,可能不需要再做自动追帧了

这个参数加上之后会加快进入直播间时的视频载入进度,基本上秒开,但是相比于网页端追帧脚本仍有3-5秒的延迟差距,不过可以通过手动向前快进实现差不多的效果。 另外没有自动追帧之后,大概得用户过一段时间就手动点一下手动向前快进了。

不过自动追帧确实不能做,那就算了。

@ywmoyue ywmoyue merged commit ea176d0 into ywmoyue:dev May 12, 2024
@ywmoyue ywmoyue added this to the 4.6.31 milestone May 19, 2024
@ywmoyue ywmoyue added the 需求 label May 19, 2024
@ywmoyue ywmoyue mentioned this pull request May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants