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
📢 Video Chat Stream Telegram Bot. Can ⏳ Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Video Chat Of Channels & Groups !

Telegram Video Chat Bot (Beta) ?? Video Chat Stream Telegram Bot ?? Can Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Vide

brut✘⁶⁹ // ユスフ 15 Dec 24, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media. With record stream support, Schedule streams, and many more.

ALBY 9 Feb 20, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media. With record stream support, Schedule streams, and many more.

SOCIAL MECHANIC 4 Nov 13, 2022
Telegram bot to stream videos in telegram Voice Chat for both groups and channels

Telegram bot to stream videos in telegram Voice Chat for both groups and channels. Supports live steams, YouTube videos and telegram media. Supports scheduling streams, recording and many more.

Akki ThePro 2 Sep 11, 2022
A Telegram Bot to Play Audio in Voice Chats With Youtube and Deezer support. Supports Live streaming from youtube Supports Mega Radio Fm Streamings

Bot To Stream Musics on PyTGcalls with Channel Support. A Telegram Bot to Play Audio in Voice Chats With Supports Live streaming from youtube and Mega

Shamil Habeeb 37 Dec 15, 2022
A Telegram bot to send messages in Telegram groups or Channels using bots anonymously.

Group-chatting-bot A bot to send messeges to group using bot telegram bot ❤️ Support Made with Python3

Pyrogramers 16 Nov 6, 2022
Telegram Userbot to steram youtube live or Youtube vido in telegram vc by help of pytgcalls

TGVCVidioPlayerUB Telegram Userbot to steram youtube live or youtube vidio in telegram vc by help of pytgcalls Commands =>> Vidio Playing ?? stream :

Achu biju 3 Oct 28, 2022
Google Drive, OneDrive and Youtube as covert-channels - Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram

covert-control Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram using Python to create the files and the lis

Ricardo Ruiz 52 Dec 6, 2022
google-resumable-media Apache-2google-resumable-media (🥉28 · ⭐ 27) - Utilities for Google Media Downloads and Resumable.. Apache-2

google-resumable-media Utilities for Google Media Downloads and Resumable Uploads See the docs for examples and usage. Experimental asyncio Support Wh

Google APIs 36 Nov 22, 2022
This bot can mention members upto 10,000 in groups and can mention members upto 200 in channels !

Mention All Bot This bot can mention members upto 10,000 in groups and can mention members upto 200 in channels ! ?? Infomation Language: Python. Tele

Anjana Madu 52 Dec 29, 2022
Add members to unlimited telegram channels and groups

Program Features ?? Coded with Python version 10. ?? without the need for a proxy. ?? without the need for a Telegram ID. ?? Ability to add infinite p

hack4lx 10 Nov 25, 2022
Nyon-stream - A python script that uses webtorrent to stream nyaa videos directly to mpv

nyon-stream A rather shitty script that uses webtorrent to stream nyaa videos di

null 18 Feb 8, 2022
SUPPORTS 500 GROUPS NO NEED OF BOT 😉

LOVELY RADIO SUPPORTS 500 GROUPS NO NEED OF BOT ?? Requirements Telegram API_ID , API_HASH and SESSION_NAME HEROKU Get YouTube live stream link instal

null 6 Nov 24, 2021
An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In @SafoTheBot Group! ❤️

Telegram Video Player Bot (Beta) An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. Special Features Supports Live Streaming From

SAF ONE 206 Jan 3, 2023
A youtube videos or channels tag finder python module

A youtube videos or channels tag finder python module

Fayas Noushad 4 Dec 3, 2021
A telegram media to pixeldrain stream link bot

Pixeldrain-Bot A telegram media to pixeldrain stream link bot Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License -> ht

Fayas Noushad 11 Oct 21, 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
A superb Telegram VoiceChat Player. Powered by FalconRoBo.

?????????????????????? A sᴜᴘᴇʀʙ Tᴇʟᴇɢʀᴀᴍ VᴏɪᴄᴇCʜᴀᴛ Pʟᴀʏᴇʀ, ᴍᴀᴅᴇ ᴜsɪɴɢ Lᴀᴛᴇsᴛ Pʏᴛʜᴏɴ ᴀɴᴅ Pʏʀᴏɢʀᴀᴍ. ?????????????? ???? ???????????????????? FalconMusic

FalconRoBo 2 Oct 21, 2022