slbr

command module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

README

SLBR: Suck-Less Bilibili live Recorder

Why another Bilibili livestream recorder?

Because all the other recorders are suck. So I write my own recorder, which, I hope, sucks less.

Features

If you want a Bilibili recorder featured with:

  • Single executable file, just copy and run
  • Friendly command-line arguments and an optional configuration file
  • Save raw video streams directly, without intentional clipping
  • Efficient execution
  • Friendly logging to stdout or files
  • Just works

Then you should give SLBR (suck-less bilibili live recorder) a try.

Example usage

Using config file
{
  "tasks": [
    {
      // ID of the live room which the task records
      "room_id": 1234,
      "download": {
        // buffer 16MiB data before flushing to disk
        "disk_write_buffer_bytes": 16777216,
        // "." is the default value, you can skip this line
        "save_directory": "."
      },
      "transport": {
        // try ipv4 firstly, then ipv6
        "allowed_network_types": [
          "ipv4",
          "ipv6"
        ]
      }
    }
  ]
}
Using command line arguments

Record live room with 1234 to current working directory:

./slbr -s 1234 -o .

For more usages, run slbr -h to get the help menu. Here is a copy (may become outdated):

usage: slbr [-h|--help] [-c|--config "<value>"] [-s|--room] [-o|--save-to
            "<value>"] [-b|--disk-write-buffer <integer>]

            Record bilibili live streams

Arguments:

  -h  --help               Print help information
  -c  --config             Specify which configuration file to use. JSON, TOML
                           and YAML are all supported
  -s  --room               Specify which room to record. The ID is included in
                           bilibili live webpage url. Set this to run without
                           config file
  -o  --save-to            Specify the directory where to save records. If not
                           set, process working directory is used
  -b  --disk-write-buffer  Specify disk write buffer size (bytes). The real
                           minimum buffer size is determined by OS. Default:
                           4194304

The project name is too offensive!

You can call it Simple Lightweight Bilibili live Recorder. It's all up to you.

Reference

https://github.com/lovelyyoshino/Bilibili-Live-API

https://github.com/BililiveRecorder/BililiveRecorder

https://github.com/SocialSisterYi/bilibili-API-collect

https://github.com/hr3lxphr6j/bililive-go

https://github.com/zyzsdy/biliroku

TODO list

  • cli override config file
  • proper default values for config file
  • user manual

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
This file defines the Bilibili client struct.
This file defines the Bilibili client struct.
This file implements the background WebSocket messaging channel in Bilibili webui.
This file implements the background WebSocket messaging channel in Bilibili webui.
dmpkg
This file implements the auth exchange.
This file implements the auth exchange.
This file contains task runner.
This file contains task runner.
Package types include common data structures used in multiple packages.
Package types include common data structures used in multiple packages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL