Skip to content

Commit

Permalink
Release V2
Browse files Browse the repository at this point in the history
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
  • Loading branch information
subinps committed Oct 3, 2021
1 parent 1902203 commit eb84d9f
Show file tree
Hide file tree
Showing 22 changed files with 3,956 additions and 873 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.session
*.session-journal
test.py
todo.txt
43 changes: 33 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
![GitHub contributors](https://img.shields.io/github/contributors/subinps/VCPlayerBot?style=flat)
![GitHub forks](https://img.shields.io/github/forks/subinps/VCPlayerBot?style=flat)

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media.
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.

## Config Vars:
### Mandatory Vars
Expand All @@ -15,14 +15,33 @@ Telegram bot to stream videos in telegram voicechat for both groups and channels
3. `BOT_TOKEN` : [@Botfather](https://telegram.dog/BotFather)
4. `SESSION_STRING` : Generate From here [![GenerateStringName](https://img.shields.io/badge/repl.it-generateStringName-yellowgreen)](https://repl.it/@subinps/getStringName)
5. `CHAT` : ID of Channel/Group where the bot plays Music.

## Recommended Optional Vars

1. `DATABASE_URI`: MongoDB database Url, get from [mongodb](https://cloud.mongodb.com). This is an optional var, but it is recomonded to use this to experiance the full features.
2. `HEROKU_API_KEY`: Your heroku api key. Get one from [here](https://dashboard.heroku.com/account/applications/authorizations/new)
3. `HEROKU_APP_NAME`: Your heroku apps name.

### 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](https://telegram.dog/DumpPlaylist) or get a PlayList from [PlayList Extract](https://telegram.dog/GetAPlaylistbot). 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](https://dashboard.heroku.com/account/applications/authorizations/new)
7. `HEROKU_APP_NAME`: Your heroku apps name.
4. `REPLY_MESSAGE` : A reply to those who message the USER account in PM. Leave it blank if you do not need this feature. (Configurable through bot if mongodb added.)
5. `ADMIN_ONLY` : Pass `True` If you want to make /play command only for admins of `CHAT`. By default /play is available for all.(Configurable through bot if mongodb added.)
6. `DATABASE_NAME`: Database name for your mongodb database.
7. `SHUFFLE` : Make it `False` if you dont want to shuffle playlists. (Configurable through bot if mongodb added.)
8. `EDIT_TITLE` : Make it `False` if you do not want the bot to edit video chat title according to playing song. (Configurable through bot if mongodb added.)
9. `RECORDING_DUMP` : A Channel ID with the USER account as admin, to dump video chat recordings.
10. `RECORDING_TITLE`: A custom title for your videochat recordings.
11. `TIME_ZONE` : Time Zone of your country, by default IST
12. `IS_VIDEO_RECORD` : Make it `False` if you do not want to record video, and only audio will be recorded.(Configurable through bot if mongodb added.)
13. `IS_LOOP` ; Make it `False` if you do not want 24 / 7 Video Chat. (Configurable through bot if mongodb added.)
14. `IS_VIDEO` : Make it `False` if you want to use the player as a musicplayer without video. (Configurable through bot if mongodb added.)
15. `PORTRAIT`: Make it `True` if you want the video recording in portrait mode. (Configurable through bot if mongodb added.)
16. `DELAY` : Choose the time limit for commands deletion. 10 sec by default.
18. `QUALITY` : Customize the quality of video chat, use one of `high`, `medium`, `low` .
19. `BITRATE` : Bitrate of audio (Not recommended to change).
20. `FPS` : Fps of video to be played (Not recommended to change.)



Expand Down Expand Up @@ -53,20 +72,24 @@ python3 main.py
## Features

- Playlist, queue.
- Supports Video Recording.
- Supports Scheduling voicechats.
- Cool UI for controling the player.
- Customizabe to audio or video.
- Custom quality for video chats.
- 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.
- Automatic restart even if heroku restarts. (Configurable)
- Support exporting and importing playlist.

### Note

[Note To A So Called Dev](https://telegram.dog/GetTGLink/802):
[Note To A So Called Dev](https://telegram.dog/subin_works/203):

Kanging this codes and and editing a few lines and releasing a V.x of your repo wont make you a Developer.
Kanging this codes and and editing a few lines and releasing a V.x or an [alpha](https://telegram.dog/subin_works/204), beta , gama branches of your repo wont make you a Developer.
Fork the repo and edit as per your needs.

## LICENSE
Expand All @@ -76,7 +99,7 @@ Fork the repo and edit as per your needs.

## CREDITS

- [py-tgcalls](https://github.com/pytgcalls/pytgcalls)
- [Laky-64](https://github.com/Laky-64) for [py-tgcalls](https://github.com/pytgcalls/pytgcalls)
- [Dan](https://github.com/delivrance) for [Pyrogram](https://github.com/pyrogram/pyrogram)


31 changes: 20 additions & 11 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,30 @@
"description": "ID of the group to send playlist If CHAT is a Group, if channel thenleave blank",
"required": false
},
"QUALITY": {
"description": "Default quality of your video player, Use one of high, medium or low.",
"value": "high",
"required": false
},
"DATABASE_URI": {
"description": "Mongo DB database URI , get from https://cloud.mongodb.com, even if this is optional, many of functions may not work if this is not set.",
"required": false
},
"ADMINS": {
"description": "ID of Users who can use Admin commands(for multiple users seperated by space)",
"required": true
},
"ADMIN_ONLY": {
"description": "Change it to 'N' if you want to make /play and /dplay available for everyone. By default only admins of CHAT can use it.",
"value": "Y",
"description": "Change it to True if you want to make /play command available for everyone.",
"value": "False",
"required": false
},
"HEROKU_API_KEY": {
"description": "Your heroku api key, get it from https://dashboard.heroku.com/account/applications/authorizations/new.",
"required": false
},
"HEROKU_APP_NAME": {
"description": "Heroku App Name.",
"required": false
},
"STARTUP_STREAM": {
Expand All @@ -64,13 +81,5 @@
"quantity": 1,
"size": "free"
}
},
"buildpacks": [
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
},
{
"url": "heroku/python"
}
]
}
}
Loading

0 comments on commit eb84d9f

Please sign in to comment.