https://github.com/timerring/looplive
7 x 24 小时全自动循环直播工具 The Python toolkit package and cli designed for auto loop live.
https://github.com/timerring/looplive
Last synced: 10 months ago
JSON representation
7 x 24 小时全自动循环直播工具 The Python toolkit package and cli designed for auto loop live.
- Host: GitHub
- URL: https://github.com/timerring/looplive
- Owner: timerring
- License: mit
- Created: 2025-03-19T12:54:58.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-20T15:56:16.000Z (10 months ago)
- Last Synced: 2025-03-20T16:05:24.074Z (10 months ago)
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-en.md
- License: LICENSE
Awesome Lists containing this project
README
[简体中文](./README.md) | English
`looplive` is a 24/7 fully automated looping live streaming tool, expected to support more platforms.
The Python toolkit package and cli designed for auto loop live.
> Welcome to use, provide more feedback, and contribute to this project via PR. Please do not use it for purposes that violate community regulations.
## Preparation
First, you need to have the `ffmpeg` tool installed on your machine.
- Ubuntu
```bash
sudo apt update && apt install ffmpeg -y
```
- MacOS
```bash
brew install ffmpeg
```
- Windows and more platforms: Please refer to the [official page](https://www.ffmpeg.org/download.html).
- Python >= 3.8
## Quick Start
### Start Live Streaming
1. Go to the [live streaming page](https://link.bilibili.com/p/center/index#/my-room/start-live).
- If you do not have live streaming permissions, please apply first by clicking `Activate Live Room Now`, and then follow the prompts from Bilibili.
2. Click `Start Live`.
3. Obtain the streaming server address `-s` and stream key `-k`.
### Streaming
> To avoid command parameters being incorrectly separated, please wrap each parameter in English double quotes `"`. The parameter `-f` is the folder where the video files are stored.
```bash
pip install looplive
looplive add -s "rtmp://xxxxxxxx" -k "?streamname=xxxxxxxx" -f "your/folder/path"
looplive bili
```
## Docker Deployment
### Configuration File
The `bili_server_url` and `bili_key` in the `config.json` file need to be obtained from the [live streaming page](https://link.bilibili.com/p/center/index#/my-room/start-live).
```json
{
"folder": "/app/looplive/videos",
"bili_server_url": "rtmp://xxxxxxx",
"bili_key": "?streamname=xxxxxxxxxxxxxx"
}
```
### Running
```bash
sudo docker run -it \
-v /your/path/to/config.json:/app/looplive/model/config.json \
-v /your/path/to/videos:/app/looplive/videos \
--name looplive_docker \
ghcr.io/timerring/looplive:0.0.1
```
### More Usage
```bash
$ looplive -h
looplive [-h] [-V] {check,add,reset,bili} ...
The Python toolkit package and CLI designed for auto loop live.
positional arguments:
{check,add,reset,bili}
Subcommands
check Check the configuration
add Add the configuration
reset Reset the configuration
bili Stream on the Bilibili platform
optional arguments:
-h, --help show this help message and exit
-V, --version Print version information
```