Giter Site home page Giter Site logo

blive-raspberry's Introduction

blive-raspberry

blive-raspberry是一个为Bilibili直播编写的树莓派点歌台。

本项目重构自晨旭的点歌台

使用

依赖安装

待补充

配置

本项目通过修改config.json来实现配置。

{
    "rtmp": {
        "url": "rtmp://txy.live-send.acg.tv/live-txy/",
        "code": ""
    },
    "cookie": "",
    "roomId": 35724
}
  • 将rtmp中的code填入你的直播码
  • 在Cookie中填入你的账户的Cookie,可以使用我开发的Bilibili Cookie获取工具来获取
  • 在roomId填入你的房间号

运行

使用Python3运行main.py即可

$ python3 main.py

开发

项目结构

│  config.json                  项目配置文件
│  LICENSE
│  main.py                      程序入口文件
│  README.md
│  
├─downloader                    下载器目录
│  │  NeteaseMusic.py           网易云音乐的下载器
│  │  
│  └─download                   文件下载后的存储文件夹
│          .gitignore
│          
├─log
│      .gitignore
│      ffmpeg.log               FFmpeg的日志文件
│      
├─resource                      资源文件夹
│  ├─img                        存放播放音乐时的随机图片
│  │      darksouls.jpg
│  │      
│  ├─lrc                        歌词文件夹
│  │      default.ass
│  │      
│  └─music                      无人点播时播放的随机音乐
├─service
│      Danmu.py                 弹幕服务
│      Download.py              下载服务
│      Media.py                 媒体推流服务
│      Service.py               所有Service的父类
│      
└─util                          工具
        AES.py                  AES-128-CBC加密工具
        Config.py               配置 用于读取/写入配置
        Danmu.py                弹幕 用于读取/发送弹幕
        FFmpeg.py               FFmpeg 对FFmpegCommand的封装
        FFmpegCommand.py        对FFmpeg命令行的封装
        Log.py                  日志系统
        Queue.py                队列
        Request.py              请求 用于Http请求

流程说明

         +---------+ 用户发送弹幕
         |
         v
+--------+---------+
|   Danmu Service  |
+--------+---------+
         | 处理并分发给下载队列
         v
+--------+---------+
| Download Service |
+--------+---------+
         | 下载完毕后通知给播放队列
         v
+--------+---------+
|   Media Service  |
+--------+---------+
         | 组织命令并推流
         v
+--------+---------+
|  Bilibili Server |
+------------------+

Thanks

blive-raspberry's People

Contributors

a1bireo avatar chenxuuu avatar smilecc avatar zvrh avatar

Watchers

 avatar  avatar

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.