How to select video quality in youtube-dl?

youtube_dl_best_quality_download_featured_img

Youtube-dl is an awesome tool for quickly downloading videos from a range of websites. Its intuitiveness makes it very easy for most people to use it without much knowledge of the command line.

Most people primarily use it for downloading Youtube videos but it can get quite annoying when you have a slow internet connection which in turn makes the program download a low-quality video instead of a 1080p or higher video. Here we will show you how to exactly select the quality type and format while downloading Youtube videos with youtube-dl

How to select video quality from youtube-dl?

When downloading a video from Youtube you can select the quality of the video that you want to download in the following way.

  • This is how you would normally download a video with youtube-dl.
$ youtube-dl https://www.youtube.com/watch?v=3de64yKeElM
  • Now add the flag -F to list the available qualities and formats of the video. Notice the ‘F’ should be in the upper case.
$ youtube-dl -F https://www.youtube.com/watch?v=3de64yKeElM
  • The output should be like this  –

youtube_dl_format_list

  • Then from the list select your preferred format and use the lowercase f flag along with the format code to download. Here we will download the video in 4k quality which has the format code 315
$ youtube-dl -f 315 https://www.youtube.com/watch?v=3de64yKeElM
  • Now your Youtube video will start downloading the preferred format that you chose.

youtube_dl_video_downloaded

How to download the best quality audio & video from youtube-dl?

Above we showed you how to select to download in a certain quality but how about downloading the best video and audio quality? Here’s how you can do that –

  • Use the flag ‘-f bestvideo+bestaudio/best‘ in your command to download the best video and best audio quality.
  • Then to encode the audio and video together pass FFmpeg location command along with it  ‘–ffmpeg-location [FFmpeg bin location on your device]‘. So the whole command will look something like this –
youtube-dl -f bestvideo+bestaudio/best https://www.youtube.com/watch?v=c9RzZpV460k --ffmpeg-location C:\Users\Downloads\media\ffmpeg-git-full\bin
  • This will most probably download a webm or when encoded a mkv file, if you want to download the best quality mp4 file then use this flag ‘-f bestvideo[ext!=webm]‌​+bestaudio[ext!=webm]‌​/best[ext!=webm]’.

youtube_dl_best_audio_video_quality

Summary
How to select video quality in youtube-dl?
Article Name
How to select video quality in youtube-dl?
Description
Check out how to download 1080p or higher quality videos with youtube-dl and also to select the quality of the video to download.
Author

Link To or Reference This Page

Hey there! We put a lot of effort into gathering, organizing and presenting the data on this page to make it as helpful as possible for you. If you found the information useful for your research, we would be grateful if you could use the tool below to give credit to Geekdroids as the source. Thank you for your support!

Share on

Leave a Comment

Your email address will not be published. Required fields are marked *