Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

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


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.

Thank you for being a Ghacks reader. The post How to use youtube-dl to download multiple YouTube, playlist or channel videos appeared first on gHacks Technology News.

Enregistrer un commentaire

0 Commentaires