Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bizzy-0110/restreambot
Telegram bot for restream your livestream on multiple platforms at the same time
https://github.com/bizzy-0110/restreambot
multistream nginx restream restream-bot rtmp-stream stream telegram-bot
Last synced: 1 day ago
JSON representation
Telegram bot for restream your livestream on multiple platforms at the same time
- Host: GitHub
- URL: https://github.com/bizzy-0110/restreambot
- Owner: Bizzy-0110
- Created: 2025-01-10T20:27:08.000Z (16 days ago)
- Default Branch: main
- Last Pushed: 2025-01-11T07:54:08.000Z (16 days ago)
- Last Synced: 2025-01-25T18:15:02.246Z (1 day ago)
- Topics: multistream, nginx, restream, restream-bot, rtmp-stream, stream, telegram-bot
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ReStreamBot is a bot for telegram made in 2022 that allows you with the use of a linux server to re-route your stream in multiple platforms at the same time
# Installation
#### Clone the repository
```terminal
git clone https://github.com/Bizzy-0110/ReStreamBot.git
```
```terminal
cd ReStreamBot
```
```terminal
pip install requirements.txt
```
#### Install Nginx
```terminal
sudo apt update
```
```terminal
sudo apt install -y build-essential libpcre3 libpcre3-dev libssl-dev zlib1g zlib1g-dev git
``````
#### Install RTMP Module for Nginx
``` terminal
wget http://nginx.org/download/nginx-1.25.1.tar.gz
tar -xvzf nginx-1.25.1.tar.gz
cd nginx-1.25.1
git clone https://github.com/arut/nginx-rtmp-module.git
./configure --add-module=./nginx-rtmp-module
make
sudo make install
```
# Setup
## Bot
Edit the costants at the beginning of the main.py according to your needs
And add the bot token and the whitelist members in secret.json
## Nginx
Open the Nginx configuration and add the following
```text
rtmp {
server {
listen 1935;
chunk_size 4096;application starting_key {
live on;
record off;meta copy;
#
# Example
# Youtube
# push rtmp://a.rtmp.youtube.com/live2/{stream_key};
# Twich
# push rtmp://ingest.global-contribute.live-video.net/app/{stream_key};
}
}}
```
## Find the Rtmp Server Urls of the platform you wantUrls for [Twich](https://help.twitch.tv/s/twitch-ingest-recommendation?language=en_US)
Url for youtube:
```text
push rtmp://a.rtmp.youtube.com/live2/
```# Starting the bot
```terminal
python3 main.py
```# Bot Commands
**/stop =** stop the stream and change the token
**/start =** generate a new token and start the nginx service
**/reload =** reload the nginx service
**/get_token =** get the current token
**/help =** get help for the commands# Usage
Setup the bot and start it
After starting the bot with the appropriate command go to the OBS settings, then go to Stream section, select custom in the Service selector, now, in the Server textbox insert:
```
rtmp:///
```
Then if you configured correctly when you start your livestream the video streaming should be re-sent to the selected platforms