Git Product home page Git Product logo

24h-raspberry-live-on-bilibili's Introduction

miao.svg

24h-raspberry-live-on-bilibili's People

Contributors

allcontributors[bot] avatar chenxuuu avatar lvmoo avatar shilela avatar zvrh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

24h-raspberry-live-on-bilibili's Issues

在没有接入dht11测温模块时,管理者发送温度会导致卡死

elif (s.find('温度') > -1):
        send_dm_long("CPU "+os.popen('vcgencmd measure_temp').readline())   #读取命令行得到的温度
        try:
            temp = dht11.get_dht11()
            send_dm_long("温度:"+str(temp[0])+"℃,湿度:"+str(temp[1])+"%")
        except Exception as e:  #防炸
            print('shit')
            print(e)
            send_dm_long("温湿度获取失败")

我把dht11的部分去掉之后不卡死了(^・ω・^ )

似乎会错误地连续跳过点播列表里的歌

描述bug
当有人点歌后,系统会下载并加入播放队列,此时查看点播列表,会正常显示这首歌;
当前正在播放的歌播放结束后,直播画面会连续断线转圈几次,此时后台bilibiliClient.py会连续显示两三“直播开始。。。”(我感觉点播队列里的歌曲在这里被跳过了)
然后系统会继续从默认歌曲里随机选一首播放,而不是播放刚刚点播的歌曲,此时查看点播列表,显示无点播歌曲

而且点播的歌曲会留在default_mp3中,不会在播放完毕后删除,是本来就设计成这样的吗

复现步骤
按如下步骤可以复现bug:

  1. 开始直播,启动点歌台
  2. 发送点歌的弹幕
  3. 等待当前歌曲播放完毕
  4. 出现上述bug,随机播放而不是播放刚刚点播的歌曲

本应出现的正常状态
正常情况应该是播放刚刚点播的歌曲

截屏或log记录
bilibiliClient.py的记录:(小菠萝2367是机器人)

程序已启动,连接房间id:864890
[log]发送弹幕:弹幕监控已启动,可以点歌了
正在进入房间。。。。。
链接弹幕中。。。。。
进入房间成功。。。。。
链接弹幕成功。。。。。
菠萝ctcuser1 说: id29497214
20
[log]发送弹幕:已收到菠萝ctcuser1的指令
小菠萝2367 说: 已收到菠萝ctcuser1的指令
[log]发送弹幕:正在下载id29497214
小菠萝2367 说: 正在下载id29497214
[log]getting url:id29497214
get info: 最美** http://p2.music.126.net/0pW2r6U0lvFGaRqO73gd7g==/2532175279660856.jpg
[log]发送弹幕:id29497214下载完成,加入队列
小菠萝2367 说: id29497214下载完成,加入队列
[log]已添加排队项目:id29497214
菠萝ctcuser1 说: 点播列表
20
[log]发送弹幕:已收到菠萝ctcuser1的指令,正在查
[log]发送弹幕:询
[log]发送弹幕:id:29497214,歌名:最美**,
[log]发送弹幕:点播人:菠萝ctcuser1
[log]发送弹幕:点播列表展示完毕,一共1个
小菠萝2367 说: 已收到菠萝ctcuser1的指令,正在查
小菠萝2367 说: 询
小菠萝2367 说: id:29497214,歌名:最美**,
小菠萝2367 说: 点播人:菠萝ctcuser1
小菠萝2367 说: 点播列表展示完毕,一共1个
直播开始。。。
直播开始。。。
菠萝ctcuser1 说: 点播列表
20
[log]发送弹幕:已收到菠萝ctcuser1的指令,正在查
[log]发送弹幕:询
[log]发送弹幕:点播列表展示完毕,一共0个
小菠萝2367 说: 已收到菠萝ctcuser1的指令,正在查
小菠萝2367 说: 询
小菠萝2367 说: 点播列表展示完毕,一共0个

