Last active
June 22, 2026 14:15
-
-
Save sathishshan/79b850c8cb14190c37d199a564611bd6 to your computer and use it in GitHub Desktop.
Download youtube private or member videos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #single video | |
| youtube-dl --cookies youtube.com_cookies.txt "URL" | |
| #playlist | |
| youtube-dl --yes-playlist --cookies youtube.com_cookies.txt "URL" | |
| You can use: --playlist-start, --playlist-end, --playlist-reverse or --playlist-items to achieve this goal. | |
| #Note: cookie should be in Netscape format | |
| Addons | |
| #https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid | |
| #https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/ | |
| python.exe -m pip install --upgrade pip | |
| pip install yt-dlp | |
| yt-dlp --yes-playlist --playlist-start 16 --cookies cookies.txt "https://www.youtube.com/playlist?" | |
| curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - | |
| ------------- | |
| Youtube-dl multiple videos download from a file. | |
| yt-dlp.exe -a file.txt | |
| ------------- | |
| Subtitile & Video Resolution: | |
| yt-dlp --list-subs --cookies youtube_cookie.txt URL | |
| yt-dlp --write-auto-sub --sub-format srt --sub-lang en --skip-download --cookies youtube_cookie.txt URL | |
| To select the video quality, first use the -F option to list the available formats, here’s an example, | |
| youtube-dl -F URL | |
| The best quality is 22 so use -f 22 instead of -F to download the MP4 video with 1280x720 resolution like this: | |
| youtube-dl -f 22 URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to download Membership only videos?
This guide documents the setup process that worked for me on Windows. It assumes you already have legitimate access to the videos through your own account.
Prerequisites
Step 1 - Prepare Google Chrome
Step 2 - Install Python
Verify:
You should see something similar to:
Step 3 - Install Node.js
Verify:
Step 4 - Install Deno
Some environments may use Deno when working with yt-dlp JavaScript challenge solving.
Install:
Verify:
Step 5 - Install FFmpeg
Install:
Verify:
Step 6 - Install yt-dlp
Verify:
Step 7 - Install yt-dlp-ejs
Step 8 - Verify Everything
All commands should display version information without errors.
Step 9 - Export Cookies
Install the following Chrome extension:
Chrome Web Store:
https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc
GitHub Project:
https://github.com/kairi003/Get-cookies.txt-Locally
cookies.txt.Step 10 - Download Videos
Replace VIDEO_URL with the actual URL.
If you have already donnwloaded 80 video oit of 120 in a p playlios then yiu can start from 81st vdieo with this command
This shows download the best available format of video and confirms your setup is working.
Optional - Download Videos to a Specific Folder
By default, videos will be downloaded to the current folder where you run the command.
You can create a dedicated folder for your downloads:
You can still reference cookies.txt from another location using a relative path:
Example folder structure:
In this example, cookies.txt stays in Downloads while all downloaded videos are stored inside MyVideos.
Frequently Asked Questions (FAQ)
Q: ffmpeg is installed but Windows says 'ffmpeg is not recognized'?
A: Close all PowerShell/CMD windows and open a brand new terminal. FFmpeg updates the PATH variable during installation and existing terminals will not see the change.
Q: npm gives an Execution Policy error?
A: Use:
instead of:
Q: The command only shows image formats?
A: Usually one of the following:
Q: Do I need Deno?
A: Not always. In my testing, the ejs:npm solution using Node.js worked reliably. Deno is included because some setups may use it.
Q: Can I download an entire playlist?
A: Yes.
Q: Can I resume from a specific playlist video?
A: Yes.
Q: How do I download only a few videos from a playlist?
Q: My cookies stopped working after a few weeks?
A: Export a fresh cookies.txt file using the browser extension and replace the old one.
Q: Can I keep the downloaded videos forever?
A: Downloaded files stay on your computer until you delete them. Make sure you have enough disk space because large playlists can consume many gigabytes.
Q: How much space do I need?
A: 1080p videos are often hundreds of megabytes each. Large playlists may require tens of gigabytes of free storage.