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
Note that YouTube has employed some sort of protection that prevents downloading tools from downloading (or even seeing) the 1080p version, but you can still download all other resolutions up to and including 720p. –  neon_overload Oct 1 at 3:19

1 Answer 1

up vote 5 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 Sep 17 at 12:09
I meant DASH Video. I tried to download 4K, but that's all in DASH format (DASH allows youtube to preserve bandwidth). It's radically different it will mostly be unplayable. –  prakharsingh95 Sep 24 at 19:41
@prakharsingh95 Yeah if anything you might be able to view the mp4 using VLC as VLC allows you to sync the video with a separate file for audio. I haven't tried it though. Have you tried converting the mp4 file from the DASH download to avi format? I think they are similar. –  mchid Sep 25 at 5:05
Yes. Dash is of course playable, but you need to mux the streams with something like avconv. Too slow for 4K. –  prakharsingh95 Sep 29 at 8:39

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.