/VideoPlayerBot463

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Telegram Video Player Bot (Py-TgCalls)

GitHub Repo stars GitHub forks GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests GitHub contributors GitHub repo size GitHub commit activity GitHub Bot Updates Bot Support

An Telegram Bot By @AsmSafone To Stream Videos In Telegram Voice Chat Of Both Groups & Channels. Supports Live Streams, YouTube Videos & Telegram Media !!

Special Features

  • Playlist, queue, 24x7 live stream
  • Supports Live streaming from youtube
  • Starts live stream if no songs in playlist
  • Automatic playback even if heroku restarts
  • Show current playing position of the audio
  • Change Voice chat title to current playing song name
  • Automatically downloads audio for the first two tracks in the playlist to ensure smooth playing

Deploy Own Bot

Heroku (The Easiest Way)

Railway (At Your Own Risk)

Config Vars

  1. API_ID : User Account Telegram API_ID, get it from https://my.telegram.org
  2. API_HASH : User Account Telegram API_HASH, get it from https://my.telegram.org
  3. BOT_TOKEN : Your Telegram Bot Token, get it from @Botfather XD
  4. SESSION_STRING : Pyrogram Session String of User Account, get it from @genStr robot or genStr
  5. CHAT_ID : ID of Channel or Group where the bot will stream videos.
  6. LOG_GROUP : Group to send Playlist, if CHAT_ID is a Group.
  7. AUTH_USERS : ID of Users who can use Admins commands (for multiple users seperated by space).
  8. REPLY_MESSAGE : A reply to those who message the USER account in PM. Leave it blank if you do not need this feature.
  9. ADMIN_ONLY : Pass 'True' If you want to make /play commands only for admins. By default /play is available for all.
  10. STARTUP_STREAM : Stream URL of live station or a youtube live video to stream when the bot starts.
  11. HEROKU_API_KEY: Your Heroku api key. Get it from here
  12. HEROKU_APP_NAME: Name of your Heroku app if deploying to heroku.
  13. IS_NONSTOP_STREAM: Change it to 'False' If you want to disable nonstop 24x7 live stream feature. By default it is enabled.

Requirements

Self Host

$ git clone -b alpha https://github.com/AsmSafone/VideoPlayerBot
$ cd VideoPlayerBot
$ sudo apt install git curl python3-pip ffmpeg -y
$ pip3 install -U pip
$ curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
$ sudo apt install -y nodejs
$ sudo apt install build-essential
$ sudo npm install pm2@latest -g
$ pip3 install -U -r requirements.txt
# <create .env variables appropriately>
$ python3 main.py

License

VideoPlayerBot, Telegram Video Chat Bot
Copyright (c) 2021  Asm Safone <https://github.com/AsmSafone>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

Credits