video-stream/README.md

160 lines
7.0 KiB
Markdown
Raw Normal View History

2021-09-09 01:18:24 +00:00
<h2 align="centre">VIDEO STREAM BOT</h2>
2021-09-13 09:13:29 +00:00
telegram bot project for streaming video on telegram video chat, powered by [py-tgcalls](https://github.com/pytgcalls/pytgcalls) and [pyrogram](https://github.com/pyrogram/pyrogram)
2021-09-09 01:18:24 +00:00
<p align="center"><a href="https://t.me/veezvidstreambot"><img src="https://telegra.ph/file/4e8717d59d74412cf0e50.jpg" width="300"></a></p>
<p align="center">
<a href="https://www.python.org/" alt="made-with-python"> <img src="https://img.shields.io/badge/Made%20with-Python-black.svg?style=flat-square&logo=python&logoColor=blue&color=red" /></a>
<a href="https://github.com/levina-lab/video-stream/graphs/commit-activity" alt="Maintenance"> <img src="https://img.shields.io/badge/Maintained%3F-yes-red.svg?style=flat-square" /></a>
<a href="https://app.codacy.com/gh/levina-lab/video-stream/dashboard"> <img src="https://img.shields.io/codacy/grade/a723cb464d5a4d25be3152b5d71de82d?color=red&logo=codacy&style=flat-square" alt="Codacy" /></a><br>
<a href="https://github.com/levina-lab/video-stream"> <img src="https://img.shields.io/github/repo-size/levina-lab/video-stream?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
<a href="https://github.com/levina-lab/video-stream/commits/main"> <img src="https://img.shields.io/github/last-commit/levina-lab/video-stream?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
<a href="https://github.com/levina-lab/video-stream/issues"> <img src="https://img.shields.io/github/issues/levina-lab/video-stream?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
<a href="https://github.com/levina-lab/video-stream/network/members"> <img src="https://img.shields.io/github/forks/levina-lab/video-stream?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
<a href="https://github.com/levina-lab/video-stream/network/members"> <img src="https://img.shields.io/github/stars/levina-lab/video-stream?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
</p>
## 🛠 Commands:
2021-09-10 11:07:29 +00:00
- /vplay (reply to video/give yt url) - to start video streaming
- /vstop - to stop video streaming
2021-09-09 01:18:24 +00:00
- /song (song name) - to download song
- /vsong (video name) - to download video
2021-09-10 14:11:19 +00:00
- /vjoin - invite the assistant join to your group
- /vleave - order the assistant to leave from your group
2021-09-09 01:18:24 +00:00
- /lyric (query) - lyric scrapper
- /tts (reply to text) - text to speech
- /alive - check the bot alive status
- /ping - check the bot ping status
- /uptime - check the bot uptime status
- /sysinfo - show the bot system information
2021-09-10 14:12:44 +00:00
## 🧙🏻‍♂️ Sudo Only:
2021-09-10 14:11:19 +00:00
- /rmd - clear all downloaded files
- /rmw - clear all downloaded raw files
- /leaveall - order the assistant to leave from all group
2021-09-09 01:18:24 +00:00
📝 Note: From now, /vstream & /vstop command can only be used by group admins.
## 🧪 Get STRING_SESSION from below:
TAP THIS: [![GenerateString](https://img.shields.io/badge/repl.it-generateString-yellowgreen)](https://replit.com/@levinalab/StringSession#main.py)
## 💜 Deploy To Heroku
2021-09-09 01:18:24 +00:00
The easy way to host this bot, deploy to Heroku
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/levina-lab/video-stream)
## 🚄 Deploy To Railway
2021-09-09 01:18:24 +00:00
[![Deploy+on+Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https://github.com/levina-lab/video-stream&envs=API_ID,API_HASH,BOT_TOKEN,BOT_USERNAME,ASSISTANT_NAME,SESSION_NAME,SUDO_USERS,DURATION_LIMIT)
## 🌀 Run On Workflows
- fork this repository
- Go to your forked repository settings
- Scroll down and select the `secrets` tab
- Click on `New repository secret` button
- Add the environmental vars as mentioned here
- Then create new file with structure `.github/workflows/run.yml`
- Now in `run.yml` file, fill with this code below, just copy it and paste in `run.yml` file
2021-09-13 19:03:11 +00:00
<details>
<summary>
<b>View code</b>
</summary>
```sh
name: Run on workflows
on:
schedule:
- cron: "0 */6 * * *"
push:
branches: [ main ]
workflow_dispatch:
env:
API_ID: "${{ secrets.API_ID }}"
API_HASH: "${{ secrets.API_HASH }}"
SESSION_NAME: "${{ secrets.SESSION_NAME }}"
BOT_USERNAME: "${{ secrets.BOT_USERNAME }}"
ASSISTANT_NAME: "${{ secrets.ASSISTANT_NAME }}"
DURATION_LIMIT: "${{ secrets.DURATION_LIMIT }}"
BOT_TOKEN: "${{ secrets.BOT_TOKEN }}"
SUDO_USERS: "${{ secrets.SUDO_USERS }}"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: beta
- uses: styfle/cancel-workflow-action@0.9.0
name: "Cancelling duplicate workflow runs"
with:
all_but_latest: true
access_token: ${{ github.token }}
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Set up Python 3.9
uses: actions/setup-python@v2.2.2
with:
python-version: 3.9
- name: cloning repo and install
continue-on-error: true
run: |
sudo apt -qq update && sudo apt -qq install -y --no-install-recommends ffmpeg neofetch
pip3 install -r requirements.txt
# echo "API_ID=${{ secrets.API_ID }} | tee .env
# echo "API_HASH=${{ secrets.API_HASH }} | tee -a .env
# echo "BOT_USERNAME=${{ secrets.BOT_USERNAME }} | tee -a .env
# echo "ASSISTANT_NAME=${{ secrets.ASSISTANT_NAME }} | tee -a .env
# echo "SESSION_NAME=${{ secrets.SESSION_NAME }} | tee -a .env
# echo "DURATION_LIMIT=${{ secrets.DURATION_LIMIT }} | tee -a .env
# echo "SUDO_USERS=${{ secrets.SUDO_USERS }} | tee -a .env
# echo "BOT_TOKEN=${{ secrets.BOT_TOKEN }} | tee -a .env || echo "Proceeding with bot"
# cat .env
- name: Running
timeout-minutes: 350
continue-on-error: true
run: |
python3 -m bot
echo "Bot Died"
```
2021-09-13 19:03:11 +00:00
</details>
- After adding all, Go to the Actions tab and start/run the workflows
2021-09-09 01:18:24 +00:00
## VPS Deployment
```sh
- sudo apt update && upgrade -y
- sudo apt install python3-pip -y virtualenv
- sudo apt install ffmpeg -y
2021-09-09 06:07:11 +00:00
- nvm install v16.5.0
- npm i -g npm
2021-09-09 01:18:24 +00:00
- git clone https://github.com/levina-lab/video-stream
- cd video-stream
- virtualenv venv #Create Virtual Environment.
- source venv/bin/activate #Activate Virtual Environment
- pip3 install --upgrade pip
- pip3 install -U -r requirements.txt
- cp -r sample.env local.env
- nano local.env #Fill it with your variables value.
- python3 -m bot
```
# Special Credits 💖
- [Levina](https://github.com/levina-lab) Dev
2021-09-10 04:01:09 +00:00
- [Sammy-XD](https://github.com/Sammy-XD) Dev
2021-09-13 14:05:21 +00:00
- [Zxce3](https://github.com/Zxce3) Dev
2021-09-13 09:13:29 +00:00
- [Laky's](https://github.com/Laky-64) for [pytgcalls](https://github.com/MarshalX)
2021-09-09 01:18:24 +00:00
- [Dan](https://github.com/delivrance) for [Pyrogram](https://github.com/pyrogram)
### Support & Updates 🎑
<a href="https://t.me/VeezSupportGroup"><img src="https://img.shields.io/badge/Join-Group%20Support-blue.svg?style=for-the-badge&logo=Telegram"></a> <a href="https://t.me/levinachannel"><img src="https://img.shields.io/badge/Join-Updates%20Channel-blue.svg?style=for-the-badge&logo=Telegram"></a>