bldl
Version:
A CLI tool for downloading Bilibili streams
66 lines (48 loc) • 2.12 kB
Markdown
> Just another CLI tool for downloading Bilibili streams
Prerequisites: install [ffmpeg](https://ffmpeg.org/download.html) for merging tracks and add it to env path. For Homebrew users:
```sh
brew install ffmpeg
```
```sh
npm install -g bldl
```
`bldl --help`
```
Commands:
bldl <url> [output] Download stream [default]
bldl login <credential> Login to download higher quality streams
bldl whoami Display Bilibili username
Positionals:
url URL to download stream from [string]
output Path to save stream to [string]
Options:
--version Show version number [boolean]
--credential Bilibili SESSDATA from browser Cookies [string]
-i, --interactive Interactively download streams
[] [default: false]
--video-codec Filter out video tracks by given codec, e.g. avc, hevc, av1
, or more exact codec string [string]
--audio-codec Filter out audio tracks by given codec [string]
--tmp-dir Directory to save temporary tracks
[] [default: "{OS_TMP_DIR}/bldl"]
--keep-tmp-tracks Whether to keep temporary tracks after merging
[] [default: false]
--help Show help [boolean]
```
```sh
bldl login {SESSDATA_FROM_COOKIES}
bldl BV1j4411W7F7
bldl https://www.bilibili.com/video/BV1j4411W7F7 # UGC video
bldl https://www.bilibili.com/bangumi/play/ep199612 # PGC episode
bldl https://www.bilibili.com/bangumi/play/ss12548 # PGC season
```
Or for one-off use:
```sh
npx bldl --credential={SESSDATA_FROM_COOKIES} https://www.bilibili.com/video/BV1j4411W7F7
```
[](./LICENSE)