Skip to main content

B站弹幕阅读器 - 一个可以在游戏全屏时显示弹幕的Qt应用程序

Project description

B站弹幕阅读器 (bilihud)

PyPI version License: MIT

一个基于PyQt6和blivedm的B站弹幕阅读器,可以在Linux KDE环境下全屏游戏时显示弹幕。

[!NOTE] 本项目基于 Vibe Coding(氛围驱动编码)模式开发,旨在快速实现创意与功能。目前仅在有限环境下进行过测试,未做大量的严谨验证。如有 Bug,欢迎反馈!

效果预览

一般模式 (Normal)

Normal Mode

游戏穿透模式 (Pass-through)

Pass-through Mode

功能特点

  • 实时显示B站直播间弹幕
  • 半透明overlay窗口,可在游戏全屏时显示
  • 美观的UI界面,支持不同用户等级的颜色标识
  • 支持连接/断开直播间
  • 显示用户名、舰长/VIP标识
  • 支持发送弹幕
  • 支持扫码登录
  • 注意: 使用 layer-shell-qt 支持 wayland 环境

极速上手

1. 安装

系统依赖 (System Dependencies)

由于引入了 layer-shell-qt,如果您从源码运行,请先根据您的发行版安装必要的依赖:

Ubuntu / Debian:

sudo apt install liblayershellqtinterface-dev build-essential libwayland-dev qt6-base-dev libqt6waylandclient6

Fedora:

sudo dnf install gcc-c++ qt6-qtbase-devel layer-shell-qt-devel wayland-devel

Arch Linux:

sudo pacman -S qt6-base qt6-wayland layer-shell-qt

Gentoo Linux:

sudo emerge -a kde-plasma/layer-shell-qt dev-qt/qtwayland

通用步骤

# 1. 克隆仓库
git clone https://github.com/locez/bilihud.git
cd bilihud

# 2. 初始化子模块 (blivedm)
git submodule update --init --recursive

# 3. 环境配置与安装 (推荐使用 uv)
# 安装 uv
pip install uv

# 创建虚拟环境并同步依赖
uv sync

# 激活环境
source .venv/bin/activate

2. 启动

python -m src.bilihud.main

隐私说明 & 配置

自动登录 (Cookies)

为了提供完整的体验(如显示完整用户名、发送弹幕、显示舰长标识),BiliHUD 会尝试自动读取本地浏览器的 Bilibili 登录状态。

  • 读取范围: 程序仅读取 .bilibili.com 域下的 Cookies。
  • 读取目的: 获取 SESSDATAbili_jct (CSRF Token) 仅用于与 Bilibili API 进行必要的身份验证。
  • 支持浏览器: Chrome, Edge, Firefox。
  • 数据安全: 您的 Cookies 仅在本地内存中使用,绝不会被发送到任何第三方服务器。

注意: BiliHUD 默认会尝试自动读取本地浏览器的 Bilibili 登录状态,如果无法读取,您可以在托盘图标右键菜单中选择"扫码登录"来启用扫码登录功能。

打包与发行 (Packaging)

Arch Linux

本项目已发布至 AUR (bilihud-git)。推荐使用 paru 或其他 helper 快速安装:

paru -S bilihud-git

此外,packaging/arch/PKGBUILD 提供了本地打包的示例文件。

Gentoo Linux

如果您是 Gentoo 用户,相关包已包含在 我的个人 overlay 中,添加后即可安装。

本地 ebuild 示例文件位于: packaging/gentoo/

鸣谢

  • blivedm - B站直播弹幕协议库
  • PyQt6 - Python GUI框架
  • qasync - PyQt6与asyncio集成库

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bilihud-0.3.3.tar.gz (1.7 MB view details)

Uploaded Source

File details

Details for the file bilihud-0.3.3.tar.gz.

File metadata

  • Download URL: bilihud-0.3.3.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bilihud-0.3.3.tar.gz
Algorithm Hash digest
SHA256 94074abd9e9e7a008224afca732f96a98fff2d1dd36648dde9e8b8fdc1620a32
MD5 f567997bd3c4ad1a9108d07919fc683b
BLAKE2b-256 fdf3551b8185454e0c46f8ad43b8e21c5e4df0408a02f6962c9f9400e9f1792c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page