https://github.com/nezort11/video-translate-bot
πΊππ£οΈπ FULL video translation (output mp4) via Telegram bot, works for video, audio and voice (everything is free & self-hostable)
https://github.com/nezort11/video-translate-bot
bot telegram translation video video-translation voice-over wasm
Last synced: over 1 year ago
JSON representation
πΊππ£οΈπ FULL video translation (output mp4) via Telegram bot, works for video, audio and voice (everything is free & self-hostable)
- Host: GitHub
- URL: https://github.com/nezort11/video-translate-bot
- Owner: nezort11
- Created: 2023-04-16T21:13:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T15:48:53.000Z (over 1 year ago)
- Last Synced: 2025-04-16T00:12:30.495Z (over 1 year ago)
- Topics: bot, telegram, translation, video, video-translation, voice-over, wasm
- Language: TypeScript
- Homepage: https://t.me/vidtransbot
- Size: 1.36 MB
- Stars: 23
- Watchers: 2
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# video translate bot

## βοΈ Architecture
Full video translate architecture:
1. Translate video/audio stream ([api.browser.yandex.ru/video-translation/translate](https://api.browser.yandex.ru/video-translation/translate)) (protobuf)
2. Download original audio/video stream (youtube-dl)
3. Mix translated audio with original video/audio (ffmpeg) (10%:100% ratio)
4. Get video metadata, download thumbnail (opengraph)
5. Translate video thumbnail ([translate.yandex.com/ocr](https://translate.yandex.com/ocr)) (puppeteer)
6. Upload final [large] video/audio stream (telegram) (gramjs)
> 1-3 steps can theoretically be moved to the client (in case WASM is supported) in order to reduce server computational resources
## Setup
```sh
# nvm install 18 && nvm use
# or
volta install node@18 # should be automatically pin
which node
node --version
which pnpm
corepack enable pnpm@8.3.1
pnpm --version
pnpm install
```
## Start
```sh
git pull
# make sure right owner are set correctly after
sudo chown -R pi:pi .
# make sure run.sh script is executable
chmod +x ./run.sh
# git update-index --chmod=+x ./run.sh
# don't use sudo, because root mode will break some docker-push/yc/aws stuff
# NOTE: without sudo docker user crontab stuff sometimes crashes...
./run.sh docker:build
./run.sh docker:up
```
## Deploy
```sh
sudo bash ./run.sh docker:build
sudo bash ./run.sh docker:up
sudo bash ./run.sh docker:restart
```
## cli
```sh
url='https://youtu.be/x8J3a5ty3zw' pnpm cli
```