The original implementation is taken from AsmSafone/RadioPlayerV3
- Radio broadcasting to Telegram channels by stream URL or local playlist (from files)
- Bot interface for playlist managment
Pyrogram session initialization required for streaming to Telegram channels feature, that allowed only for userbot (Telegram user account).
Run script pyrogram_session_gen.py
and follow instructions.
You can deploy application in VDS/VPS or local machine by using Docker.
First create .env
file in source root based on .env.sample
file.
Then run this script from project source root.
$ pip3 install -r requirements.txt
$
$
API_ID
: Get it from https://my.telegram.org/appsAPI_HASH
: Get it from https://my.telegram.org/appsBOT_TOKEN
: Get it from @BotfatherSESSION_NAME
: Name of session generated bypyrogram_session_gen.py
CHAT_ID
: ID of Channel/Group to play radio.CHAT_NAME
: Name (started with @) of Channel/Group to play radio.AUTH_USERS
: ID of Auth Users who can use Admin commands. (for multiple users seperated by space)STREAM_URL
: Stream URL of radio station.
- Python 3.11 or higher.
- Telegram API Key
- FFmpeg Python
- Telegram Pyrogram Session of the account.
- User Accounts Needs To Be An Admin In The Channel or Group.
- Must Start A Voice Chat In Channel/Group Before Running The Bot.
$ git clone https://github.com/AsmSafone/RadioPlayerV3
$ cd RadioPlayerV3
$ sudo apt install git curl python3-pip ffmpeg -y
$ pip3 install -U pip
$ pip3 install -r requirements.txt
# <create .env variables appropriately>
$ python3 main.py