README-en.md
March 29, 2025 · View on GitHub
简体中文 | English
looplive is a 24/7 automated multi-platform simultaneous streaming tool.
Supported Platforms (support more platforms welcome via issue)
Features
Welcome to use, feedback is appreciated, PRs are welcome. Please do not use for purposes that violate community guidelines.
- Supports 24/7 automated loop streaming
- Supports simultaneous streaming to multiple platforms:
- Bilibili
- Youtube
- Theoretically supports any platform with RTMP servers, more platforms welcome via issue
- Remembers parameters, configure once, run automatically afterwards
- Supports Docker deployment
Prerequisites
Before using this tool, you need to install ffmpeg:
- Windows:
choco install ffmpeg(via Chocolatey) or other methods - macOS:
brew install ffmpeg(via Homebrew) - Linux:
sudo apt install ffmpeg(Debian/Ubuntu)
For other operating systems, please refer to the official website.
Then install looplive:
pip install looplive
Quick Start
Start Streaming
Bilibili
- Go to the live streaming page.
- If you don't have streaming permissions yet, apply first by clicking
Start Live Roomand follow Bilibili's instructions.
- If you don't have streaming permissions yet, apply first by clicking
- Click
Start Live Streaming. - Get the streaming server URL
-bsand stream key-bkas shown in the image below, just copy them directly.
To avoid command parameter parsing issues, please wrap each parameter in English double quotes
".

Youtube
- Go to the live streaming page.
- Get the Stream URL
-ysand Stream key-yk.
To avoid command parameter parsing issues, please wrap each parameter in English double quotes
".

Video Folder
Parameter -f is the folder where video files are stored
To avoid command parameter parsing issues, please wrap each parameter in English double quotes
". You only need to fill in the server_url and key for the platforms you want to use.
# eg.
# Configuration for Bilibili only, add once
looplive add -bs "rtmp://live-push.bilivideo.com/live-bvc/" -bk "?streamname=live_3541234541234567_8901234&key=looplivexxxxxxxxxxxxdgd&schedule=rtmp&pflag=1" -f "your/folder/path"
# Configuration for Youtube only, add once
looplive add -ys "rtmp://a.rtmp.youtube.com/live2" -yk "ghkh-sfgg-loop-live-live" -f "your/folder/path"
# Configuration for both Bilibili and Youtube, add once
looplive add -bs "rtmp://live-push.bilivideo.com/live-bvc/" -bk "?streamname=live_3541234541234567_8901234&key=looplivexxxxxxxxxxxxdgd&schedule=rtmp&pflag=1" -ys "rtmp://a.rtmp.youtube.com/live2" -yk "ghkh-sfgg-loop-live-live" -f "your/folder/path"
Streaming
After adding parameters once, you can start streaming with the following commands.
# Stream to Bilibili only
looplive bili
# Stream to Youtube only
looplive youtube
# Stream to both Bilibili and Youtube
looplive both
Docker Deployment
Configuration File
{
"folder": "/app/looplive/videos", // don't change this
"bili_server_url": "rtmp://live-push.bilivideo.com/live-bvc/",
"bili_key": "?streamname=live_3541234541234567_8901234&key=looplivexxxxxxxxxxxxdgd&schedule=rtmp&pflag=1",
"ytb_server_url": "rtmp://a.rtmp.youtube.com/live2", // Set to "" if not needed
"ytb_key": "ghkh-sfgg-loop-live-live" // Set to "" if not needed
}
Running
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.2
More Usage
$ 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,ytb,both}
Subcommands
check Check the configuration
add Add the configuration
reset Reset the configuration
bili Stream on the bilibili platform
ytb Stream on the youtube platform
both Stream on the bilibili and youtube platform
options:
-h, --help show this help message and exit
-V, --version Print version information