Giter Site home page Giter Site logo

push2live's Introduction

推送本地视频到b站直播间

使用说明

本项目依赖 requestsqrcode,可以直接使用 pip 安装:

pip install -r requirements.txt

使用二维码登录并生成 cookie.json

from utils.blivex import Bilibili
bili = Bilibili()
bili.login_with_qrcode("./data/cookie.json") # 可以自定义 `cookie.json` 的存储位置

生成 cookie.json 之后便可以直接用 cookie 登录:

bili.login_with_cookie("./data/cookie.json")

推送本地视频到直播间示例:

bili.start_live() # 开启直播间
rtmp_addr = bili.get_rtmp() # 获取直播 rtmp 地址
ffmpeg -re -i "./本地视频.mp4" -c copy rtmp_addr # 使用 ffmpeg 推流
bili.send_dm("弹幕") # 发送弹幕
bili.stop_live() # 关闭直播间

push2live's People

Contributors

dependabot[bot] avatar liu246542 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.