Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Overview

VCPlayerBot

GitHub Repo stars GitHub issues GitHub pull requests GitHub contributors GitHub forks

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media.

Config Vars:

Mandatory Vars

  1. API_ID : Get From my.telegram.org
  2. API_HASH : Get from my.telegram.org
  3. BOT_TOKEN : @Botfather
  4. SESSION_STRING : Generate From here GenerateStringName
  5. CHAT : ID of Channel/Group where the bot plays Music.

Optional Vars

  1. LOG_GROUP : Group to send Playlist, if CHAT is a Group()
  2. ADMINS : ID of users who can use admin commands.
  3. STARTUP_STREAM : This will be streamed on startups and restarts of bot. You can use either any STREAM_URL or a direct link of any video or a Youtube Live link. You can also use YouTube Playlist.Find a Telegram Link for your playlist from PlayList Dumb or get a PlayList from PlayList Extract. The PlayList link should in form https://t.me/DumpPlaylist/xxx.
  4. REPLY_MESSAGE : A reply to those who message the USER account in PM. Leave it blank if you do not need this feature.
  5. ADMIN_ONLY : Pass Y If you want to make /play command only for admins of CHAT. By default /play is available for all.
  6. HEROKU_API_KEY: Your heroku api key. Get one from here
  7. HEROKU_APP_NAME: Your heroku apps name.

Requirements

  • Python 3.8 or Higher.
  • FFMpeg.

Deploy to Heroku

Deploy

Deploy to Railway

Deploy to VPS

git clone https://github.com/subinps/VCPlayerBot
cd VCPlayerBot
pip3 install -r requirements.txt
# 
   
python3 main.py

Features

  • Playlist, queue.
  • Supports Play from Youtube Playlist.
  • Change VoiceChat title to current playing song name.
  • Supports Live streaming from youtube
  • Play from telegram file supported.
  • Starts Radio after if no songs in playlist.
  • Automatically downloads audio for the first two tracks in the playlist to ensure smooth playing
  • Automatic restart even if heroku restarts.
  • Support exporting and importing playlist.

Note

Note To A So Called Dev:

Kanging this codes and and editing a few lines and releasing a V.x of your repo wont make you a Developer. Fork the repo and edit as per your needs.

LICENSE

CREDITS

