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
A python package for AxisVM

PyAxisVM The package is under development. Follow us on social media, where we'll announce the first release! Overview The PyAxisVM project offers a h

AxisVM - InterCAD 8 Nov 19, 2022
Use Node JS Keywords In Python!!!

Use Node JS Keywords In Python!!!

Sancho Godinho 1 Oct 23, 2021
Python Tool To Get The Date That Your Account Joined Instagram

Date-Joined-Insta Python Tool To Get The Date That Your Account Joined Instagram You Dont Need To Login Just Enter The UserName If Id Did Not Work Ins

A B D U L L A H . 1 Dec 21, 2021
This is Source Code of PdiskUploaderBot

PdiskUploaderBot This is the source code of PdiskUploaderBot. And the developer of this bot is AJTimePyro, His Telegram Channel & Group. You can use t

Abhijeet 8 Oct 20, 2022
Guildead - Guilded api wrapper written in python

Guildead Guilded api wrapper written in python. I have found "exploit" (guilded

0хVιcнy#1337 5 Sep 23, 2022
API which uses discord+mojang api to scrape NameMC searches/droptime/dropping status of minecraft names, and texture links

API which uses discord+mojang api to scrape NameMC searches/droptime/dropping status of minecraft names, and texture links

2 Dec 22, 2021
This repository is used to simplify the process of cloning the SSM documents across the AWS regions.

SSM Cloner Introduction This module is created in order to simplify the process of copying the SSM documents from one region to another regions. As an

6 Jun 04, 2022
CnCL - CnCLess it's an Easy to deploy Botnet without CnC/C2

CnCL CnCLess it's an Easy to deploy Botnet without CnC/C2, Harder to track and t

ZSendokame 2 Jan 10, 2022
A modular dynamical-systems model of Ethereum's validator economics.

CADLabs Ethereum Economic Model A modular dynamical-systems model of Ethereum's validator economics, based on the open-source Python library radCAD, a

CADLabs 104 Jan 03, 2023
A replacement for Reddit /r/copypasta CummyBot2000 with extra measures to avoid it being banned.

CummyBot1984 A replacement for Reddit /r/copypasta's CummyBot2000 with extra measures to respect Reddit's API rules. Features Copies and replies to ev

2 Feb 21, 2022
BingBot - A bot that will automate searches on bing

bingBot A bot that will automate searches on bing. To install this just download

Lukas 2 Jul 28, 2022
Ini Hanya Shortcut Untuk Menambahkan Kunci Tambahan Pada Termux & Membantu Para Nub Yang Decode Script Orang:v

Ini Hanya Shortcut Untuk Menambahkan Kunci Tambahan Pada Termux & Membantu Para Nub Yang Decode Script Orang:v

Lord_Ammar 1 Jan 23, 2022
A simple telegram Bot, Upload Media File| video To telegram using the direct download link. (youtube, Mediafire, google drive, mega drive, etc)

URL-Uploader (Bot) A Bot Upload file|video To Telegram using given Links. Features: 👉 Only Auth Users (AUTH_USERS) Can Use The Bot 👉 Upload YTDL Sup

Hash Minner 18 Dec 17, 2022
Telegram-Discord Bridge

imperial-toilet Скрипт, пересылающий сообщения из нескольких каналов Telegram в один/несколько каналов Discord. Технически это Telegram-юзербот и Disc

1 Jan 17, 2022
A simple Python wrapper for the archive.is capturing service

archiveis A simple Python wrapper for the archive.is capturing service. Installation pipenv install archiveis Python Usage Import it. import archi

PastPages 157 Dec 28, 2022
this repo store a Awoesome telegram bot for protect from your large group from bot attack.

this repo store a Awoesome telegram bot for protect from your large group from bot attack.

Mehran Alam Beigi 2 Jul 22, 2022
Simple stock price analytics

mune · Mune is an open source python web application built to analyze stocks, named after Homma Munehisa. Currently, the forecasting component is powe

Richard Hong 14 Aug 30, 2021
Repositório para a Live Coding do dia 22/12/2021 sobre AWS Step Functions

DIO Live Step Functions - 22/12/2021 Serviços AWS utilizados AWS Step Functions AWS Lambda Amazon S3 Amazon Rekognition Amazon DynamoDB Amazon Cloudwa

Cassiano Ricardo de Oliveira Peres 5 Mar 01, 2022
Wrapper for shh/rsync for use with OpenFOAM and blue bear

bbsync wrapper for shh/rsync for use with OpenFOAM and blue bear About The Project bbsync is a wrapper for shh/rsync for use with OpenFOAM and blue be

1 Dec 10, 2021
Easily report Instagram pages and close the page

Program Features - 📌 Delete target post on Instagram. - 📌 Delete Media Target post on Instagram - 📌 Complete deletion of the target account on Inst

hack4lx 11 Nov 25, 2022