Using Youtube-DL

How To Choose Best File To Download

Youtube-DL has built-in functionality that detects a number of available file formats to download. Often, we will want to manually choose which file format is most suitable for our needs.

In order to take advantage of this interface, we simply navigate to our Youtube-DL file location(path):

$ cd path/to/youtube-dl.exe

And then we type:

$ youtube-dl -F 'http://www.youtube.com/watch?v=P9pzm5b6FFY'

As you might have noticed, we are adding a capitalized ‘f’ flag to our command. This is will result in a list of available file types and quality descriptions.

To select which video file format we wish to download, simply type:

$ youtube-dl -f 22 'http://www.youtube.com/watch?v=P9pzm5b6FFY'

Here, “22” represents number of file format we wish to download. Also, you can simply add ‘best’ to your command, and Youtube-DL will provide you with what it has determined as best file format.

That would look like this:

$ youtube-dl -f best 'http://www.youtube.com/watch?v=P9pzm5b6FFY'

Thanks to mchid on AskUbuntu for providing this solution here.