Comments
  • BUGS IN THE /play COMMAND AND /cplay COMMAND

    BUGS IN THE /play COMMAND AND /cplay COMMAND

    I AM THE OWNER OF THE BOT. I CREATED THE BOT USING YOUR REPO. I FORWARDED A FILE FROM A CHANNEL AND I SEND IT TO THE BOT. I REPLIED THAT FILE BY PLAY COMMAND. IT REPLIED "🔈 Playlist is empty. Streaming STARTUP_STREAM (https://youtu.be/8NzYo0jmYek) ". SO I THOUGHT THAT IT IS A BUG DUE TO MY NETWORK PROBLEM. BUT AFTER SOME TIME I TRIED IT AGAIN, SAME REPLY. I DO KNOW WHAT TO DO ! THEN I WENT TO MOBILE AND OPENED THE BOT FROM ANOTHER TG ACCOUNT WHICH I AM AN ADMIN IN THE BOT. I TRIED THE SAME . I WAS VERY SHOCKED TO SEE IT IS WORKING. I WONDERED WHY IT IS WORKING IN MOBILE AND NOT IN MY LAPTOP. THEN I TRIED ANOTHER WAY. I OPENED MY ANOTHER ACCOUNT IN TG IN LAP. I TRIED THE SAME , BUT NOT WORKING. [ NOTE :- THE SECOND ACCOUNT IN MY LAP IS NOT AN ADMIN OF THE BOT ] SO, IT IS WORKING ONLY IN MOBILE. I USED THE "fplay" COMMAND TOO. BUT IT IS NOT WORKING

    1. C PLAY COMMAND IS NOT WORKING PROPERLY. I GAVE CPLAY COMMAND AND THE CHANNEL ID. IT WAS WORKING. BUT THE FILES ORDER IN THAT CHANNEL WHICH I UPLOADED AND THE STREAMING ORDER IS NOT WORKING PROPERLY.

    PLEASE TRY TO FIX THESE ERRORS [ I DO KNOW IT IS A ERROR OR BUG ] OR BUGS ASAP,. YOURS TRULY, YOUR FOLLOWER AND FAN.

    FIND ME IN TG : V.SHREERAM

    opened by ghost 10
  • Can't schedule live streams using VCPlayer

    Can't schedule live streams using VCPlayer

    Hello @subinps , I'm right here to tell about a problem in VCPlayer. I'm trying to schedule a live stream in our channel using Good Day Channel: By Nava Live bot. It's showing “Succesfully scheduled to stream on Nov 04 2021, 10:00 AM”. But, in my channel, it's not really showing as “Live stream scheduled in Nov 04, 10:00”. It's not really scheduling. I've tried to cancel the stream, and rescheduled it. I've restarted it. But, still it didn't scheduled in my channel. Please fix this issue.

    opened by Navaneeth-Renjith 3
  • ModuleNotFoundError: No module named 'pytgcalls.types'

    ModuleNotFoundError: No module named 'pytgcalls.types'

    Hi There, just trying out your application, getting a python exception

    Python 3.7.3 (default, Jan 22 2021, 20:04:44)

    Successfully installed Pyrogram-1.2.9 aiohttp-3.7.4.post0 anyio-3.3.1 async-lru-1.0.2 async-timeout-3.0.1 attrs-21.2.0 bidict-0.21.3 charset-normalizer-2.0.4 ffmpeg-python-0.2.0 future-0.18.2 h11-0.12.0 httpcore-0.13.6 httpx-0.19.0 multidict-5.1.0 psutil-5.8.0 py-tgcalls-0.6.0 pyaes-1.6.1 pysocks-1.7.1 python-engineio-4.2.1 python-socketio-5.4.0 rfc3986-1.5.0 sniffio-1.2.0 tgcrypto-1.2.2 typing-extensions-3.10.0.2 yarl-1.6.3 youtube-search-2.1.0 youtube-search-python-1.4.7

    Traceback (most recent call last):
      File "main.py", line 16, in <module>
        from utils import start_stream
      File "/home/aurax/VCPlayerBot/utils.py", line 16, in <module>
        from pytgcalls.types.input_stream import InputAudioStream, InputVideoStream, AudioParameters, VideoParameters
    ModuleNotFoundError: No module named 'pytgcalls.types'
    
    
    opened by talhazan 3
  • Some files are not playing in DC 6!

    Some files are not playing in DC 6!

    Hello @subinps, I've checked some videos in my Telegram channel, Good Day Channel: By Nava to play with bot. But, unfortunately, the videos in my channel isn't playing with DC 6. I've also checked another Telegram file to play it. But, not playing in DC 6... So, I want to wait for some time to download the video and play it... 🙁 Bot Logs

    opened by Navaneeth-Renjith 1
  • Can't schedule live streams using VCPlayer

    Can't schedule live streams using VCPlayer

    Hello @subinps bro , I'm right here to tell about a problem in VCPlayer. I'm trying to schedule a live stream in our channel using Good Day Channel: By Nava Live bot. It's showing “Succesfully scheduled to stream on Nov 04 2021, 10:00 AM”. But, in my channel, it's not really showing as “Live stream scheduled in Nov 04, 10:00”. It's not really scheduling. I've tried to cancel the stream, and rescheduled it. I've restarted it. But, still it didn't scheduled in my channel. Please fix this issue.

    opened by ghost 1
  • Songs not playing

    Songs not playing

    It aint playing anying and when i checked my logs it was stuck at this whenever i tried to play something - "[youtube] a-iZH8x0w0E: Downloading android player API JSON" please help

    opened by Swizz36 1
  • Account genused for Session String not found

    Account genused for Session String not found

    Development mode is activated when i run the bot. It says like this - "The user account by which you generated the SESSION_STRING is not found on CHAT (channel id)" please help

    opened by Swizz36 1
  • Feed back

    Feed back

    IMG_20211024_205634_316.jpg Plz add option too.turn this off and on... And plz add this feature...all are requesting for this 3 grups....currently Also Make a vcadminlilst viewable cmd And cmds to edit vars plzzzzzz update

    opened by ghost 1
  • Automatically changing to radio

    Automatically changing to radio

    I deployed this bot in my grup where radioplay automatically that's very disturbing to others because they don't know the language that and they don't need radio so I need a feature where it automatically stops or leave the group immediately after finishing the finishing the song list or a the last song.... which is requested

    opened by ghost 1
  • startup error

    startup error

    vc_1  | [01-Jul-22 06:33:26 - ERROR] - utils.logger - Startup was unsuccesfull, Errors - 
    vc_1  | Traceback (most recent call last):
    vc_1  |   File "/VCPlayerBot/main.py", line 70, in main
    vc_1  |     await group_call.start()
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/pytgcalls/methods/utilities/start.py", line 38, in start
    vc_1  |     await self._start_binding()
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/pytgcalls/methods/core/binding_runner.py", line 37, in _start_binding
    vc_1  |     await PyTgCallsSession().start()
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/pytgcalls/pytgcalls_session.py", line 23, in start
    vc_1  |     remote_stable_ver = await self._remote_version('master')
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/pytgcalls/pytgcalls_session.py", line 54, in _remote_version
    vc_1  |     await get_async(
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/pytgcalls/pytgcalls_session.py", line 47, in get_async
    vc_1  |     response: ClientResponse = await session.get(url, timeout=5)
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 634, in _request
    vc_1  |     break
    vc_1  |   File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 721, in __exit__
    vc_1  |     raise asyncio.TimeoutError from None
    vc_1  | asyncio.exceptions.TimeoutError
    vc_1  | [01-Jul-22 06:33:26 - INFO] - utils.logger - Activating debug mode, you can reconfigure your bot with /env command.
    
    
    opened by jw-star 1
  • Timezone

    Timezone

    ~/VCPlayerBot# python3 main.py Traceback (most recent call last): File "/root/VCPlayerBot/main.py", line 15, in from utils import ( File "/root/VCPlayerBot/utils/init.py", line 4, in from .utils import * File "/root/VCPlayerBot/utils/utils.py", line 98, in scheduler = AsyncIOScheduler(jobstores=jobstores) File "/usr/local/lib/python3.9/dist-packages/apscheduler/schedulers/base.py", line 87, in init self.configure(gconfig, **options) File "/usr/local/lib/python3.9/dist-packages/apscheduler/schedulers/base.py", line 131, in configure self._configure(config) File "/usr/local/lib/python3.9/dist-packages/apscheduler/schedulers/asyncio.py", line 54, in _configure super(AsyncIOScheduler, self)._configure(config) File "/usr/local/lib/python3.9/dist-packages/apscheduler/schedulers/base.py", line 701, in _configure self.timezone = astimezone(config.pop('timezone', None)) or get_localzone() File "/usr/local/lib/python3.9/dist-packages/tzlocal/unix.py", line 203, in get_localzone _cache_tz = _get_localzone() File "/usr/local/lib/python3.9/dist-packages/tzlocal/unix.py", line 185, in _get_localzone utils.assert_tz_offset(tz) File "/usr/local/lib/python3.9/dist-packages/tzlocal/utils.py", line 63, in assert_tz_offset raise ValueError(msg) ValueError: Timezone offset does not match system offset: 16200 != 0. Please, check your config files.

    opened by molafir 0
  • RECORDING_DUMP

    RECORDING_DUMP

    Development mode is activated. This occures when there are some errors in startup of the bot. Only Configuration commands works in development mode. Availabe commands are /env, /skip, /clearplaylist and /restart and /logs

    The cause for activation of development mode was

    Startup was unsuccesfull, Errors - Telegram says: [400 USERNAME_INVALID] - The username is invalid (caused by "contacts.ResolveUsername")

    opened by molafir 0
Releases(v2)
  • v2(Oct 3, 2021)

    Updated VCPlayer

    Major Changes: Updated Kanger Note

    Some Other Changes: New Features: Now supports both audio and video. (You can easily shift audio and video mode using /settings) Added ability to turn of the 24/7 play mode.(player will leave the call if playlist is empty) Added Recording Support (An attempt to overcome 4 hour telegram limit is made and may not be stable). You can set up to forward recordings to a channel. Added Schedule stream support (You can schedule a stream use /schedule command) Now you can control the video quality by setting QUALITY var, [high, medium and low] Added MongoDb Database support (This is an optional variable and I recommend you to use the bot with database. Many of features like /record /settings and /schedule needs a mongodb database for proper functioning.) Now you can promote a member to control your vcplayer using /vcpromote and /vcdemote command. Added admin cache to update admin list of chat (/refresh) Implemented a lot of callback buttons for easier configuration and controlling.(try out /volume, /settings, /record) Many variables moved to database, and now doesn't require the player restart. Added option to change CHAT config easily by sending any command in new CHAT.

    Fixes: Fixed /seek command skipping song. Edit title fixed. Fixed Lag while playing telegram files. Fixed Anonymous admins cant use commands. Fixed some errors in /stream command

    Source code(tar.gz)
    Source code(zip)
Owner
SUBIN
NOthInG gRatE
SUBIN
=>|<= the MsgRoom bot for Windows 96

=|= bot A MsgRoom bot in Python 3 for Windows96.net. The bot joins as =|=, if parameter name_lasts is not true and default_name is =|=. The full

Larry Holst 2 Jun 07, 2022
An powerfull telegram group management anime themed bot.

ErzaScarlet Erza Scarlet is the female deuteragonist of the anime/manga series Fairy Tail. She is an S-class Mage from the Guild Fairy Tail. Like most

ꜱōʜᴇʀᴜ ᴋāɴ (AKA) ꜱᴏʜᴀɪʟ ᴋʜᴀɴ 2 May 19, 2022
Available slots checker for Spanish Passport

Bot that checks for available slots to make an appointment to issue the Spanish passport at the Uruguayan consulate page

1 Nov 30, 2021
A pyrogram simple bot for Educational purpose.

A pyrogram simple bot for Educational purpose. To Learn More check at @PyrogramBot or on Documentation Mandatory variables API_ID - Get It From my.tel

SpamShield 10 Dec 06, 2022
Unofficial instagram API, give you access to ALL instagram features (like, follow, upload photo and video and etc)! Write on python.

Instagram-API-python Unofficial Instagram API to give you access to ALL Instagram features (like, follow, upload photo and video, etc)! Written in Pyt

Vladimir Bezrukov 1 Nov 19, 2021
Python Twitter API

Python Twitter Tools The Minimalist Twitter API for Python is a Python API for Twitter, everyone's favorite Web 2.0 Facebook-style status updater for

Mike Verdone 2.9k Jan 03, 2023
Buscar y descargar canciones de YouTube automáticamente desde la web

🎶 DescargarCanciones 🎶 Buscar y descargar canciones o playlist de Spotify o YouTube automáticamente con todos los metadatos de la canciones en forma

1 Dec 20, 2021
BanAllBot - Telegram Code To Ban All Group Members very fast

BanAllBot Telegram Code To Ban All Group Members very fast FORK AND KANG WITH CR

27 May 13, 2022
Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Alexandr Savinov 326 Jan 03, 2023
A surviv.io bot that helps you manage you clan in surviv.io!

Scooter-Surviv.io-Clan-Bot A Surviv.io Discord Bot This is a bot that helps manage your surviv.io clan! Read below for more!!. Features Lets you creat

cosmic|duck 1 Jan 03, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Dec 07, 2021
Creates Spotify playlists from Spinitron playlists.

spin2spot Creates Spotify playlists from Spinitron playlists. Quick Start You can use spin2spot as a command-line tool: Erik Didriksen 1 Aug 28, 2021

Sielzz Music adalah proyek bot musik telegram, memungkinkan Anda memutar musik di telegram grup obrolan suara.

Hi, I am: Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.8 or higher PyTgCalls MongoDB Get STRING_SESSION from below: 🎖 History Features 🔮 Th

1 Nov 29, 2021
A modern Python client for controlling Wyze devices.

Python Wyze SDK A modern Python client for controlling Wyze devices. Whether you're building a custom app, or integrating into a third-party service l

Shaun Tarves 205 Jan 02, 2023
A Telegram bot to all media and documents files to web link .

FileStreamBot A Telegram bot to all media and documents files to web link . Report a Bug | Request Feature 🍁 About This Bot : This bot will give you

Code X Mania 129 Jan 03, 2023
Source code for "Efficient Training of BERT by Progressively Stacking"

Introduction This repository is the code to reproduce the result of Efficient Training of BERT by Progressively Stacking. The code is based on Fairseq

Gong Linyuan 101 Dec 02, 2022
Python wrapper for Wikipedia

Wikipedia API Wikipedia-API is easy to use Python wrapper for Wikipedias' API. It supports extracting texts, sections, links, categories, translations

Martin Majlis 369 Dec 30, 2022
Hostapd-mac-monitor - Setup a hostapd AP to conntrol the connections of specific MACs

A brief explanation This script provides way to setup a monitoring service of sp

2 Feb 03, 2022
A Bot to get RealTime Tweets to a Specific Chats from Desired Persons on Twitter to Telegram Chat.

TgTwitterStreamer A Bot to get RealTime Tweets to a Specific Chats from Desired Persons on Twitter to Telegram Chat. For Getting ENV's Refer this Link

Anonymous 69 Dec 20, 2022
Minecraft checker

This Project checks if a minecraft account is a nfa/sfa account or invalid it also says you if the ip you are using is shadow banned from minecraft (shadow bann is if you send too many login attempts

baum1810 4 Oct 03, 2022