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 Library for Secp256k1 Bitcoin curve to do fast ECC calculation

secp256k1 Python Library for Secp256k1 Bitcoin curve to do fast ECC calculation Example Usage import secp256k1 as ice print('[C]',privatekey_to_addres

iceland 49 Jan 01, 2023
A simple Facebook Account generator, written in python (needs different Email so Accounts do not get banned)

FacebookAccountGenerator FAB is a Facebook-Account generating script, written in python Installation Use the package manager pip to install selenium p

MrOverload 7 Jan 05, 2023
A python api to get info on covid-19

A python api to get info on covid-19

roof 2 Sep 18, 2022
This is a discord bot, which tells you food recipes.

Discord Chef Bot You have a friend, familiy or other group / channel where the topic is the food? You cannot really decide what's for Saturday lunch?

2 Apr 25, 2022
livestream-chat: Overlay para chats de livestreams

livestream-chat Overlay para chats de livestreams. Inicialmente para rodar dentro do browser do obs-studio. TODO: Issues iniciais Suporte a API do You

Eduardo Mendes 10 Dec 16, 2022
Python client library for Postmark API

Postmarker Python client library for Postmark API. Gitter: https://gitter.im/Stranger6667/postmarker Installation Postmarker can be obtained with pip:

Dmitry Dygalo 109 Dec 13, 2022
A Telegram Bot Plays With Words!!!

TheWordzBot ➠ I Can Turn Text Into Audio ➠ I Can Get Results From Dictionary ➠ I Can Make Google Search For You ➠ I Can Suggest Strong Passwords For Y

RAVEEN KUMAR 8 Feb 28, 2022
A simple tool which automate commands of discord economy bots

A simple tool which automate commands of discord economy bots. Fully configurable using an intuitive configuration made in YAML

SkydenFly 5 Sep 18, 2022
Ulaavi for nuke, helps to keep our stocl elements organised.

Ulaavi Ulaavi for nuke, helps to keep our stock elements organised. Installation Downlaod ffmpeg from ffmpeg.org linux : https://johnvansickle.com/ffm

Arun Subramaniyam 17 Aug 24, 2022
A Telegram Bot written in Python for mirroring files on the Internet to Google Drive

No support is going to be provided of any kind, only maintaining this for vps user on request. This is a Telegram Bot written in Python for mirroring

0 Dec 26, 2021
Simple-nft-tutorial - A simple tutorial on making nft/memecoins on algorand

nft/memecoin Tutorial on Algorand Let's make a simple NFT/memecoin on the Algora

2 Feb 05, 2022
The Best Telegram UserBot Made With Pyrogram [Python]

Asterix UserBot A Powerful Telegram userbot based on Pyrogram. How To Deploy Asterix Heroku Railway Qovery Termux Tutorial Railway Deploy Comming Soon

TeamAsterix 9 Oct 17, 2022
A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan

Save Restricted Content Bot A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan. Variables API_ID API_HAS

Mahesh Chauhan 532 Jan 02, 2023
Freqtrade 3commas wrapper for python

Freqtrade 3commas wrapper The aim of this project is to provide an easy way to integrate freqtrade with 3commas. The main reason someone would want to

Alex Babescu 43 Dec 17, 2022
Python bot for send videos of a Youtube channel to a telegram group , channel or chat

py_youtube_to_telegram Usage: If you want to install ytt and use it, run this command: sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/nima

Nima Fanniasl 8 Nov 22, 2022
A simple Telegram bot which handles images in whole different way

zeroimagebot thezeroimagebot 🌟 I Can Edit Dimension Of An image which is required by @stickers 🌟 I Can Extract Text From An Image 🌟 !!! New Updates

RAVEEN KUMAR 4 Jul 01, 2021
Fetch tracking numbers of Amazon orders, for the ease of the logistics.

Amazon-Tracking-Number Fetch tracking numbers of Amazon orders, for the ease of the logistics. Read Me First (How to use this code): Get Amazon "Items

Tony Yao 1 Nov 02, 2021
Модуль для создания скриптов для ВКонтакте | vk.com API wrapper

vk_api vk_api – Python модуль для создания скриптов для ВКонтакте (vk.com API wrapper) Документация Примеры Чат в Telegram Документация по методам API

Kirill 1.2k Jan 04, 2023
Example code for interacting with solana anchor programs - candymachine

candypy example code for interacting with solana anchor programs - candymachine THIS IS PURELY SAMPLE CODE TO FORK, MODIFY, UNDERSTAND AND INTERACT WI

dubbelosix 3 Sep 18, 2022
UP It is a script to notify of a new update of your project, done in python and using GitHub, to modify the versions to notify users.

UP-Updater UP It is a script to notify of a new update of your project, done in python and using GitHub, to modify the versions to notify users. Requi

Made in 4 Oct 28, 2021