How to use youtube-dl to download multiple YouTube, playlist or channel videos

Martin Brinkmann
Aug 27, 2021
Youtube
|
26


You have a lot of options when it comes to downloading YouTube videos or videos from other video sites. One of the most advanced programs for that kind of task is youtube-dl. Since it is a command line program, it may not be the first choice for users who don't feel comfortable running commands on the command line.

While that is understandable, especially for single videos that you may want to download, you may miss out on one of the best tools that is available today. One of youtube-dl's strengths is the ability to download multiple videos from all supported sites.

This guide provides you with actionable information to get started downloading multiple videos with a single command. You may download videos using a list of video URLS, videos from a channel or videos from playlists using the method.

Before you can start using youtube-dl, you need to download the tool to your device. Instructions in this guide focus on the Windows version, but youtube-dl is also available for other operating systems.

Head over to the official site and download the Windows executable file and, if not installed, the Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (x86), which is required to run the tool on Windows.

Open a command prompt window by selecting Start, typing cmd, and selecting Command Prompt.  If you have saved the file to the Downloads directory, switch to it with the command cd Downloads (provided that you are in your user folder).

Download YouTube videos using a batch file

youtube dl download videos

If you want to download multiple video files that are not related to each other, e.g. from a single playlist file or channel, you may use a text file with video URLs to download the videos using youtube-dl. Just create a new text file, name it downloads.txt, and add one YouTube video URL per line to it.

The main command is youtube-dl --verbose -ci --download-archive "c:\users\mart\Downloads\archive.txt" --batch-file=download.txt

The command requires explanation:

  • --verbose displays what youtube-dl does in the command line window. It is not needed, but is useful to make sure everything is working as intended.
  • -c forces the downloader to resume partially downloaded video files.
  • -i instructs the downloader to ignore errors.
  • --download-archive "path" creates a text file in the specified location that logs all downloaded videos to avoid downloading them multiple times and for record keeping.
  • --batch-file=download.txt is the text file that contains the video URLs that you want to download.

The program downloads the best format that is available automatically, but you can customize that as well, especially if ffmpeg is available.

Download all videos from a YouTube channel

download youtube channel videos

The core commands are identical, but instead of using a text file containing a list of video URLs, you point the downloader to a playlist URL for the downloading.

Run youtube-dl --verbose -ci --download-archive "c:\users\mart\Downloads\archive.txt" https://www.youtube.com/channel/UCaCE5pzy49M8nQ59plgmFOA this time.

The text file reference has been removed and replaced by the channel URL link. The program will download all videos from that particular channel; make sure you have enough free space no the device.

You need to replace the channel URL with the URL of the channel that you are interested in.

Download all videos from a YouTube playlist

download youtube playlists

Downloading videos from a playlist works similarly. Just replace the channel URL from the example above with a playlist URL, and youtube-dl will download all the linked videos from the specified playlist.

Run youtube-dl --verbose -ci --download-archive "c:\users\mart\Downloads\archive.txt" https://www.youtube.com/playlist?list=PLLC5in1RaYdgmCRPhtTgm4tnnrnQQuHxq.

Closing Words

You may check out the entire command reference on the project's GitHub project site. Options include formatting the names of the downloaded video files, downloading thumbnails, encoding videos, downloading specific formats, and a lot more.

