diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -17,6 +17,65 @@ If you want a Bilibili recorder featured with: Then you should give SLBR *(suck-less bilibili live recorder)* a try. +## Example usage + +### Using config file + +```json5 +{ + "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": [ + "tcp4", + "tcp6" + ] + } + } + ] +} +``` + +### Using command line arguments + +Record live room with `1234` to current working directory: + +```shell +./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. |