You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
` Gtk-Message: 22:51:12.539: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
[5856, Main Thread] WARNING: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187
(firefox:5856): Gtk-WARNING **: 22:51:12.924: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 22:51:12.924: Failed to load module "canberra-gtk-module"
[5856, Main Thread] WARNING: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187
(firefox:5856): Gtk-WARNING **: 22:51:12.956: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 22:51:12.956: Failed to load module "canberra-gtk-module"
[2024-12-10 22:51:14,528] [INFO] [configure_logging] log file: /home/lulu/Projects/bilive/logs/blrecLog/blrec_2024-12-10-225114-527476.log `
./logs/blrecLog/blrec-xx-xx-xx.log
[2024-12-10 22:51:14,528] [INFO] [configure_logging] log file: /home/lulu/Projects/bilive/logs/blrecLog/blrec_2024-12-10-225114-527476.log [2024-12-10 22:51:14,533] [DEBUG] [exception_handler] Enabled Exception Handler [2024-12-10 22:51:14,535] [DEBUG] [space_monitor] Enabled space monitor [2024-12-10 22:51:14,536] [DEBUG] [space_reclaimer] Enabled space reclaimer [2024-12-10 22:51:15,763] [DEBUG] [danmaku_client] [84074] Danmu info updated [2024-12-10 22:51:15,765] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:15,885] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:15,886] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:16,022] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:16,125] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:16,125] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:16,360] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:16,468] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:16,469] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:16,909] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:17,026] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:17,026] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:17,869] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:17,970] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:17,972] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:19,606] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:19,722] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:19,724] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:22,959] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:23,064] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:23,064] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:29,508] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:29,629] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:29,629] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:42,465] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:42,595] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:42,596] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:52:08,255] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:52:08,374] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:52:08,375] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:52:59,660] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:52:59,759] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:52:59,760] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:53:59,836] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:53:59,945] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:53:59,946] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:55:00,037] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:55:00,152] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:55:00,153] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:56:00,226] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:56:00,333] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:56:00,334] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:57:00,414] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:57:00,533] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:57:00,533] [DEBUG] [danmaku_client] [84074] Sent user authentication
看./logs/blrecLog/blrec-xx-xx-xx.log 一直验证 cookies 没有建立链接,还挺奇怪,不知道安装完库重启有没有效果。如果没有的话,其实我还是先推荐试一下没有 cookies 版本的 250 超清视频是否能够正常录制。因为 b 站官方容易风控有 cookies 的直播流获取,可能会存在完全无法录制的情况。不过要验证是否是本地环境冲突还是网络问题的最好办法还是先不用 cookies 重启随便超清录制一个看看能不能正常获取到直播流。目前我同时录制了十几个房间都没有遇到问题。
看./logs/blrecLog/blrec-xx-xx-xx.log 一直验证 cookies 没有建立链接,还挺奇怪,不知道安装完库重启有没有效果。如果没有的话,其实我还是先推荐试一下没有 cookies 版本的 250 超清视频是否能够正常录制。因为 b 站官方容易风控有 cookies 的直播流获取,可能会存在完全无法录制的情况。不过要验证是否是本地环境冲突还是网络问题的最好办法还是先不用 cookies 重启随便超清录制一个看看能不能正常获取到直播流。目前我同时录制了十几个房间都没有遇到问题。
scanlog 2024-12-11 10:15:05 There is no file recorded. Check again in 120 seconds. 2024-12-11 10:17:05 There is no file recorded. Check again in 120 seconds. 2024-12-11 10:19:05 There is no file recorded. Check again in 120 seconds. 2024-12-11 10:21:05 There is no file recorded. Check again in 120 seconds.
uploadLog 2024-12-11 10:15:09 Empty queue, wait 2 minutes and check again... wait for 20 seconds 2024-12-11 10:17:29 Empty queue, wait 2 minutes and check again... wait for 20 seconds
Activity
timerring commentedon Dec 10, 2024
好的了解,我建议直播流填写 250 即超清,因为没有 cookies 的话相当于未登录状态下录制,b 站设置未登录状态最高只有超清。有些直播间只能识别抓不到超清的流的话只能用默认的原画流。如果想录制超清以上画质的话,需要在 blrec 里再添加 cookies,我项目里的 cookies 只是用来自动验证状态并投稿,blrec 的 cookies 可以打开 blrec 面板(http://localhost:2233/settings) 在 cookies 一栏填写。

或者在 settings.toml 中填写
具体获取方法可以参考 https://zmtblog.xdkd.ltd/2021/10/06/Get_bilibili_cookie/
Note
不填写 cookies 登录是一定抓取不到超清以上的流的。
timerring commentedon Dec 10, 2024
关于 2.1 这个重启需要等约半分钟,因为它添加房间并且验证启动弹幕服务器需要一点时间,可以尝试关闭该房间录制,再打开。
timerring commentedon Dec 10, 2024
关于 3,这个可以参考 blrec 的文档,我忘了有没有具体实现了😂,一般来说超清获取到直播流的可能性更大,其他画质或者原画都存在抓取不到流的可能。
timerring commentedon Dec 10, 2024
关于 1,读取登录状态没有log。这个 log 具体指什么 log 呢?blrec.log 录制的 log 吗,还是处理或者投稿的 log?
项目我在本机和我另一台云服务上部署验证过,您应该是第一位在完全独立的环境中运行本项目朋友了,您的反馈对我非常重要,如果有任何疑问请一定及时提出。非常感谢!
lululutx commentedon Dec 10, 2024
没问题,我只是在尝试,我必须验证不是我自己的愚蠢而导致的问题,等我排查一下,才会有更加建设性的建议
timerring commentedon Dec 10, 2024
没事没事哈哈,有问题直接提就好,因为我也能根据这些问题修改 README 帮助更多使用的人,我会把大家 issue 的问题收集,为后面上线 gitpage 文档做准备。
lululutx commentedon Dec 10, 2024
让我们一个一个来。我原先以为抓取高清的cookies是用的 bilirs的。
现在有了新问题,无论我是在配置项setting.toml设置cookies,抑或是在webui输入cookies。再重启webui(./record.sh),项目都无法正常启动. 可能是b站的cookies格式变更过?
附启动失败log两则(两篇log都是完整的)
./logs/blrec.log
` Gtk-Message: 22:51:12.539: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
[5856, Main Thread] WARNING: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187
(firefox:5856): Gtk-WARNING **: 22:51:12.924: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 22:51:12.924: Failed to load module "canberra-gtk-module"
[5856, Main Thread] WARNING: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187
(firefox:5856): Gtk-WARNING **: 22:51:12.956: GTK+ module /snap/firefox/4848/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 22:51:12.956: Failed to load module "canberra-gtk-module"
[2024-12-10 22:51:14,528] [INFO] [configure_logging] log file: /home/lulu/Projects/bilive/logs/blrecLog/blrec_2024-12-10-225114-527476.log `
./logs/blrecLog/blrec-xx-xx-xx.log
[2024-12-10 22:51:14,528] [INFO] [configure_logging] log file: /home/lulu/Projects/bilive/logs/blrecLog/blrec_2024-12-10-225114-527476.log [2024-12-10 22:51:14,533] [DEBUG] [exception_handler] Enabled Exception Handler [2024-12-10 22:51:14,535] [DEBUG] [space_monitor] Enabled space monitor [2024-12-10 22:51:14,536] [DEBUG] [space_reclaimer] Enabled space reclaimer [2024-12-10 22:51:15,763] [DEBUG] [danmaku_client] [84074] Danmu info updated [2024-12-10 22:51:15,765] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:15,885] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:15,886] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:16,022] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:16,125] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:16,125] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:16,360] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:16,468] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:16,469] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:16,909] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:17,026] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:17,026] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:17,869] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:17,970] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:17,972] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:19,606] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:19,722] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:19,724] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:22,959] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:23,064] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:23,064] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:29,508] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:29,629] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:29,629] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:51:42,465] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:51:42,595] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:51:42,596] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:52:08,255] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:52:08,374] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:52:08,375] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:52:59,660] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:52:59,759] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:52:59,760] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:53:59,836] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:53:59,945] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:53:59,946] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:55:00,037] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:55:00,152] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:55:00,153] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:56:00,226] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:56:00,333] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:56:00,334] [DEBUG] [danmaku_client] [84074] Sent user authentication [2024-12-10 22:57:00,414] [DEBUG] [danmaku_client] [84074] Connecting to server... [2024-12-10 22:57:00,533] [DEBUG] [danmaku_client] [84074] Established WebSocket connection [2024-12-10 22:57:00,533] [DEBUG] [danmaku_client] [84074] Sent user authenticationtimerring commentedon Dec 10, 2024
看 blrec.log 好像是缺少一个对应的库,可以参考 https://www.linuxquestions.org/questions/linux-software-2/gtk-message-failed-to-load-module-canberra-gtk-module-936168/page2.html 尝试装一下该库
sudo apt-get install libcanberra-gtk-module。timerring commentedon Dec 10, 2024
看./logs/blrecLog/blrec-xx-xx-xx.log 一直验证 cookies 没有建立链接,还挺奇怪,不知道安装完库重启有没有效果。如果没有的话,其实我还是先推荐试一下没有 cookies 版本的 250 超清视频是否能够正常录制。因为 b 站官方容易风控有 cookies 的直播流获取,可能会存在完全无法录制的情况。不过要验证是否是本地环境冲突还是网络问题的最好办法还是先不用 cookies 重启随便超清录制一个看看能不能正常获取到直播流。目前我同时录制了十几个房间都没有遇到问题。
这两个其实是一回事,settings 配置无法热修改,而 webui 配置可以热修改,不过也只针对修改之后添加的房间,统一起见还是 webui 修改以后,然后重启录制脚本应该是绝对没有问题的。b 站的 cookies 格式应该没有变化,都是
buvid……开头的那个字符串,我半个月之前尝试 cookies 还能录制,不过也只有一些房间成功过。如果真的不放心的话,可以在 blrec 的 issue 里提一下。lululutx commentedon Dec 10, 2024
ok 我先尝试一下无cookies超清,加上压制弹幕加上传,大流程能不能走通.明早验证,早点休息
timerring commentedon Dec 10, 2024
好的,如果想尝试 pipeline 模式的话还是需要注意 GPU 的显存,一般渲染任务在 200MB 左右,whisper 的 asr 模型大概 small 显存在 2600 MB 左右,tiny 模型也在 1400 MB 左右,所以需要保证显卡显存至少大于渲染和 asr 所需的显存。当然如果不用 pipeline 模式的话,用其他模式都会 GPU_EXIST 如果为 true 都会执行 asr 语音识别的,也需要注意显存,GPU_EXIST 为 false 则完全不会使用 GPU,只会用 CPU 渲染弹幕,我设置的参数能保证一个非常快的压制速率,不过文件可能会稍大20%。
此外,record 和 scan upload 是三个相对独立的过程,可以分别单独测试。时刻注意观察日志以及
ps -ef | grep xxx获取对应线程的执行情况。明天如果遇到问题再实时反馈,非常感谢。
lululutx commentedon Dec 11, 2024
scan和upload执行后没有反应,视频附带的xml和josnl为空(没登录?)
Video文件夹是有录制成功的视频的
控制台:
lulu@lulu-Ubuntu:~/Projects/bilive$ ./scan.sh success lulu@lulu-Ubuntu:~/Projects/bilive$ ./upload.sh kill: 用法: kill [-s 信号说明符 | -n 信号编号 | -信号说明符] pid | 任务说明符 ... 或 kill -l [信号说明符] success lulu@lulu-Ubuntu:~/Projects/bilive$ ps -ef | grep $(pgrep -f src.burn.scan) lulu 3914 811 0 10:15 pts/0 00:00:00 python -m src.burn.scan lulu 4016 2070 0 10:16 pts/0 00:00:00 grep --color=auto 3914 lulu@lulu-Ubuntu:~/Projects/bilive$ ps -ef | grep $(pgrep -f src.upload.upload) lulu 3920 811 0 10:15 pts/0 00:00:00 python -m src.upload.uploadscanlog
2024-12-11 10:15:05 There is no file recorded. Check again in 120 seconds. 2024-12-11 10:17:05 There is no file recorded. Check again in 120 seconds. 2024-12-11 10:19:05 There is no file recorded. Check again in 120 seconds. 2024-12-11 10:21:05 There is no file recorded. Check again in 120 seconds.uploadLog
2024-12-11 10:15:09 Empty queue, wait 2 minutes and check again... wait for 20 seconds 2024-12-11 10:17:29 Empty queue, wait 2 minutes and check again... wait for 20 seconds再附Video路径图

timerring commentedon Dec 11, 2024
在面板中选择视频录制完成后转 mp4,我是通过 mp4 进行处理的。

默认是开启的,您可能关上了,录制中的视频是 flv 状态。
timerring commentedon Dec 11, 2024
这个倒跟登录没有关系,只跟房间是否有人发送弹幕有关,xml 是弹幕文件,包含上舰信息,礼物信息和 SC 信息,jsonl 是 raw 状态的信息文件,包含各种信息,例如几人观看过,房间被谁分享了等等信息,我写的逻辑只对 xml 做处理。
lululutx commentedon Dec 11, 2024
嗯~新虚拟机忘装ffmpeg了。
lululutx commentedon Dec 11, 2024
但是这个主播观众人数特别多,xml不应该是空
timerring commentedon Dec 11, 2024
我知道问题在哪了,请填写超过 7 位数的 roomid,
84074是 b 站方便推广的一个短链接,用户跳转是直接映射到真实roomid 去的,真正的 roomid 是申请开播权限时分配的,应该是 7~9 位数字,想要找到真正的房间号可以在移动端分享里面图片分享方式分享直播,然后 b 站移动端会自动生成一个带有真正 roomid 的图片。比如说我查到这个房间的真正 roomid 是14709735。lululutx commentedon Dec 11, 2024
好! 我再晚些时候再尝试一下
timerring commentedon Dec 12, 2024
我部署上线了相关文档,如果有任何问题,欢迎继续提,我补充在文档里。
lululutx commentedon Dec 12, 2024
好的,我正在弹幕合并 😊
timerring commentedon Dec 12, 2024
好的,为保证每个 issue 尽可能简洁并符合标题,方便后来人查看,我先关闭本 issue 了。
如果遇到其他问题欢迎提新 issue。