Summary
How to use youtube-dl to download multiple YouTube, playlist or channel videos
Article Name
How to use youtube-dl to download multiple YouTube, playlist or channel videos
Description
Find out how to download multiple videos from YoutTube, including all videos from a YouTube channel or YouTube playlist, or custom video lists.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Paul said on April 13, 2024 at 12:35 pm
    Reply

    While yt-dlp offers powerful command line functionality, this cross-platform app provides a user-friendly graphical interface, allowing you to harness yt-dlp’s capabilities with just a few clicks. I’m talking about YT Channel Downloader, which, besides single videos, also downloads playlists and channels selectively or in their entirety, in the quality of your choice.

    https://github.com/hyperfield/yt-channel-downloader

    Pre-made installable binaries are also available in the Releases section.

  2. David said on March 4, 2022 at 5:39 am
    Reply

    This is the app I use.

    https://github.com/yausername/dvd

    Problem is, this tutorial doesn’t apply to this app…..and I’m no coder.

    Can some1 help me with a command line for downloading playlists for this app?

  3. TelV said on August 29, 2021 at 7:49 pm
    Reply

    I think I’m correct in stating that all youtube videos comprise of two streams namely an audio and a video stream. Therefore you need FFmpeg to be present to mux both otherwise you’ll get a separate audio and a video file.

    Here’s a pix of ffmpeg muxing the two streams and then deleting the separate files afterwards: https://i.postimg.cc/8cNmN2VY/yt-download-ffmpeg-mux.png

  4. Anonymous said on August 27, 2021 at 10:17 pm
    Reply

    If you are a VLC user..
    Copy link
    VLC – Open Network Stream.
    Paste link
    Hit Play
    Hit Record

    In playlist you can rightclick – record.
    Gets around some restrictions and ad breaks.

    I also hacked up an Autoit script to play any link in clipboard in VLC.

    do
    local $clip = “”
    while $clip= “”
    Sleep(1000)
    $clip = ClipGet()
    wend
    ClipPut(“”)

    Run(“c:\programs\VideoLAN\VLC\vlc.exe ” & $clip & ” –fullscreen”)

    until True = False

  5. Anonymous said on August 27, 2021 at 9:31 pm
    Reply

    My favorite software to download not only YT videos.

  6. ChromeFan said on August 27, 2021 at 8:06 pm
    Reply

    @VioletMoon Google doesn’t own those videos. What is Google to do?

    Stop crying and let Google figure it out.

  7. VioletMoon said on August 27, 2021 at 6:37 pm
    Reply

    Wow! Providing information on a “reputable” blog on how to bulk download YouTube videos–that’s so far from the natural inclination to want maybe one or two for personal use. The copyright infringement.

    Bulk downloading of YouTube videos. If I were from Google, I would send a “cease and desist” order for the article and all the other recent articles that have actually been promoting YouTube downloads.

    Way beyond a simple “how to” article.

    A bit surprised.

    1. Sol Shine said on August 28, 2021 at 12:35 pm
      Reply

      @VioletMoon

      Some people want to help others for free by giving them tips or other valuable info.
      Decades ago some of these people had their own website for this, but now many use youtube because most people doing a google search will see YouTube videos in the search list and may never see the small websites in the first pages of the search list.

      These people want their content to be used by as much people as possible for free, and so want their content to be copied and distributed as much as possible.
      But YouTube rules would prevent this from happening.
      Using another website than the poplular YouTube would mean having a smaller public and so less people would be able to find the valuable content.

      YouTube would still be making money from these videos if it allowed such content to be downloaded, as most people do not download the videos and use a Android phone with Chrome (no ad blocking possible) to view YouTube videos.

      Another reason to download videos is to preserve the content incase the videos were removed for whatever reason.

      Another reason is being able to view the videos in situtions where there is no internet or only low quality internet.

      Downloading content from creators that need the money made on YouTube to make a living, and then distributing that content for free is a bad idea and should not be done.
      But YouTube wanting to block to ban the downloading of all videos, is going to far.
      Their control over de info we can access has become too great.

    2. Peterc said on August 28, 2021 at 6:39 am
      Reply

      @VioletMoon:

      In countries with “fair use” exceptions to copyright protection, whether or not any copyright infringement has taken place depends on how the videos are subsequently used. There are also lots of videos (well over a million on Vimeo alone) and even entire *channels* of videos on sites that youtube-dl works on (a couple hundred sites, last I checked) that are expressly given over to the public domain.

      The bigger issue in “fair use” countries is whether YouTube should be allowed to prohibit downloading in its terms of service. Outside of China (and possibly a few other countries), YouTube enjoys an overwhelmingly dominant share of the video-hosting market, and many videos are available *only* on YouTube. If you recognize/respect YouTube’s right to prohibit downloading, you effectively eliminate all fair use of most videos in the Western world. (It’s hard to excerpt segments of a video for use in the news, classroom, courtroom, public meeting, campaign trail, or comedy club if you can’t get your hands on the video to excerpt them from.)

      Remember that a copyright-enforcement organization (the RIAA, I think) succeeded in getting Microsoft to pull youtube-dl from GitHub a few years back based on a claim that it was a copyright-infringement tool. There was an uproar from journalists, lawyers, academics, and others who rely heavily on fair use, and youtube-dl was reinstated on GitHub within a couple/few weeks. Bottom Line: Tools like youtube-dl have legitimate, legal uses, and those uses are very important to a free, open, democratic society.

  8. Shiva said on August 27, 2021 at 5:52 pm
    Reply

    I use a mix of VideoDownloadHelper, JDownloader and FireDM (youtube_dl and yt_dlp). The first it is only used as grabber. There’s also OpenWith extension with JD and PotPlayer, but I failed to set FireDM instead of use clipboard monitoring (due to my poor skill).

    1. Trey said on August 27, 2021 at 11:08 pm
      Reply

      FireDM – thanks for mentioning this. I tried it and it’s very good.

      1. Shiva said on August 28, 2021 at 4:50 pm
        Reply

        There is also Tartube (youtube_dl and yt_dlp) maybe more suitable for playlist or channels, but I don’t need to bulk downloading videos from everywhere. I like to have the ‘potential’ to do it, but usually I just open Youtube long videos with PotPlayer (blocked with host file) and close the browser.
        It is just perception, but FireDM download files with high efficiency.

  9. redrum ice cream delivery service said on August 27, 2021 at 5:37 pm
    Reply

    > Youtube-dl looks like a well thought out program but FDM download manager has it all with one click.

    Were that so, everyone would be using it, or at least a majority. Yet it has to be plugged here, lame.

    >After 17 years

    Never heard of it before until now. Won’t use it because I favor youtube-dl which doesn’t require so many nasty permissions from my browser, any in fact, just to download. As with most command line programs, it’s more useful to me than any GUI, with tons of options.

  10. Mo Money said on August 27, 2021 at 5:16 pm
    Reply

    >Note that youtube-dl’s development seems to have stalled.

    I wonder, considering the amount of attention the project has received in the last year or so, if someone has *paid* the developer(s) of youtube-dl off to halt development and let it *rot on the vine*?

  11. Anonymous said on August 27, 2021 at 5:00 pm
    Reply

    First I think you need to promote YT-DLP and not youtube-dl since it seems the project is just like not being maintained anymore like it used to. So many months, devs don’t respond much and all that.

    Also you didn’t explain about format, if you download this way it will do whatever it wants. But -F is for listing the and -f to specify which format people want. also there are many ways to tell which format to download or even convert or even extract the music with -x and convert to mp3 or some better audio format with –audio-format FORMAT
    there is also –recode-video FORMAT or –merge-output-format FORMAT

    1. TelV said on October 15, 2021 at 10:06 pm
      Reply

      @Anonymous,

      Yessir, you’re so right about YT-DLP because youtube-dl has some serious throttling issues with youtube right now and download times can run into several hours (courtesy of Google I suspect) and doesn’t represent an viable download option anymore.

      YT-DLP.exe can be download from here: https://github.com/yt-dlp/yt-dlp

      I tried it out myself earlier this evening using a tutorial on this site (atrocious colors on there incidentally), but useful nevertheless: https://write.corbpie.com/downloading-youtube-videos-and-playlists-with-yt-dlp/

      youtube-dl is still ok for downloading audio files though since these are relatively small and take only about a minute to download.

  12. Matti said on August 27, 2021 at 4:21 pm
    Reply

    On Linux I use ytfzf;
    https://github.com/pystardust/ytfzf

  13. Paul(us) said on August 27, 2021 at 12:30 pm
    Reply

    After 17 years I am still quit pleased with the, still, free FDM download manager for downloading almost everything. YouTube downloading is ferry easy with just one click. And all of the above possibility s are on board. https://www.freedownloadmanager.org/

    I have tried over the years lots of different programs who where all promising to be the neatest, smartest, fasted or all above YouTube download programs.
    Youtube-dl looks like a well thought out program but FDM download manager has it all with one click.

    1. Nico said on August 27, 2021 at 6:04 pm
      Reply

      @Paul(us)
      With youtube-dl you can download with one click as well, when using the “Open With” extension:
      https://addons.mozilla.org/en-US/firefox/addon/open-with/
      Or:
      https://chrome.google.com/webstore/detail/open-with/cogjlncmljjnjpbgppagklanlcbchlno

      Screenshot:
      https://dl.dropboxusercontent.com/s/q1yxm1wz5mbe2ui/Screenshot_Open-With_menu_20210823_.png
      (using the better maintained yt-dlp fork there)

      1. Robert said on August 27, 2021 at 10:05 pm
        Reply

        I noticed on your screenshot that you have mpv player installed. I also use mpv player and whenever I use the batch file updater in the programs folder, it gives me the option to install Youtube Downloader. I have always declined the option because I use IDM to download videos. I’m wondering is mpv installs that into your context menu for you!

      2. Nico said on August 28, 2021 at 10:00 am
        Reply

        @Robert
        No, I use Linux, so MPV is updated via the package manager.
        I’ve put it in the context menu myself. :)

        In my Windows Virtual Machine, I just download the latest MPV from their site and unpack the archive in the program folder.

    2. DrKnow said on August 27, 2021 at 5:45 pm
      Reply

      @Paul(us) Unless it’s changed recently FDM can’t handle .dlc format containers.
      Also no portable edition.

      Jdownloader has it all.

  14. notAUser said on August 27, 2021 at 10:32 am
    Reply

    Also you need to check availability of a youtube url for your Country https://unblockvideos.com/youtube-video-restriction-checker/#url=Y1e8XHcRLwE

    because youtube-dl can not avoid the region restriction despite on its options to do that.

    Also you need to use at least
    –http-chunk-size 4
    to bypass download speed throttling (speed slowdown). Do not set high value because youtube will block downloading then.

    1. Anonymous said on September 2, 2021 at 7:58 pm
      Reply

      This comment is great, the –http-chunk-size 4 parameter seems to solve all throttling issues with youtube-dl

    2. Nico said on August 27, 2021 at 4:48 pm
      Reply

      @notAUser
      The throttling is a known issue, but is “resolved” in the yt-dlp fork:
      https://github.com/yt-dlp/yt-dlp

      Note that youtube-dl’s development seems to have stalled.
      See:
      https://github.com/ytdl-org/youtube-dl/issues/29753

  15. ilev said on August 27, 2021 at 8:37 am
    Reply

    I use 4K video downloader

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.