Downloading a YouTube channel with yt-dlp

Downloading whole YouTube channels using the yt-dlp tool, with specifying video quality and format types.

For a general run down and usage guide on yt-dlp go here.

yt dlp install and usage guide

Downloaded video format

Go to the bottom for the full yt-dlp command, this just breaks down each part.

Start by calling yt-dlp and then giving the format options for the videos

yt-dlp -f 'bv*[height=720]+ba'

'bv*[height=720]+ba' this is 720p best video format with the best audio combined.

Other option examples:

'bv[height=1080][ext=mp4]+ba[ext=m4a]' 1080p mp4 video combined with best m4a audio.

best select the best format that contains both video and audio.

'bv*[height<720]+ba' Best video format under 720p combined with the best audio.

View yt-dlp the formating docs here.

The archive list

When downloading a channel (or playlist) you want to list what videos you already have downloaded to avoid repetitively downloading them.

An archive list can be done with the download archive parameter where you state the file to save the downloaded  video id’s in

--download-archive the_list.txt

Saving the videos

Now for the save folder and filename options with string formatting. In the example below it will be channel name/video title.extension

-o '%(channel)s/%(title)s.%(ext)s'

Other handy options include %(channel_id)s for the channel id string and %(id)s the video id string.

By using %(ext)s makes yt-dlp choose the extension based on the format parameters provided at the start.

Thumbnail and metadata

If you wish you can save the thumbnail image and the video metadata to the file. Note .webm cannot have the thumbnail embedded, instead .mkv will be used.

--embed-thumbnail --embed-metadata

The final command

Here is the full command using the parts above:

yt-dlp -f 'bv*[height>=720]+ba' --embed-thumbnail --embed-metadata --download-archive FootheFlowerhorn.txt -o '%(channel)s/%(title)s.%(ext)s'

It will download FootheFlowerhorn YouTube channel into FootheFlowerhorn/ with the filename being the title of the video. The videos will be the best quality equal to or greater than 720p combined with the best audio.

yt dlp download youtube channel