{"id":24472809,"url":"https://github.com/alex2844/youtube-translate","last_synced_at":"2026-01-04T23:18:11.234Z","repository":{"id":271783456,"uuid":"594968776","full_name":"alex2844/youtube-translate","owner":"alex2844","description":"A simple script to translate videos from YouTube and other sources, using vot-cli, spleeter, and other tools.","archived":false,"fork":false,"pushed_at":"2025-01-24T11:04:38.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T04:04:52.158Z","etag":null,"topics":["google-colab","speech-to-text","spleeter","video-translation","vot","youtube","yt-dlp"],"latest_commit_sha":null,"homepage":"https://colab.research.google.com/github/alex2844/youtube-translate/blob/main/ytranslate.ipynb","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex2844.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-30T05:30:00.000Z","updated_at":"2025-02-26T09:29:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"4da6b513-31a5-4b9c-ba89-47327c33e621","html_url":"https://github.com/alex2844/youtube-translate","commit_stats":null,"previous_names":["alex2844/youtube-translate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2844%2Fyoutube-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2844%2Fyoutube-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2844%2Fyoutube-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2844%2Fyoutube-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex2844","download_url":"https://codeload.github.com/alex2844/youtube-translate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810271,"owners_count":21807760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-colab","speech-to-text","spleeter","video-translation","vot","youtube","yt-dlp"],"created_at":"2025-01-21T08:13:32.937Z","updated_at":"2026-01-01T23:32:45.252Z","avatar_url":"https://github.com/alex2844.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Translate\n\n\u003e Translate and download videos effortlessly, bypassing throttling.\n\nThis script allows you to easily translate videos from YouTube and other online\nplatforms. It uses [`vot-cli`](https://github.com/FOSWLY/vot-cli) for\ntranslation and other command-line utilities like [`ffmpeg`](https://ffmpeg.org/)\nand [`yt-dlp`](https://github.com/yt-dlp/yt-dlp).\n\nThe script is designed to be fast and flexible. Running it in **Google Colab**\nallows you to download videos at high speed, bypassing ISP throttling.\n\nIt creates universally compatible files (MKV + MP3/AVC) that work smoothly\non Chromecast, Android TV, and Chrome OS.\n\n## Features\n\n* **Bypass Throttling**: Use the Google Colab version to download videos\n  from YouTube via Google's servers, avoiding ISP speed limits.\n* **Simple Downloader**: Just set the source and target languages to be the\n  same (e.g., `en` to `en`) to use the script as a powerful video downloader.\n* **Automatic Translation**: Translate videos from YouTube and other sources.\n* **SponsorBlock Integration**: Marks sponsor segments as chapters for automatic\n  skipping in players like Kodi and VLC (enabled by default).\n* **Media Center Integration**: Automatically generates `.nfo` metadata and\n  thumbnail files, perfect for Kodi, Jellyfin, and Emby.\n* **High performance**: Optimized for speed using the MKV container and MP3 audio,\n  avoiding heavy transcoding.\n* **Playlist support**: Process entire YouTube playlists automatically.\n* **YouTube Sync**: Mark videos as \"watched\" on YouTube (requires cookies).\n* **Local file support**: Use an existing video file to save bandwidth, while\n  fetching the translation using the URL.\n* **Configuration**: Support for `.env` files, settings saving (Colab), and\n  flexible flags.\n\n## Usage\n\n### Local\n\n1. Install the necessary dependencies (ffmpeg, yt-dlp, vot-cli, npm/pip).\n2. Make [`ytranslate.sh`](https://raw.githubusercontent.com/alex2844/youtube-translate/main/ytranslate.sh)\n   executable: `chmod +x ytranslate.sh`.\n3. (Optional) Create a `.env` file to store your preferences (e.g.,\n   `YT_TOLANG=ru`).\n4. Run the script:\n\n    ```bash\n    ./ytranslate.sh [OPTIONS] \u003cURL\u003e [LOCAL_FILE]\n    ```\n\n    **Options:**\n\n    * `-h, --help`: Show help message.\n    * `-v, --version`: Show script version.\n    * `-r, --height=\u003cint\u003e`: Set max video height (e.g., 1080).\n    * `-f, --from_lang=\u003cstr\u003e`: Source language (default: en).\n    * `-t, --to_lang=\u003cstr\u003e`: Target language (default: ru).\n    * `-o, --output=\u003cpath\u003e`: Output directory.\n    * `-c, --cookies=\u003cpath\u003e`: Path to cookies file (for private playlists or\n      marking watched).\n    * `-4, --ipv4`: Force IPv4 connection.\n    * `--force-avc`: Force AVC (H.264) video codec for older devices.\n    * `--mark-watched`: Mark video as watched on YouTube (requires cookies).\n    * `--meta`: Generate NFO and JPG for Media Centers.\n    * `--no-sponsorblock`: Disable marking sponsor segments (enabled by default).\n    * `--no-cleanup`: Keep temporary files.\n\n    **Examples:**\n\n    Translate a single video with metadata:\n\n    ```bash\n    ./ytranslate.sh -f en -t ru --meta https://youtu.be/VIDEO_ID\n    ```\n\n    Download a playlist in its original language, creating metadata and marking\n    as watched:\n\n    ```bash\n    ./ytranslate.sh -f en -t en -c cookies.txt --meta --mark-watched \\\n      https://www.youtube.com/playlist?list=WL\n    ```\n\n### Google Colab (Bypass Throttling)\n\n1. Open the\n   [`ytranslate.ipynb`](https://colab.research.google.com/github/alex2844/youtube-translate/blob/main/ytranslate.ipynb)\n   file in Google Colab.\n2. Fill in the parameters in the \"Settings\" block.\n3. **To simply download**, set `FROMLANG` and `TOLANG` to the same language.\n4. Run all cells.\n5. The script will process the video(s) and automatically save them to your\n   Google Drive or prompt for download.\n\n## Installing Dependencies\n\nIf you don't have dependencies installed locally, you can use the\n`INSTALL_DEPENDENCIES=true` variable to attempt auto-installation.\n\n```bash\nINSTALL_DEPENDENCIES=true ./ytranslate.sh [OPTIONS] \u003cURL\u003e\n```\n\n**Note:** Root (sudo) permissions are required for auto-installation.\n\n---\n\n### Переводите и скачивайте видео без усилий и ограничений\n\nЭтот скрипт позволяет легко переводить видео с YouTube и других онлайн-платформ.\nОн использует [`vot-cli`](https://github.com/FOSWLY/vot-cli) для перевода, а\nтакже утилиты командной строки [`ffmpeg`](https://ffmpeg.org/) и\n[`yt-dlp`](https://github.com/yt-dlp/yt-dlp).\n\nГлавное преимущество — запуск в **Google Colab**, что позволяет\n**скачивать видео на высокой скорости в обход замедления YouTube** со стороны\nпровайдеров.\n\nСкрипт создает универсальные файлы (MKV + MP3/AVC), которые корректно\nвоспроизводятся на большинстве устройств, включая Chromecast, Android TV и Kodi.\n\n## Возможности\n\n* **Обход замедления YouTube**: Используйте версию для Google Colab, чтобы\n  скачивать видео через серверы Google на максимальной скорости, игнорируя\n  ограничения вашего провайдера.\n* **Простой загрузчик видео**: Просто укажите одинаковые языки\n  (например, с `ru` на `ru`), чтобы использовать скрипт как мощный инструмент\n  для скачивания видео или плейлистов.\n* **Автоматический перевод** видео с YouTube и других источников.\n* **Интеграция со SponsorBlock**: Создает в MKV-файле главы для автоматического\n  пропуска спонсорских сегментов (включено по умолчанию).\n* **Интеграция с медиацентрами**: Автоматическое создание метаданных (`.nfo`)\n  и обложек, идеально для Kodi, Jellyfin и Emby.\n* **Высокая скорость**: Использование контейнера MKV и аудио MP3 позволяет\n  избежать долгого перекодирования.\n* **Поддержка плейлистов**: Возможность обработки целых плейлистов YouTube.\n* **Синхронизация с YouTube**: Возможность помечать видео как \"просмотренные\"\n  (нужны cookies).\n* **Гибкая настройка**: Поддержка `.env` файлов, сохранение настроек (Colab)\n  и множество флагов запуска.\n\n## Использование\n\n### Локально\n\n1. Установите необходимые зависимости (ffmpeg, yt-dlp, vot-cli, npm/pip).\n2. Сделайте [`ytranslate.sh`](https://raw.githubusercontent.com/alex2844/youtube-translate/main/ytranslate.sh)\n   исполняемым: `chmod +x ytranslate.sh`.\n3. (Опционально) Создайте файл `.env` для сохранения настроек\n   (например, `YT_TOLANG=ru`).\n4. Запустите скрипт:\n\n    ```bash\n    ./ytranslate.sh [ОПЦИИ] \u003cURL\u003e [ЛОКАЛЬНЫЙ_ФАЙЛ]\n    ```\n\n    **Опции:**\n\n    * `-h, --help`: Показать справку.\n    * `-v, --version`: Показать версию скрипта.\n    * `-r, --height=\u003cint\u003e`: Макс. высота видео (напр. 1080).\n    * `-f, --from_lang=\u003cstr\u003e`: Язык оригинала (по умолчанию: en).\n    * `-t, --to_lang=\u003cstr\u003e`: Язык перевода (по умолчанию: ru).\n    * `-o, --output=\u003cpath\u003e`: Папка для сохранения.\n    * `-c, --cookies=\u003cpath\u003e`: Путь к cookies (для приватных плейлистов или\n      пометки \"Просмотрено\").\n    * `-4, --ipv4`: Принудительно использовать IPv4.\n    * `--force-avc`: Принудительно использовать кодек AVC (H.264) для\n      старых устройств.\n    * `--mark-watched`: Помечать видео как просмотренное на YouTube.\n    * `--meta`: Создавать метаданные (.nfo и .jpg) для медиацентров.\n    * `--no-sponsorblock`: Отключить разметку спонсорских сегментов\n      (включено по умолчанию).\n    * `--no-cleanup`: Не удалять временные файлы.\n\n    **Примеры:**\n\n    Перевод одного видео с созданием метаданных:\n\n    ```bash\n    ./ytranslate.sh -f en -t ru --meta https://youtu.be/VIDEO_ID\n    ```\n\n    Скачивание плейлиста на оригинальном языке с метаданными и пометкой\n    \"просмотрено\":\n\n    ```bash\n    ./ytranslate.sh -f ru -t ru -c cookies.txt --meta --mark-watched \\\n      https://www.youtube.com/playlist?list=WL\n    ```\n\n### Запуск в Google Colab (Обход замедления)\n\n1. Откройте файл\n   [`ytranslate.ipynb`](https://colab.research.google.com/github/alex2844/youtube-translate/blob/main/ytranslate.ipynb)\n   в Google Colab.\n2. Заполните параметры в блоке \"Settings\".\n3. **Чтобы просто скачать видео**, укажите одинаковые языки в `FROMLANG`\n   и `TOLANG`.\n4. Запустите все ячейки.\n5. Скрипт обработает видео и автоматически сохранит их на Google Drive или\n   предложит скачать.\n\n## Установка Зависимостей\n\nЕсли зависимости не установлены, можно использовать переменную\n`INSTALL_DEPENDENCIES=true` для их автоматической установки.\n\n```bash\nINSTALL_DEPENDENCIES=true ./ytranslate.sh [ОПЦИИ] \u003cURL\u003e\n```\n\n**Примечание:** Для автоматической установки требуются права суперпользователя\n(root).\n\n---\n\n## Youtube\n\n| [![google][google_img]][google_url] | [![linux][linux_img]][linux_url]\n| --- | ---\n\n[google_img]: https://img.youtube.com/vi/7-rYQ2QHXgo/0.jpg \"Google Colab\"\n[google_url]: https://youtu.be/7-rYQ2QHXgo\n[linux_img]: https://img.youtube.com/vi/gNvPf7nGXFQ/0.jpg \"Linux\"\n[linux_url]: https://youtu.be/gNvPf7nGXFQ\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex2844%2Fyoutube-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex2844%2Fyoutube-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex2844%2Fyoutube-translate/lists"}