Full video translate architecture:
- Translate video/audio stream (api.browser.yandex.ru/video-translation/translate) (protobuf)
- Download original audio/video stream (youtube-dl)
- Mix translated audio with original video/audio (ffmpeg) (10%:100% ratio)
- Get video metadata, download thumbnail (opengraph)
- Translate video thumbnail (translate.yandex.com/ocr) (puppeteer)
- 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
# nvm install 18 && nvm use
# or
volta install node@18 # should be automatically pin
which node
node --version
which pnpm
corepack enable [email protected]
pnpm --version
pnpm install
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
sudo bash ./run.sh docker:build
sudo bash ./run.sh docker:up
sudo bash ./run.sh docker:restart
url='https://youtu.be/x8J3a5ty3zw' pnpm cli