Git Product home page Git Product logo

bilibili-live-recorder's Introduction

bilibili-live-recoder

Table of Contents

About

这是一个使用asyncio实现的bilibili直播录制工具.

它会监测房间状态, 在直播开始后自动录制.

它也可以同时录制多个直播(默认最高画质, 请注意带宽是否够用).

它会监测配置文件的改动, 可以在任意时间修改配置文件.

Installing

请保证Python版本不低于3.7

pip install bilibili-live-recorder

Usage

𝅘𝅥𝅮 blr --help
usage: blr [-h] [-c] [-d]

a bilibili live recorder ●REC...

optional arguments:
  -h, --help      show this help message and exit
  -c , --config   location of your live list, default is '$HOME/.config/livelist.toml'
  -d , --dir      directory to save your reording file, default is '$HOME/Videos/bilibili'

配置文件使用toml格式, 样子如下:


[[users]]
# 这里url既可以是主播的个人空间, 也可以是房间
url = "https://space.bilibili.com/2233"

[[users]]
url = "https://live.bilibili.com/6"

默认位置位于$USER/.config/livelist.toml, 默认录制的视频位于$USER/Videos/bilibili

License

MIT

bilibili-live-recorder's People

Contributors

yuuzao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

casteryh

bilibili-live-recorder's Issues

Timeout 之后,不会恢复录制

2020/05/22T23:20:58 1 lives is onlineed:    404.02 kb/s
2020/05/22T23:21:08 1 lives is onlineed:    405.49 kb/s
2020/05/22T23:21:18 1 lives is onlineed:    557.14 kb/s
2020/05/22T23:21:28 1 lives is onlineed:    392.41 kb/s
2020/05/22T23:21:37 Configuration remains the same, will be checked again after 60 seconds
2020/05/22T23:21:38 1 lives is online
Task exception was never retrievedspeed:    506.79 kb/s
future: <Task finished name='Task-5' coro=<Lives._rec() done, defined at /my/python/path/site-packages/live/task.py:49> exception=TimeoutError()>
Traceback (most recent call last):
  File "/my/python/path/site-packages/live/task.py", line 54, in _rec
    await asyncio.gather(r.record(), r.rec_stat())
  File "/my/python/path/site-packages/live/recorder.py", line 25, in record
    ret = await self._get(session=s, url=self.url, headers=h)
  File "/my/python/path/site-packages/live/recorder.py", line 51, in _get
    while chunk := await res.content.read(2048):
  File "/my/python/path/site-packages/aiohttp/streams.py", line 368, in read
    await self._wait('read')
  File "/my/python/path/site-packages/aiohttp/streams.py", line 296, in _wait
    await waiter
  File "/my/python/path/site-packages/aiohttp/helpers.py", line 596, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
2020/05/22T23:21:48 1 lives is online
2020/05/22T23:21:58 1 lives is online
2020/05/22T23:22:08 1 lives is online
2020/05/22T23:22:18 1 lives is online
2020/05/22T23:22:28 1 lives is online
2020/05/22T23:22:37 Configuration remains the same, will be checked again after 60 seconds
2020/05/22T23:22:38 1 lives is online
2020/05/22T23:22:48 1 lives is online
2020/05/22T23:22:58 1 lives is online
2020/05/22T23:23:08 1 lives is online
2020/05/22T23:23:18 1 lives is online
2020/05/22T23:23:28 1 lives is online

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.