This workflow downloads YouTube videos (or audio) with:
- Codec selection
- Auto‑generated subtitles
- Thumbnail & chapter embedding
- SponsorBlock
- Splitting large files into 7‑zip volumes
راهنمای فارسی
قبل از استفاده، نیاز دارید:
- یک مخزن گیتهاب (عمومی یا خصوصی) با اکشن فعال.
- فایل معتبر
cookies.txtکه از نشست واردشده به یوتیوب دریافت شده باشد.- از افزونه مرورگر مانند “Get cookies.txt LOCALLY” استفاده کنید. پس از ورود به یوتیوب، کوکیها را خروجی گرفته و فایل را به
cookies.txtتغییر نام دهید.
- از افزونه مرورگر مانند “Get cookies.txt LOCALLY” استفاده کنید. پس از ورود به یوتیوب، کوکیها را خروجی گرفته و فایل را به
- فایل
cookies.txtرا در روت مخزن قرار دهید.
⚠️ هرگزcookies.txtواقعی خود را در مخزن عمومی قرار ندهید.
- پوشه
.github/workflows/را در مخزن خود ایجاد کنید. - فایل
download.yml(موجود در همین مخزن) را در آن پوشه قرار دهید. - تغییرات را commit کنید.
- به مخزن خود در گیتهاب بروید.
- روی برگه Actions کلیک کنید.
- در نوار کناری سمت چپ، 🎬 YouTube Downloader را انتخاب کنید.
- دکمه Run workflow (آبی) را بزنید.
- فرم را پر کنید. *اگر دستگاه شما جدید است از Codec های av 1 برای ویدئو و opus برای صدا استفاده کنید تا فایل با حجم کم و کیفیت بالا به شما خروجی دهد *اگر دستگاه شما قدیمی است از h 264 برای ویدئو و aac, mp 3 برای صدا استفاده کنید *برای استفاده از ویژگی هایی مثل sponsorblock, chapters, thumbnails بهتر است از فرمت mkv استفاده کنید
- دکمه سبز رنگ Run workflow را بزنید.
- بعد از مدتی فایل شما در پوشه downloads در روت مخزن شما دانلود می شود
Before using this workflow, you need:
- A GitHub repository (private) with Actions enabled.
- A valid
cookies.txtexported from your logged‑in YouTube session.
How to get it? – Use a browser extension like “Get cookies.txt LOCALLY” (Chrome/Firefox). After logging into YouTube, export the cookies and rename the file tocookies.txt. - Place
cookies.txtin the root of your repository.
⚠️ Never commit your realcookies.txtto a public repository – it grants access to your YouTube account.
- Create the folder
.github/workflows/in your repository. - Place the
download.ymlfile (provided in this repository) inside that folder. - Commit the file.
- Go to your repository on GitHub.
- Click the Actions tab.
- On the left sidebar, select 🎬 YouTube Downloader.
- Click the Run workflow button (blue).
- Fill in the form:
- YouTube URL – the video link.
- Video resolution – best / 1080p / 720p / 480p / audio.
- Video codec – best / av1 / h264.
- Audio codec – best / opus / aac / mp3.
- Container – mkv (recommended) / mp4 / webm.
- Embed thumbnail – yes/no (not supported for WebM).
- Embed chapters – yes/no.
- SponsorBlock – off / mark / remove.
- Auto‑generated subs – language codes (e.g.,
fa,en). Leave empty for no subs. - Split archive size – e.g.,
100m(default). This splits the final 7‑zip archive so each part stays under GitHub’s 100 MB limit. - Password – (optional) encrypt the archive.
- Click Run workflow again to start.
The workflow will:
- Download the video + subtitles.
- Embed metadata, thumbnail, and chapters (if enabled).
- Create a 7‑zip archive (split if needed) containing both the video and
.srtsubtitle files. - Commit and push the archive to your repository.
This workflow is a combination and improvement of:
Thank you to both authors for their foundational work!
This workflow is free to use and modify. No warranty is provided. Use at your own risk.