环境信息

  • 系统详细版本:Linux N1_Server 4.20.5-aml-s905 #5.76 SMP PREEMPT Sun Feb 24 16:20:04 MSK 2019 aarch64 aarch64 aarch64 GNU/Linux(Ubuntu 18.04 bionic)
  • 硬件信息: 斐讯N1刷Armbian;s905d(4核A53,1.5G,64位);2G内存;

其他说明
话说大佬代码重写的怎么样了,不会开发的未毕业菜鸡运维等待抱大腿中(

编译 x264 出错.../尝试移植至非树莓派

在 configure 时:./configure --enable-static --disable-opencl
请问该如何解决呢?

/usr/bin/x86_64-linux-gnu-ld: 最后的链结失败: 输出不可表示的节
collect2: error: ld returned 1 exit status
Makefile:263: recipe for target 'x264' failed
make: *** [x264] Error 1
vanilla@vanilla-Presario-V3700-Notebook-PC:~/git/x264$

--list-hwaccels中并没有安装指南中提到的h264_mmal

尝试执行readme.md中的
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfreetype --enable-omx --enable-omx-rpi --enable-encoder=h264_omx --enable-mmal --enable-hwaccel=h264_mmal --enable-decoder=h264_mmal
时遇到问题
WARNING: Option --enable-hwaccel=h264_mmal did not match anything
然后我执行

pi@raspberrypi:~/github/ffmpeg-4.0 $ sudo ./configure --list-hwaccels
h263_vaapi                  hevc_vdpau                  mpeg2_vdpau                 vp8_nvdec
h263_videotoolbox           hevc_videotoolbox           mpeg2_videotoolbox          vp8_vaapi
h264_d3d11va                mjpeg_nvdec                 mpeg2_xvmc                  vp9_d3d11va
h264_d3d11va2               mjpeg_vaapi                 mpeg4_nvdec                 vp9_d3d11va2
h264_dxva2                  mpeg1_nvdec                 mpeg4_vaapi                 vp9_dxva2
h264_nvdec                  mpeg1_vdpau                 mpeg4_vdpau                 vp9_nvdec
h264_vaapi                  mpeg1_videotoolbox          mpeg4_videotoolbox          vp9_vaapi
h264_vdpau                  mpeg1_xvmc                  vc1_d3d11va                 wmv3_d3d11va
h264_videotoolbox           mpeg2_d3d11va               vc1_d3d11va2                wmv3_d3d11va2
hevc_d3d11va                mpeg2_d3d11va2              vc1_dxva2                   wmv3_dxva2
hevc_d3d11va2               mpeg2_dxva2                 vc1_nvdec                   wmv3_nvdec
hevc_dxva2                  mpeg2_nvdec                 vc1_vaapi                   wmv3_vaapi
hevc_nvdec                  mpeg2_vaapi                 vc1_vdpau                   wmv3_vdpau
hevc_vaapi

发现的确是没有,不知道问题是出在哪里了 买来安装的系统是2018-03-13-raspbian-stretch.img, 现在debian_version是9.4 x264也是按照readme.md里编译安装的。
@chenxuuu

提前感谢

关于cookie

soxn0 6i_d23h sjsy 2u w

发送消息后在network选项卡里面,send项目中的cookie里,未找到request head项,这是Firefox的。Chrome游览器里面有request head项,但是value为空的。
csrf_token项,两个游览器都没找到。

wfbes933zyk7 p lgw eyo

然后那两个没填,直接运行,得到了这样一个报错,请问是什么情况。

谢谢帮助。

I met a few problems when I deployed it by your instructions.

After I executed "python3 play.py", it says "Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (rtmp://txy.live-send.acg.tv/live-txy/streamname=live_11487603_2737999&key=xxxxxxxxxxx) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream."

Why this happened? And, what should I do to solve it?

By the way, it is really an awesome tool. Thanks a lot for your dedicate contributions.

很滑稽的issue

弹幕bot会被自己发送的命令影响
然后就会报错 “出错了:请检查命令或重试”
命令也是断断续续,但并不影响运行
23333

关于依赖包的安装

我在安装依赖包时,出现libtool,texinfo这两个依赖出错
image
而且直接使用解压编译也出现问题,请问该如何解决?

一个小错误

default_pic文件夹内放入jpg格式的音乐,

-> default_pic文件夹内放入jpg格式的图片,

B站问题

大佬有B站登陆的python例子么。。。我卡在验证码那里了

开始运行后提示'Unknown encoder 'h264_omx'请教下怎么解决

[mp3 @ 0x2be4c40] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from '/root/live/default_mp3/bx.mp3':
Metadata:
title : Teddy
album : TVアニメ「神様のメモ帳」オリジナルサウンドトラック
album_artist : 岩崎琢
artist : 岩崎琢
Duration: 00:04:10.44, start: 0.000000, bitrate: 146 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Stream #1:1: Video: png, rgb24(pc), 640x640, 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Cover (front)
Unknown encoder 'h264_omx'
no media
mp3 long:00:04:10

关于歌曲下载链接解析

你好!
我想根据您提供的PHP源码自己搭建下载链接解析服务,但是不知道何从入手,能否也提供一份简明教程?
不胜感激!

另:我在自己的直播间实验时,(使用您的下载链接解析),歌曲无法下载成功,对此感到困惑,能否提供可能导致下载失败的原因?

脚本的后台运行应该换个方式

可以写个shell脚本来管理,可以参照一下我的agentx1项目里的管理脚本
agentx1

我这个是用在openwrt软件包里的,不过适当修改一下应该可以用在树莓派上

关于卡顿

您好,感谢您开发这个项目,我在用的时候发现经常卡顿,但是看了下cpu使用率,并没有满载,请问有解决办法吗?

下载id XXXX完成,正在加入队列 该语句发送弹幕有问题

其中的id xxxxxx会被python获取,作为新的指令推送到api下载,
具体表现为
点歌人:id XXXXXXXX
直播人 : 已收到点歌人的指令
直播人 : 正在下载id XXXXXXXX
直播人 : id XXXXXXXX完成
直播人 : 已收到直播人的指令
直播人 : 正在下载id xxxxxx 完成
直播人 : 出错了:下载出错,请换一首或重试

id xxxxxx 完成 这句话会被系统当作指令。

然后虽然能够正常下载前一个用户点的歌曲,但是还是会报错一次。

改进视频推流速度

初步方案为,先渲染,后推流。
与旧版推流逻辑相同,但是需要避免在渲染时就被播放的问题

运行问题

环境都按照readme进行了安装,运行了却在下载3.3.1版本的ffmpeg

下载完成之后就不会再有问题

以下运行记录


pi@pi:~ $ cd 24h*

pi@pi:~/24h-raspberry-live-on-bilibili $ python3 play.py

Imageio: 'ffmpeg-linux32-v3.3.1' was not found on your computer; downloading it now.

Try 1. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux32-v3.3.1 (32.8 MB)

Downloading: 393216/34368176 bytes (1.1%)


另外,对于B站的多P视频好像会下载失败。在下载多P的B站链接时 you-get 会提示增加某个参数进行下载整个列表。

关于aiohttp库问题

描述bug
我是用在服务器上的,经过文件内的注释操作以及根据一些调试报错弄好了之后,发现一直没有弹幕监控,最后发现是bilibiliClient.py第三行aiohttp的问题,把这行删掉就能正常运行

本应出现的正常状态
正常应该有弹幕监控

环境信息

  • 系统详细版本:Ubuntu 16.04
  • 硬件信息: 腾讯云 成都 1H1G1M

其他说明
既然删掉aiohttp可以正常运行,不知道是否有该库安装的必要,而且文件中aiohttp调用的代码也被注释掉了

一些小问题

1.增加字幕滚动功能。
2.增加渲染控制功能,可选择是否进行渲染。
3.切歌时会鬼畜。
4.我点番剧后他会重复播放,一直放同一个视频。
5.支持网易歌单就最好了。

点播视频之后没法播放 在终端有报错提示geturl之后格式错误 接着ffmpeg提示文件损坏

提示信息如下【请问大佬是什么原因呀】:

[log]getting url:mv5455140
/userapp/bz/downloads/1534742025.0.mp4
shit
[Errno 8] Exec format error
[log]发送弹幕:mv5455140下载完成,等待渲染
我砍人很疼 说: mv5455140下载完成,等待渲染
[error]弹幕发送失败:mv5455140正在渲染
{'code': 0, 'data': [], 'msg': 'msg in 1s'}
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfreetype --enable-omx --enable-omx-rpi --enable-encoder=h264_omx --enable-mmal --enable-hwaccel=h264_mmal --enable-decoder=h264_mmal
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/userapp/bz/downloads/1534742025.0.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:04:05.83, start: 0.000000, bitrate: 852 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 712 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(zho): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 134 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[Parsed_ass_1 @ 0x1c9a8f0] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.4.2 (COMPLEX)
[Parsed_ass_1 @ 0x1c9a8f0] Using font provider fontconfig
[Parsed_ass_1 @ 0x1c9a8f0] Added subtitle file: '/userapp/bz/downloads/1534742025.0ok.ass' (10 styles, 16 events)
[Parsed_ass_1 @ 0x1c9a8f0] fontselect: (微软雅黑, 400, 0) -> /usr/share/fonts/truetype/msttcorefonts/Arial.ttf, 0, ArialMT
[Parsed_ass_1 @ 0x1c9a8f0] Glyph 0x5F53 not found, selecting one more font for (微软雅黑, 400, 0)
[Parsed_ass_1 @ 0x1c9a8f0] fontselect: (微软雅黑, 400, 0) -> /usr/share/fonts/truetype/wqy/wqy-zenhei.ttc, 0, WenQuanYiZenHei
[libx264 @ 0x183cac0] VBV maxrate specified, but no bufsize, ignored
[libx264 @ 0x183cac0] using SAR=1/1
[libx264 @ 0x183cac0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x183cac0] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit
*** Error in `ffmpeg': corrupted size vs. prev_size: 0x022def18 ***
Aborted
delete/userapp/bz/downloads/1534742025.0.mp4

直播卡顿

FFMPEG的信息是frame= 92 fps=0.6 q=-0.0 size= 1042kB time=00:00:30.00 bitrate= 284.6kbits/
是否意味着树莓派的性能太低了以至于拖不起这个直播间

README内少一个依赖导致ffmpeg编译不通过

根据make时输出,是在编译x264时候出的问题
输出内容:
'''
libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth > 8)
^~~~~~~~~~~~~~
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth == 8)
^~~~~~~~~~~~~~
common.mak:60: recipe for target 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Error 1
make: *** Waiting for unfinished jobs....
root@raspberrypi:/home/pi/Desktop/ffmpeg-3.3.2#
'''
后来才发现是因为没安装libx264-dev
应当在编译ffmpeg前sudo apt-get install libx264-dev
我是最新版的树莓派系统

大佬,搭建完成始终是这个情况怎么办啊?

皆因惰性 说: id4071236
10
[log]发送弹幕:已收到皆因惰性的指令
欧皮酱 说: 已收到皆因惰性的指令
[log]发送弹幕:正在下载id4071236
欧皮酱 说: 正在下载id4071236
[log]getting url:id4071236
no files found!
/home/pi/24h-raspberry-live-on-bilibili/downloads/1526176972.0
[log]发送弹幕:id4071236下载完成,已加入播放队
欧皮酱 说: id4071236下载完成,已加入播放队
10
[log]发送弹幕:列
[log]已添加排队项目:id4071236
[log]发送弹幕:已收到欧皮酱的指令
欧皮酱 说: 列
欧皮酱 说: 已收到欧皮酱的指令
[log]发送弹幕:正在下载id4071236下载完成,已加
欧皮酱 说: 正在下载id4071236下载完成,已加
[log]发送弹幕:入播放队
欧皮酱 说: 入播放队
[log]getting url:id4071236下载完成,已加入播放队
[log]发送弹幕:出错了:请检查命令或重试
欧皮酱 说: 出错了:请检查命令或重试
[log]下载文件出错:id4071236下载完成,已加入播放队,url:
delete/home/pi/24h-raspberry-live-on-bilibili/downloads/1526176990.0.mp3
delete error
delete/home/pi/24h-raspberry-live-on-bilibili/downloads/1526176990.0.mp4
delete error
delete/home/pi/24h-raspberry-live-on-bilibili/downloads/1526176990.0.flv
delete error

获取音乐下载地址的php貌似挂了

描述bug
获取音乐下载地址的php貌似挂了

其他说明
只能下载mv,歌曲下载不了了
只能获取到专辑图片,获取不到歌曲下载地址

[log]getting url:id1313052978
get info: ADAMAS - 试听版(TV动画《刀剑神域 Alicization篇》片头曲 / TVアニメ「ソードアート・ オンライン アリシゼーション」OPテーマ\t) http://p1.music.126.net/a0R0gpgnlpAWbXVLbKVxhA==/109951163641015775.jpg
shit(get song length)
can't sync to MPEG frame

play.py 无法通过 clrt+c 键来停止

如题,clrt+c 后程序又循环启动,只能用kill来关了。
另:树莓派显存设置过低会导致硬解出错,但程序并不能正常关闭和上面一样又再次循环执行。

关于换歌、视频时会闪断

每首歌ffmpeg认为是一个完整的rtmp协议,放完歌按照协议终止了rtmp。所有只有两个方案:1.让输入流是一个不间断实时合成的流。2.从源码上调用ffmpeg的函数,只在最开始运行时发送握手协议,每首歌曲放完不发送终止信息。
研究不深,但是似乎只能从这两方面入手?

运行时报Illegal Instruction,怎么解决啊

运行时报Illegal Instruction,应该是x264的问题,单独运行x264也是报这个错。
完全按照你的说明安装的,板子是raspberry zero W
具体如下:

mp3 long:00:04:10
ffmpeg -threads 0 -re -loop 1 -r 2 -t 250 -f image2 -i "/root/bin/24h-blive/default_pic/aa.jpg" -i "/root/bin/24h-blive/default_mp3/bx.mp3" -vf ass="/root/bin/24h-blive/default.ass" -pix_fmt yuv420p -preset ultrafast -maxrate 3000k -acodec copy -c:v h264_omx -f flv "rtmp://bvc.live-send.acg.tv/live-bvc/?streamname=live_1577484_9987261&key=ed8e756bfbee7dbdaec24756cd6242a2"
ffmpeg version 3.2.12-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, image2, from '/root/bin/24h-blive/default_pic/aa.jpg':
  Duration: 00:00:00.50, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1152x720 [SAR 72:72 DAR 8:5], 2 fps, 2 tbr, 2 tbn, 2 tbc
[mp3 @ 0x14da190] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from '/root/bin/24h-blive/default_mp3/bx.mp3':
  Metadata:
    title           : Teddy      
    album           : TVアニメ「神様のメモ帳」オリジナルサウンドトラック
    album_artist    : 岩崎琢
    artist          : 岩崎琢
  Duration: 00:04:10.44, start: 0.000000, bitrate: 146 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Stream #1:1: Video: png, rgb24(pc), 640x640, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)
[Parsed_ass_0 @ 0x14ddf20] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.4.2 (COMPLEX)
[Parsed_ass_0 @ 0x14ddf20] Using font provider fontconfig
[Parsed_ass_0 @ 0x14ddf20] Added subtitle file: '/root/bin/24h-blive/default.ass' (6 styles, 4 events)
[swscaler @ 0x1501b50] deprecated pixel format used, make sure you did set range correctly
[h264_omx @ 0x14de9b0] libOMX_Core.so not found
[h264_omx @ 0x14de9b0] libOmxCore.so not found
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (h264_omx))
  Stream #1:0 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
no media
mp3 long:00:04:10

如果是直接用apt-get安装的x264单独运行不会报错,但直播时也会报错,同上
网上搜了一圈没找到解决办法,这个要怎么解决啊?
顺便问一下,如果要用一般的arm设备(斐讯N1刷armbian)运行这个点播台,var_set.py里应该选pi还是vps啊?
菜鸡在此先谢过了!

关于直播字幕问题

通过不断努力前面全部弄好了。就查目前那个直播字幕不能显示.还请麻烦写上去,行吗?🙏🙏

大佬能不能设置停止播放当前歌单

就像我昨天点播了我的歌单 但是太晚了要休息了 就想关直播的时候把自己的歌单关了 不影响后面的观众点播,但是没有这个选项。比如我刚刚又去直播间,上个点播的人已经走了(直播间没人)但是他还有七十多首没播完QUQ。求增加功能!
B站id赵校长

readme 错误

安装x264解码器(时间较长):

应该是编码器吧?

you-get的参数错误导致视频无法下载

根据我的发现,某些较新的视频下载不了。
比如我想点播av14554845,you-get没有下载到这个视频。

[log][2017-12-27 13:54:09]ClarkeCheng:av14554845
[log]发送弹幕:已收到ClarkeCheng的指令
[log]downloading bilibili video:https://www.bilibili.com/video/av14554845
[log][2017-12-27 13:54:10]ClarkeCheng:已收到ClarkeCheng的指令
[log]发送弹幕:正在下载【鏡音リン &鏡音レン】病名为爱
[log][2017-12-27 13:54:15]ClarkeCheng:正在下载【鏡音リン &鏡音レン】病名为爱
[log]发送弹幕:【Neru】
[log][2017-12-27 13:54:17]ClarkeCheng:【Neru】
you-get: [error] oops, something went wrong.
you-get: don't panic, c'est la vie. please try the following steps:
you-get:   (1) Rule out any network problem.
you-get:   (2) Make sure you-get is up-to-date.
you-get:   (3) Check if the issue is already known, on
you-get:         https://github.com/soimort/you-get/wiki/Known-Bugs
you-get:         https://github.com/soimort/you-get/issues
you-get:   (4) Run the command with '--debug' option,
you-get:       and report this issue with the full output.
site:                Bilibili
title:               【鏡音リン &鏡音レン】病名为爱【Neru】
stream:
you-get https://www.bilibili.com/video/av14554845 --format=flv -o /root/24h-raspberry-live-on-bilibili/downloads -O 1514354059.0rendering1
[log]发送弹幕:视频【鏡音リン &鏡音レン】病名为爱【N
[log][2017-12-27 13:54:22]ClarkeCheng:视频【鏡音リン &鏡音レン】病名为爱【N
[log]发送弹幕:eru】下载完成,等待渲染
[log][2017-12-27 13:54:23]ClarkeCheng:eru】下载完成,等待渲染
[error]弹幕发送失败:视频【鏡音リン &鏡音レン】病名为爱【N
{'data': [], 'code': 0, 'msg': 'msg repeat'}
[log]发送弹幕:eru】正在渲染
[log][2017-12-27 13:54:27]ClarkeCheng:eru】正在渲染
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Ubuntu 6.3.0-12ubuntu2) 20170406
  configuration: --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfreetype --arch=x86_64
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
/root/24h-raspberry-live-on-bilibili/downloads/1514354059.0rendering1.flv: No such file or directory
delete error
[log]发送弹幕:出错了:请检查命令或重试
[log][2017-12-27 13:54:29]ClarkeCheng:出错了:请检查命令或重试

而我点播av14042990p1,you-get却能成功下载到这个视频。

[log][2017-12-27 13:58:07]ClarkeCheng:av14042990p1
[log]发送弹幕:已收到ClarkeCheng的指令
[log]downloading bilibili video:https://www.bilibili.com/video/av14042990/#page=1
[log][2017-12-27 13:58:08]ClarkeCheng:已收到ClarkeCheng的指令
[log]发送弹幕:正在下载【荒野求生】全6 4集 包含拍摄
[log][2017-12-27 13:58:14]ClarkeCheng:正在下载【荒野求生】全6 4集 包含拍摄
[log]发送弹幕:花絮,拍摄团队,后期制作,贝爷带你吃遍地
[log][2017-12-27 13:58:16]ClarkeCheng:花絮,拍摄团队,后期制作,贝爷带你吃遍地
[log]发送弹幕:球
[log][2017-12-27 13:58:17]ClarkeCheng:球
site:                Bilibili
title:               【荒野求生】全64集 包含拍摄花絮,拍摄团队,后期制作,贝爷带你吃遍地球
stream:
    - format:        flv
      container:     flv
      size:          224.1 MiB (234954799 bytes)
    # download-with: you-get --format=flv [URL]

Downloading 【荒野求生】全64集 包含拍摄花絮,拍摄团队,后期制作,贝爷带你吃遍地球.flv ...
 8.0% ( 18.0/224.1MB) ├████────────────────────────────────────────────┤[1/7]   24 MB/s

直接用you-get下载并加上--debug

you-get https://www.bilibili.com/video/av14554845 --format=flv -o /root/24h-raspberry-live-on-bilibili/downloads -O 1514354059.0rendering1 --debug

输出

[DEBUG] url_locations: https://www.bilibili.com/video/av14554845
[DEBUG] get_content: https://www.bilibili.com/video/av14554845/
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=23733992&player=1&quality=4&ts=1514354735&sign=6c1fcd9f44ab7c3429d8a0cf1cfc980f
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=23733992&player=1&quality=3&ts=1514354736&sign=4ae38af54b911d9da2a2a962f4a0f772
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=23733992&player=1&quality=2&ts=1514354736&sign=2826e18594e192a967a9f011f402ae55
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=23733992&player=1&quality=1&ts=1514354736&sign=ec260f8e6e137ba2695ca9399bc0eca0
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=23733992&player=1&quality=0&ts=1514354736&sign=788be5f1f9caab526382e33a3a74f919
[DEBUG] get_content: http://comment.bilibili.com/23733992.xml
you-get: version 0.4.1011, a tiny downloader that scrapes the web.
you-get: Namespace(URL=['https://www.bilibili.com/video/av14554845'], cookies=None, debug=True, extractor_proxy=None, force=False, format='flv', help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='/root/24h-raspberry-live-on-bilibili/downloads', output_filename='1514354059.0rendering1', password=None, player=None, playlist=False, socks_proxy=None, stream=None, timeout=600, url=False, version=False)
site:                Bilibili
title:               【鏡音リン &鏡音レン】病名为爱【Neru】
stream:
Traceback (most recent call last):
  File "/usr/local/bin/you-get", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/you_get/__main__.py", line 92, in main
    main(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/you_get/common.py", line 1583, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/you_get/common.py", line 1472, in script_main
    **extra
  File "/usr/local/lib/python3.5/dist-packages/you_get/common.py", line 1216, in download_main
    download(url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/you_get/common.py", line 1574, in any_download
    m.download(url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/you_get/extractor.py", line 59, in download_by_url
    self.download(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/you_get/extractor.py", line 201, in download
    self.p(stream_id)
  File "/usr/local/lib/python3.5/dist-packages/you_get/extractor.py", line 139, in p
    self.p_stream(stream_id)
  File "/usr/local/lib/python3.5/dist-packages/you_get/extractor.py", line 92, in p_stream
    stream = self.dash_streams[stream_id]
KeyError: 'flv'

根据最后一行KeyError: 'flv',推断问题出在下载时用了format=flv这个参数上,执行

you-get -i https://www.bilibili.com/video/av14554845

输出

site:                Bilibili
title:               【鏡音リン &鏡音レン】病名为爱【Neru】
streams:             # Available quality and codecs
    [ DEFAULT ] _________________________________
    - format:        flv720
      container:     flv
      size:          56.4 MiB (59186599 bytes)
    # download-with: you-get --format=flv720 [URL]

    - format:        mp4
      container:     mp4
      size:          29.3 MiB (30732667 bytes)
    # download-with: you-get --format=mp4 [URL]

可以看到format只有flv720mp4这两种,没有flv这种format。
再执行

you-get -i https://www.bilibili.com/video/av14042990

输出

site:                Bilibili
title:               【荒野求生】全64集 包含拍摄花絮,拍摄团队,后期制作,贝爷带你吃遍地球
streams:             # Available quality and codecs
    [ DEFAULT ] _________________________________
    - format:        flv
      container:     flv
      size:          224.1 MiB (234954799 bytes)
    # download-with: you-get --format=flv [URL]

    - format:        mp4
      container:     mp4
      size:          152.6 MiB (160006334 bytes)
    # download-with: you-get --format=mp4 [URL]

可以看到format里有flv,所以这个视频才能下载进来。所以我认为用you-get下载B站视频时不应该强制使用format=flv,还有一个bug就是视频根本没有下载成功,程序却发弹幕提示下载完成,等待渲染。希望大佬能改进一下,我也在用这个程序24小时直播,但我没有树莓派,我是装在VPS上的。

运行play.py时出错

ffmpeg version N-89230-g279d2599dd Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
libavutil 56. 2.100 / 56. 2.100
libavcodec 58. 3.105 / 58. 3.105
libavformat 58. 2.102 / 58. 2.102
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 3.100 / 7. 3.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[mjpeg @ 0x2f987c0] No JPEG data found in image
[mjpeg @ 0x2f987c0] Single field
Input #0, image2, from '/home/pi/24h-raspberry-live-on-bilibili/default_pic/aa.jpg':
Duration: 00:00:00.33, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 960x960 [SAR 96:96 DAR 1:1], 3 fps, 3 tbr, 3 tbn, 3 tbc
Input #1, mp3, from '/home/pi/24h-raspberry-live-on-bilibili/default_mp3/aa.mp3':
Metadata:
encoder : Lavf57.25.100
disc : 3
track : 32
artist : Lyn
Duration: 00:01:34.85, start: 0.025056, bitrate: 338 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Metadata:
encoder : Lavc57.24
Stream #1:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 640x640 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Media (e.g. label side of CD)
Unknown encoder 'h264_omx'

出现No JPEG data found in image和Unknown encoder 'h264_omx'` 怎么解决

编译并安装ffmpeg出现 gcc is unable to create an executable file. 的错误提示

系统:Ubuntu16.04 64位

按照本项目的readme文档中的编译命令(即:sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfreetype --enable-omx --enable-omx-rpi --enable-encoder=h264_omx --enable-mmal --enable-hwaccel=h264_mmal --enable-decoder=h264_mmal)会出现如何下错误:

gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

加上--enable-cross-compile的选项后则出现如下错误:

gcc is unable to create an executable file.
C compiler test failed.

ffmpeg已经不能编译通过;点歌列表失效;弹幕无歌词

1.readme给的ffmpeg版本太低,编译不通过,换成3.4.2
2.点歌,弹幕反馈点歌成功,字幕无显示,可以正常下载,但点歌列表查询时显示列表歌曲0首
3.弹幕并不会刷新歌词,只会在每次播完一首歌刷新

小白求教

方便留下QQ么?做到最后一步死活启动不了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.