This detailed guide takes you to the realm of command line tools on Windows. Fear not, I’ll be with you along the way and teach you the youtube-dl utility from scratch. I believe it’s the best way to download an entire Youtube channel, mainly because of its reliability and robustness. It’s not some scammy ad-supported bloatware YouTube downloader many people use for single videos and playlists. On the contrary, this is an advanced tool, but I try to do my best to bring the difficulty down to an intermediate level. Expect baby steps and the usual storytelling instead of slapping you with a line of code and leaving you in the lurch!
Why would you archive YouTube?
Surely you can’t download the whole thing. However, there are countless technical reasons to get your tiny part of it!
Annoying tidbits of the platform
It’s possible to overcome every single annoyance the YouTube platform imposes on us, by decoupling downloading from viewing. This way you have complete control over the experience. Why is that a good thing?
- First of all, there are no ads whatsoever. While the browser extension uBlock Origin does a fantastic job at ensuring that I don’t encounter any ads on desktop, ever, the same cannot be said about my mobile experience. Adguard for Android is excellent, though it can’t quite block the YouTube ads.
- You see no comments or other distracting elements.
- Your archive is portable. Take it to a place with limited or no internet. You might not want to exhaust mobile data plans while commuting but would benefit from watching a quality channel.
- Offline performance means no buffering. Skip boring parts and seek instantly.
- Language learning aficionados could download and watch videos with dual subtitles. Yes, that means both languages shown on the screen at the same time, one at the top, one at the bottom – PotPlayer can do this. For example, this video has both Spanish and English subs that are not auto-generated.
- Retain videos forever. Some content gets deleted from time to time. There is no guarantee specific channels or videos will exist 5, 10, 20 years from now! Therefore, the data hoarder mentality dictates you should archive what you like.
- Is the space on the video control bar really so scarce that the volume bar needs to hide itself? It’s one of my pet peeves with Google’s new design trends tuck away the functional, often-used buttons and sacrifice them on the altar of minimal material design.
For a better binge-watching experience
What if I want to watch every video of a channel? It’s unrealistic to expect that I’ll begin every session by infinite scrolling the videos tab for minutes to find where I left it… Even then, how will I know that the next video in the queue is the real next one, and not some “recommended for you” nonsense unless they are all in a playlist?
Furthermore, the watched and progress indicators are hit-and-miss at best. So many times YouTube often forgets that I’ve already watched a video. The feature that would let you continue where you left off doesn’t seem to remember long gone sessions. If the videos are offline, I guarantee that you and your video player will do a better job at tracking seen videos.
You wouldn’t cherry-pick just a handful of episodes from serial drama television series, would you? I’ve found that I began to like some content creators so much, that I want to see ALL of their content, in order, without even looking at the title! For me, the best way to do that is to download each YouTube channel I love. I’ll tell you about some of these binge-worthy channels later.
The echo chamber
YouTube and Facebook (and others) employ specialized algorithms to guess what YOU might like, and therefore not every content from your subscriptions or friends reaches you. And that is an understatement. They use machine learning (AI), freaking TensorFlow neural networks to analyze your habits – this is a bit disturbing if you ask me.
For content creators, this is discouraging since they reach smaller and smaller slice of their audience and sometimes have to resort to paid promotion to target their fan base. As a content consumer, if you rely on automatic recommendations, you get stuck in an echo chamber that keeps reflecting what you like and leaves little to no room for exploration. When you download a YouTube channel, every single video the content creator ever made is there, without biases. If you discover a great channel a bit late, you can still go back in time and re-live their videos sequentially.
How did I get into this?
It was almost a decade ago that my YouTube content consumer role manifested. YouTube was very different back then.
One of my first subscriptions was to a pineapple-haired, energetic gentleman with an unlimited wardrobe reviewing viral videos in front of a comic book wall.
Back then, if you typed just the letter r into YouTube search, his name, ray william johnson would come up as the first result. Since then, my taste shifted, and I watch and download channels featuring more sophisticated intellectual content.
The quality and production value increased immensely over the past decade. Due to this, many education or entertainment channels often beat regular TV programming. Surely the format is different, and the videos are shorter. However, they carry tremendous value, which is offered for free.
These are all excellent YouTube channels to binge:
- Veritasium of Derek Muller
- SmarterEveryDay of Destin Sandlin
- Nicole Cotroneo Jolly’s TRUE FOOD TV
- Engineering Explained by Jason Fenske
- ElectroBOOM of Mehdi Sadaghda
- ATHLEAN-X™ of Jeff Cavaliere
- Colin Furze, the crazy inventor
The earliest time I decided to download a whole YouTube channel was when I first went skiing. I wanted to augment the teachings of my coach with a virtual one. So I took the channel of Ski School by Elate Media with me on the trip. To illustrate my point, I didn’t have an unlimited data plan, and even if I did, it would have been slow to watch the ski lessons. The experience opened my eyes to making content from channels more convenient to follow. I look forward to bringing some of my favorite channels with me the next time I fly long haul, as in-flight entertainment is usually subpar.
Setting up youtube-dl on Windows 10
If you are like how I used to be, the installation part of the docs is Chinese. It runs in the geek family that command line tools are installed… you guessed it: from the command line! That steep learning curve prevents the average Joe from using an otherwise fine and easy solution to download a YouTube channel. That’s why I want to tell you step by step how to set it up. You’ll see that there is nothing to install in the traditional sense.
First, download these:
- The primary tool, youtube-dl (choose the Windows exe link)
- FFmpeg for combining video with audio with the best quality
Then perform these actions:
- Create a folder for these tools and your downloads, for example, C:\YouTube
- Extract the FFmpeg archive and also move the
bin\ffprobe.exefiles into the C:\YouTube folder
The last time I taught you how to download an entire website with wget, and again we need to add another tool to the environment variables. It’ll ensure system-wide availability of the youtube-dl command and everything else we add to the YouTube folder later.
- Hit Windows+R, paste the above line and hit Enter
- Under the User variables double-click the Path row
- Click New and add the path of that folder, such as C:\YouTube
- Click OK, OK to close everything
- Verify it works by hitting Windows+R again and pasting
cmd /k youtube-dl– it should not say ‘youtube-dl’ is not recognized
The recommended options of youtube-dl
As usual, I’ve read the readme file so you don’t necessarily have to. Based on my experience, these are useful to download an individual YouTube channel.
The format parameter is the heart of this whole guide. The combination will first look for the best video at or above full HD width, and only resort to the next best formats if the desired quality is not available. I’ve been recommending this quality setting on Reddit and StackOverflow, after finding that by default, youtube-dl prefers a lower resolution video just because it has a higher bitrate than the larger resolution version. However, it’s not a bug, as confirmed by the developer. Regarding audio, I was not so picky. Finally, the default /best at the end is just there for videos where video and audio don’t exist separately.
Use this to avoid re-downloading already grabbed content. Each successful download gets noted in the file so youtube-dl will skip them the next time. This setting is essential if you want to update your archive periodically. The archive file will reside in your YouTube folder and will serve as a log or history for every download you perform, on any channel.
Speaking from experience, I can say that it’s helpful to save the output like this. Else it’s just chaos. The above means that:
- Videos are placed in folders named after their channel.
- File names start with the date of the videos.
- The video title is included (without special characters, see the next option).
- YouTube video ID is there so I can quickly find it online if I want to comment or leave a rating.
- An extension such as .mkv is mandatory.
You can format the saved video’s filename however you want.
This should be common sense because foreign letters in the video titles can conflict with the allowed characters on the system.
Most often, video and audio streams will arrive separately, so it’s only logical you get to decide the output container. FFmpeg will create this, and Matroska (.mkv) seems like a good choice.
Let’s make things unstoppable! 🙂 It’s especially useful when you set out to download a huge YouTube channel and leave your computer on for the night. You don’t want to wake up seeing that it stopped early 😢 because of some silly error, such as this bummer:
Downloading video 296 of 335 [youtube] FJnbLzOh--c: Downloading webpage [youtube] FJnbLzOh--c: Downloading video info webpage ERROR: This video contains content from SME, who has blocked it in your country on copyright grounds.
It’s very easy to accidentally use a link that refers to a playlist in addition to the single video you chose. I use this in the single video download script, to prevent unintentionally downloading an entire playlist.
Instruct the tool to write subtitle files next to the videos.
If instead, you want to embed subtitles in the video itself, this is the switch to use.
If you want subtitles, this is how you specify the language. This is for Spanish and English, if available.
Before you begin downloading
You need some disk space when you download a long-standing YouTube channel. One hour of video time is somewhere between 500MB and 1GB of file size. Many channels have hundreds or thousands of videos. I know these are rookie numbers, but to give you an idea:
Download speeds aren’t super fast either. Sometimes they are a crawl, I’m not sure why. Perhaps the speed is optimized for streaming at the pace of viewing. It all depends on the content and how popular it is. I presume that YouTube duplicates trending videos across multiple servers.
Download an entire YouTube channel with this youtube-dl command
You’d typically need to run the command in the folder where you want to download the desired YouTube channel. While you could open a command prompt and navigate there manually, I have a better idea. Since you probably want to update the archive later when new videos come, why not save the command to a batch file?
Formulate the download job as a batch file
Create a new file in Notepad or a text editor, and place the below snippet in it. Save it as something like
job-colinfurze.bat in the C:\YouTube folder, next to youtube-dl. All that’s left is to run it!
cd /D "%~dp0" youtube-dl https://www.youtube.com/user/colinfurze --format ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best --download-archive archive.txt --output %%(uploader)s/%%(upload_date)s.%%(title)s.%%(id)s.%%(ext)s --restrict-filenames --merge-output-format mkv --ignore-errors PAUSE
- Substitute the channel URL for your target channel.
- It has my recommended settings from the previous section.
- The double percent signs are for escaping in a batch file. When calling the command directly, you need only a single percent sign.
- The first line ensures the videos will be downloaded in the folder of the batch file when it is run as a scheduled task. You’ll see this in every snippet here.
- The PAUSE part helps it remain open once finished so you can assess what happened. Otherwise, it instantly closes. When scheduled, it doesn’t cause any harm.
- You can either double click the batch file, or just enter its name (in this example
job-colinfurze) in the Run dialog (Windows+R). Get a taste of how easy this is to use after the guided setup!
- You’ll learn in the next section how to reuse the configuration if you want to download more than one YouTube channel.
Saving the settings to a config file
If you feel that this isn’t going to be a one time endeavor for you, it’s worth preparing a config file for future (re)use. These are the core settings which should apply every time, whether you download a channel, a playlist, or a single video from YouTube. We can still overwrite these when needed. Add the following to a file called
config.txt and put it in the C:\YouTube folder, next to youtube-dl.
--format ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best --download-archive archive.txt --output %(uploader)s/%(upload_date)s.%(title)s.%(id)s.%(ext)s --restrict-filenames --merge-output-format mkv --ignore-errors
By having this, you don’t need to remember to use these options and your command becomes shorter in the batch file. For example, in the
job-EngineeringExplained.bat this would be:
cd /D "%~dp0" youtube-dl https://www.youtube.com/user/EngineeringExplained --config-location config.txt PAUSE
See? Much nicer! Use this snippet as a template to create a batch file for every YouTube channel you want to download. Then you can run these jobs individually or even schedule them (see later).
Do you need just a single video?
It’s the icing on the cake that this tool works with over a thousand sites! Seriously, try it! It’s the
gift tool that keeps on giving. Maybe not to archive entire accounts from lesser-known platforms, but it’s fabulous for downloading single videos! The point is that the tool figures out the actual URL to the video file. You don’t need to care about it, just use the link you’d share with a friend.
This is where a little setup and using a config file will pay off. You’ll see the
^ character in the examples from now on. In case you are wondering, that tells the batch file that new lines are still part of the same command. Create a new text file called
dl-single.bat in your C:\YouTube folder with the following content:
@echo off cd /D "%~dp0" setlocal enableDelayedExpansion set /p video="Paste the video link to download: " youtube-dl ^ --config-location config.txt ^ --output SingleDownloads/%%(upload_date)s.%%(title)s.%%(id)s.%%(ext)s ^ --no-playlist ^ !video! PAUSE
With that out of the way, anytime you want to download a single video from just about any site, you’d:
- Hit Windows+R
dl-single(or it’ll be there from last time) and press Enter
- Paste the video link to download and hit Enter again
Find single video downloads in the C:\YouTube\SingleDownloads folder.
Download a complete YouTube playlist
The solution is not much different from single videos. The youtube-dl tool excels at batch downloading, but it isn’t just to download a YouTube channel. One important thing to note is that the setup from
config.txt puts each video in a folder that represents its uploader’s channel. So if you download a YouTube playlist of 100 videos – each from a different owner – that’s going to have a detrimental impact on your neatly organized YouTube folder. Therefore, I advise using the playlist creator and playlist name as the folder instead of the channel in the output option. If you want this, then create a text file in C:\YouTube, call it
dl-playlist.bat and add the following to it:
@echo off cd /D "%~dp0" setlocal enableDelayedExpansion set /p video="Paste the playlist link to download: " youtube-dl ^ --config-location config.txt ^ --output %%(playlist_uploader)s-%%(playlist_title)s/%%(upload_date)s.%%(title)s.%%(id)s.%%(ext)s ^ !video! PAUSE
From now on, whenever you want to download a YouTube playlist, just:
- Hit Windows+R
dl-playlistand press Enter – it might already be there as a recent command if you press Down
- Paste the playlist link to download and hit Enter again
You’ll find playlists this way: C:\YouTube\Veritasium-Misconceptions.
What if you want audio only?
We’ve all used YouTube as a music player at some point. Unless you are interested in the music video, sometimes it doesn’t make sense to save the video stream when you just want to hear the content. Except when you download Romy Wave, even if you just listen to / watch her in the background… Music, mixes, podcasts, you name it, this part helps you get an offline version for yourself.
Inside C:\YouTube folder, create the
dl-music.bat file with the following snippet. It downloads or extracts the audio track of one single music video at a time, and places it in a Music subfolder.
@echo off cd /D "%~dp0" setlocal enableDelayedExpansion set /p video="Paste the music video link to download: " youtube-dl ^ --config-location config.txt ^ --output Music/%%(title)s.%%(id)s.%%(ext)s ^ --format bestaudio/best ^ --extract-audio ^ --no-playlist ^ !video! PAUSE
Music playlist variant
The options differ for music playlists. Each playlist will have its own folder inside Music. Save it as
dl-mplaylist.bat after pasting this into it:
@echo off cd /D "%~dp0" setlocal enableDelayedExpansion set /p video="Paste the music playlist link to download: " youtube-dl ^ --config-location config.txt ^ --output Music/%%(playlist_uploader)s-%%(playlist_title)s/%%(title)s.%%(id)s.%%(ext)s ^ --format bestaudio/best ^ --extract-audio ^ !video! PAUSE
Usage (I’m sure you’re getting proficient at this by now):
- Hit Windows+R
dl-mplaylistfor singles and playlists, respectively, and press Enter
- Paste the link to download and hit Enter again
Don’t be alarmed that you’ll likely get no mp3 files because the new trend is a codec called Opus. A decent music player like foobar2000 will have no problem with this new format. It’s not the scope of this article to help transcode anything into to mp3, not that you should.
Keep your archive in sync with automation
Up until writing this article, I resorted to running the YouTube channel download jobs manually every now and then. It’s because I wasn’t on the edge of my seat for new videos. There are a couple of things you need to know before you blindly schedule these jobs.
- It’s a relatively network-intensive task, so schedule it outside the hours you’re conferencing or need the bandwidth or low latency.
- If the process is interrupted, it’ll continue without any problems the next time. It’ll even resume a half-finished download!
- You need to decide how much delay you tolerate based on the number of channels, their average update frequency, and your watching habits. The more often you run it, the less it has to download at once. Fortunately, a job runs silently in the background, so an annoying command prompt popup is out of the question.
Using the Task Scheduler
The batch files for downloading a channel are in a way that they work with both manual and automatic start. This part of the guide assumes they already work for you, the initial run is complete, and every video from said channels have been downloaded. Therefore, you are only waiting for new videos.
- Search for and open Task Scheduler in the Start Menu
- On the right-hand side, click Create Basic Task…
- Name it something meaningful, such as YouTube downloads
- Set up the Trigger (timing) however it’s most suitable for you
- As an Action, choose Start a Program
- Browse for a job’s .bat file, such as the C:\YouTube\EngineeringExplained.bat, and click Open
- At Finish, tick the Open the Properties dialog
- Once there, inside Security options, switch to Run whether user is logged on or not. Oddly, this will ensure the job runs hidden from view.
- When you click OK, you need to provide your Windows password. If you don’t have one, you might need to create one. It doesn’t have to make you miserable if you like the no-password login. It’s possible to skip the Windows 10 login screen (Windows+R and
netplwiz) even if you have a password.
Run everything with one task
If you don’t want individual control when automating your jobs, the following script bundles them. Therefore, one scheduled task is enough. Call it
all-youtube-jobs.bat and put it into the C:\YouTube folder, right where the jobs live. Make sure that the filename of each individual job for a YouTube channel you wish to automatically download has the
job- prefix. That’s how this task will find them.
cd /D "%~dp0" for %%x in (job-*.bat) do ( @echo Calling %%x... @echo | call %%x )
Keep youtube-dl up-to-date
The command that updates the exe, with no questions asked is this:
While you can run that manually anytime from a command prompt (Windows+R, and run
cmd), perhaps it’s worth setting up a scheduled task. You can follow the previous instructions, as they are similar. One caveat: for the Action > Start a program, specify the full path like this: C:\YouTube\youtube-dl.exe and for Arguments add -U and that’s it.
Microsoft Windows [Version 10.0.17134.345] (c) 2018 Microsoft Corporation. All rights reserved. c:\YouTube>youtube-dl -U Updating to version 2018.11.18 ... Waiting for file handle to be closed ... c:\YouTube>Updated youtube-dl to version 2018.11.18.
Download the files
For your convenience, you can download the ZIP of the folder I created for this article (without any videos or .exe files). This is what it looks like:
These are the batch files that include the custom code, and the config file, but you still need to:
- Get the software, as we aren’t redistributing them. Without those, the batch files won’t download anything from a YouTube channel.
- Change the
job-*files to download what you want, as they are just examples. Remember, one of them uses the config file, the other has the full command.
What to do with your archive and how to play it
Now that you have offline YouTube videos, you might want a remarkable video player. After all, we strive to improve upon the YouTube experience. A prime candidate for this task on the desktop is PotPlayer (free!). It can open every video in the same folder together as a playlist. Also, it’s very well configurable (think about mouse and keyboard shortcuts) and looks beautiful at the same time, thanks to skins. A serious video watcher will appreciate the flexibility. This is PotPlayer with the Kardox skin playing Jeff Cavaliere’s channel (just about my everyday activity):
On the other hand, I recommend VLC only for Android, as it’s too industrial/raw for me on the desktop.
So, there you have it! Now you know how to download a YouTube channel, with all the content you want. Are you ready to binge? I hope I didn’t open a can of worms… Because it’ll require even more of your time to watch it all, now that you know how much of it is out there. As you might imagine, it was challenging to write this article because of the plethora of distractions from YouTube itself. 🙂
What channels are YOU downloading? Share it in the comments!