Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed youtube-dl in my 14.04.

I can download video by following command,

$ youtube-dl [youtube-link]

But I want to know how to select available pixel quality of youtube video(i.e 1080p, 720p, 480p, etc) and how to set to download best available video.

In software description they said it's possible(shown in image below), but how to do..


share|improve this question
The description above is obsolete. From the man page: "youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases." –  Jos Jun 21 at 10:08

1 Answer 1

up vote 3 down vote accepted

To download a video, you type the URL after the command like this.

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

To select the video quality, first use the -F option to list the available formats, here’s an example,

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

Here’s the output

[youtube] Setting language
[youtube] P9pzm5b6FFY: Downloading webpage
[youtube] P9pzm5b6FFY: Downloading video info webpage
[youtube] P9pzm5b6FFY: Extracting video information
[info] Available formats for P9pzm5b6FFY:
format code extension resolution  note 
140         m4a       audio only  DASH audio , audio@128k (worst)
160         mp4       144p        DASH video , video only
133         mp4       240p        DASH video , video only
134         mp4       360p        DASH video , video only
135         mp4       480p        DASH video , video only
136         mp4       720p        DASH video , video only
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     
22          mp4       1280x720    (best)

The best quality is 22 so use -f 22 instead of -F to download the mp4 video with 1280x720 resolution like this,

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


source: http://www.webupd8.org/2014/02/video-downloader-youtube-dl-gets.html

share|improve this answer
Make sure that you do not choose DASH. That will be unplayable! –  prakharsingh95 Sep 13 at 4:21
@prakharsingh95 the DASH audio only can be converted to standard wave or mp3 format using gnac or similar software. –  mchid 2 days ago

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.