How to save YouTube videos at the highest quality available

Ever wanted to download a YouTube video at the highest quality video and audio but didn’t know where to start? Here is the most reliable way that I’ve found that doesn’t involve using a dodgy looking third party website. To be fair, there are plenty of sites you can use that let you just paste the url in and download but often they’ll place limits or throttle the quality in terms of what you can download.

With that out of the way, lets get in to it.

YouTube-dl

YouTube-dl is an open-source download manager that allows you to download video and audio from YouTube and similar video hosting sites.

YouTube-dl is run from the command prompt so while there’s not pretty looking UI its super simple use. Before you start you’ll need to download YouTube-dl.

You’ll also need to download FFmpeg, another command line tool that converts audio and video. FFmpeg is used to combine the audio and video streams (this will make more sense later).

Step 1: Setup your folder

After you’ve downloaded both YouTube-dl and FFmpeg, create a new folder (that you want to download your videos to) and cut/paste the following files in to your newly created folder:

  • youtube-dl.exe
  • ffmpeg.exe
  • ffplay.exe
  • ffprobe.exe

The FFmpeg files you’ll need can be found in the ‘Bin’ folder of FFmpeg.

Step 2: Open the command prompt

Type ‘cmd’ in the Windows Search box and select Command Prompt.

In the command prompt change the directory so that you’re in your newly created folder (in my example I created a new folder called ‘Downloads’).

To check that you’re good to go, type /dir to confirm that you’ve got all the executable files you need ready to go.

If you’ve got the 4 files you need in there then you’re good to go.

Step 3: Run your command to download your video

Grab the full url for the video you’d like to save, eg: https://www.youtube.com/watch?v=lmee9Yw2ovo

The most basic command you can use to save the video is below (replace the YouTube url with whatever it is you’re trying to save):

youtube-dl https://www.youtube.com/watch?v=lmee9Yw2ovo

This will just save the video in to the folder you’ve created. The screenshot below shows what a successful download looks like. You can see that youtube-dl downloads the video then the audio and them merges the two in to a single container (in this case an mkv file).

Depending on what you’re saving you may see a message (see screenshot below) that says ‘WARNING: Requested formats are incompatible for merge and will be merged into mkv.’

By default youtube-dl will download the highest quality audio and video streams and then join the two streams in to a compatible container. If the highest quality available streams are unable to work within an mp4 container youtube-dl will just join everything up in an mkv file. If however, you want to force youtube-dl to put the available streams together in an mp4 container you can use to following command (where URL equals the URL of the video link you’re trying to save):

youtube-dl -f bestvideo[ext=mp4]+bestaudio[ext=m4a] URL

Other commands you may find useful

The two basic commands in ‘Step 3’ are probably enough for most people but there are a heap of other commands you can use depending on what you’re trying to do. Here are some that may come in handy.

youtube-dl -U

This will check to see if your version of youtube-dl is up to date, and if not, it will update to the latest.

youtube-dl -x --audio-format mp3 URL

Maybe you just want to save the audio and not the video, using this command you’ll save the audio as an mp3 file.

youtube-dl --playlist-start # --playlist-end # URL

If you want to save a whole playlist you can use this command, replace the ‘#‘ with numbers (where you want to start and finish within the playlist). You also need to make sure you use the playlist URL. In other words, if you have a playlist that has 4 videos in it, you can specify starting at video 1 in the list and finishing at video 4, you’d use this:

youtube-dl -x --playlist-start 1 --playlist-end 4 https://www.youtube.com/playlist?list=PL3pOjQXSlwPJKlXkBiG4gZA9miU7ip6Ve

You can find the full list of youtube-dl commands on GitHub – there are a lot!

One final thing, it’s worth making yourself aware of the copyright rules and check the License details on the video before you do anything. License details will vary video to video so look for creative commons stuff for example.

Leave a Comment