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
Python package for agilex robotics mobile base platform

This is Python API for Agilex Robotics Mobile base This is a python API for Can communication with Agilex Robotics Mobile base and controlling it. Sup

7 Sep 06, 2022
Checks instagram names to see if they're available

How to install You must have python 3.7.6 installed and make sure you click the 'ADD TO PATH' option when installing Open cmd and type pip install aio

2 Oct 20, 2021
Ciclo 1 - MisiónTIC - UIS (Retos)

misiontic_uis Ciclo 1 - MisiónTIC - UIS Reto 1: Fundamentos del Lenguaje Python Reto 2: Estructuras de Control Condicional Reto 3: Estructuras de Cont

9 May 24, 2022
domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time.

domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time

Naufal Ardhani 59 Dec 04, 2022
Telegram RAT written in Python

teleRAT Python based RAT that uses Telegram for sending commands and receiving data to and from a victim computer. Setup.py Insert your API key into t

96 Jan 01, 2023
Work with the AWS IP address ranges in native Python.

Amazon Web Services (AWS) publishes its current IP address ranges in JSON format. Python v3 provides an ipaddress module in the standard library that allows you to create, manipulate, and perform ope

AWS Samples 9 Aug 25, 2022
A Twitch bot to provide information from the WebNowPlayingCompanion extension

WebNowPlayingTwitch A Twitch bot made using TwitchIO which displays information obtained from the WebNowPlaying Compaion browser extension. Image is o

NiceAesth 1 Mar 21, 2022
Instagram Brute force attack helps you to find password of an instagram account from your list of provided password.

Instagram Brute force attack Instagram Brute force attack helps you to find password of an instagram account from your list of provided password. Inst

Naman Raj Singh 1 Dec 27, 2021
Robust and blazing fast open-redirect vulnerability scanner with ability of recursevely crawling all of web-forms, entry points, or links with data.

After Golismero project got dead there is no more any up to date open-source tool that can collect links with parametrs and web-forms and then test th

railway zeppelin 34 Aug 25, 2022
A bot for Large Fry Larrys

GroupMe Bot Driver This driver is written entirely in Python, and with easy configuration in mind. Using this driver, you'll be able to monitor multip

1 Oct 25, 2021
A Python script to backup all repos (public or private) of a user.

GithubBackupAllRepos A Python script to backup all repos (public or private) of a user. Features Clone public and private repos Load specified SSH key

Podalirius 15 Jan 03, 2023
Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar seu próprio token, e lembrando, é um bot básico, não se utiliza Cogs nem slash commands nele!

BotDiscordPython Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar s

Matheus Muguet 4 Feb 05, 2022
A simple test repo created following docker docs.

docker_sampleRepo A simple test repo created following docker docs. Link to docs: https://docs.docker.com/language/python/develop/ Other links: https:

Suraj Verma 2 Sep 16, 2022
a discord bot coded in Python which shows news based on the term searched by the user

Noah Miller v1.0 a discord bot coded in Python which shows news based on the term searched by the user Add the bot to your server About This is a disc

klevr 3 Nov 08, 2021
Discord bot developed by Delhi University Student Community!

DUSC-Bot Discord bot developed by Delhi University Student Community! Libraries Used Pycord - Documentation Features Can purge messages in bulk Drop-D

professor 1 Jan 29, 2022
A corona statistics and information telegram bot.

A corona statistics and information telegram bot.

Fayas Noushad 15 Oct 21, 2022
StringSessionGenerator - A Telegram bot to generate pyrogram and telethon string session

⭐️ String Session Generator ⭐️ Genrate String Session Using this bot. Made by TeamUltronX 🔥 String Session Demo Bot: Environment Variables Mandatory

TheUltronX 1 Dec 31, 2021
gnosis safe tx builder

Ape Safe: Gnosis Safe tx builder Ape Safe allows you to iteratively build complex multi-step Gnosis Safe transactions and safely preview their side ef

228 Dec 22, 2022
Wrapper for wttr.in weather forecast.

pywttr Wrapper for wttr.in weather forecast. Asynchronous version here. Installation pip install pywttr Example This example prints the average temper

Almaz 6 Dec 25, 2022
Archive tweets and make them searchable

Tweeter Archive and search your tweets and liked tweets using AWS Lambda, DynamoDB and Elasticsearch. Note: this project is primarily being used a tes

Kamil Sindi 8 Nov 18, 2022