Skip to content

Commit eb84d9f

Browse files
committed
Release V2
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
1 parent 1902203 commit eb84d9f

22 files changed

+3956
-873
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*.session
55
*.session-journal
66
test.py
7+
todo.txt

README.md

+33-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
![GitHub contributors](https://img.shields.io/github/contributors/subinps/VCPlayerBot?style=flat)
77
![GitHub forks](https://img.shields.io/github/forks/subinps/VCPlayerBot?style=flat)
88

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

1111
## Config Vars:
1212
### Mandatory Vars
@@ -15,14 +15,33 @@ Telegram bot to stream videos in telegram voicechat for both groups and channels
1515
3. `BOT_TOKEN` : [@Botfather](https://telegram.dog/BotFather)
1616
4. `SESSION_STRING` : Generate From here [![GenerateStringName](https://img.shields.io/badge/repl.it-generateStringName-yellowgreen)](https://repl.it/@subinps/getStringName)
1717
5. `CHAT` : ID of Channel/Group where the bot plays Music.
18+
19+
## Recommended Optional Vars
20+
21+
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.
22+
2. `HEROKU_API_KEY`: Your heroku api key. Get one from [here](https://dashboard.heroku.com/account/applications/authorizations/new)
23+
3. `HEROKU_APP_NAME`: Your heroku apps name.
24+
1825
### Optional Vars
1926
1. `LOG_GROUP` : Group to send Playlist, if CHAT is a Group()
2027
2. `ADMINS` : ID of users who can use admin commands.
2128
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`.
22-
4. `REPLY_MESSAGE` : A reply to those who message the USER account in PM. Leave it blank if you do not need this feature.
23-
5. `ADMIN_ONLY` : Pass `Y` If you want to make /play command only for admins of `CHAT`. By default /play is available for all.
24-
6. `HEROKU_API_KEY`: Your heroku api key. Get one from [here](https://dashboard.heroku.com/account/applications/authorizations/new)
25-
7. `HEROKU_APP_NAME`: Your heroku apps name.
29+
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.)
30+
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.)
31+
6. `DATABASE_NAME`: Database name for your mongodb database.
32+
7. `SHUFFLE` : Make it `False` if you dont want to shuffle playlists. (Configurable through bot if mongodb added.)
33+
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.)
34+
9. `RECORDING_DUMP` : A Channel ID with the USER account as admin, to dump video chat recordings.
35+
10. `RECORDING_TITLE`: A custom title for your videochat recordings.
36+
11. `TIME_ZONE` : Time Zone of your country, by default IST
37+
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.)
38+
13. `IS_LOOP` ; Make it `False` if you do not want 24 / 7 Video Chat. (Configurable through bot if mongodb added.)
39+
14. `IS_VIDEO` : Make it `False` if you want to use the player as a musicplayer without video. (Configurable through bot if mongodb added.)
40+
15. `PORTRAIT`: Make it `True` if you want the video recording in portrait mode. (Configurable through bot if mongodb added.)
41+
16. `DELAY` : Choose the time limit for commands deletion. 10 sec by default.
42+
18. `QUALITY` : Customize the quality of video chat, use one of `high`, `medium`, `low` .
43+
19. `BITRATE` : Bitrate of audio (Not recommended to change).
44+
20. `FPS` : Fps of video to be played (Not recommended to change.)
2645

2746

2847

@@ -53,20 +72,24 @@ python3 main.py
5372
## Features
5473

5574
- Playlist, queue.
75+
- Supports Video Recording.
76+
- Supports Scheduling voicechats.
77+
- Cool UI for controling the player.
78+
- Customizabe to audio or video.
79+
- Custom quality for video chats.
5680
- Supports Play from Youtube Playlist.
5781
- Change VoiceChat title to current playing song name.
5882
- Supports Live streaming from youtube
5983
- Play from telegram file supported.
6084
- Starts Radio after if no songs in playlist.
61-
- Automatically downloads audio for the first two tracks in the playlist to ensure smooth playing
62-
- Automatic restart even if heroku restarts.
85+
- Automatic restart even if heroku restarts. (Configurable)
6386
- Support exporting and importing playlist.
6487

6588
### Note
6689

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

69-
Kanging this codes and and editing a few lines and releasing a V.x of your repo wont make you a Developer.
92+
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.
7093
Fork the repo and edit as per your needs.
7194

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

77100
## CREDITS
78101

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

82105

app.json

+20-11
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,30 @@
3939
"description": "ID of the group to send playlist If CHAT is a Group, if channel thenleave blank",
4040
"required": false
4141
},
42+
"QUALITY": {
43+
"description": "Default quality of your video player, Use one of high, medium or low.",
44+
"value": "high",
45+
"required": false
46+
},
47+
"DATABASE_URI": {
48+
"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.",
49+
"required": false
50+
},
4251
"ADMINS": {
4352
"description": "ID of Users who can use Admin commands(for multiple users seperated by space)",
4453
"required": true
4554
},
4655
"ADMIN_ONLY": {
47-
"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.",
48-
"value": "Y",
56+
"description": "Change it to True if you want to make /play command available for everyone.",
57+
"value": "False",
58+
"required": false
59+
},
60+
"HEROKU_API_KEY": {
61+
"description": "Your heroku api key, get it from https://dashboard.heroku.com/account/applications/authorizations/new.",
62+
"required": false
63+
},
64+
"HEROKU_APP_NAME": {
65+
"description": "Heroku App Name.",
4966
"required": false
5067
},
5168
"STARTUP_STREAM": {
@@ -64,13 +81,5 @@
6481
"quantity": 1,
6582
"size": "free"
6683
}
67-
},
68-
"buildpacks": [
69-
{
70-
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
71-
},
72-
{
73-
"url": "heroku/python"
74-
}
75-
]
84+
}
7685
}

0 commit comments

Comments
 (0)