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).
In software description they said it's possible(shown in image below), but how to do..
Best Answer
To download a video, you type the URL after the command like so:
To select the video quality, first use the
-F
option to list the available formats, here’s an example,Here’s the output:
The best quality is 22 so use
-f 22
instead of-F
to download the MP4 video with 1280x720 resolution like this:Or optionally use the following flags to automatically download the best audio and video tracks that are available as a single file:
If you encounter any error during the muxing process or an issue with the video quality selection, you can use one of the following commands:
or as Gabriel Staples pointed out here, the following command will typically select the actual best single file video quality resolution instead of video quality bit-rate:
These commands will ensure you download the highest quality mp4 video and m4a audio from the video as a single file or will merge them back into a single mp4 (using
ffmpeg
in my case). Ifffmpeg
oravconv
is not available,youtube-dl
should fall back to the single file-f best option
instead of the default.Click here for more detailed information and some different examples.
Also, click to see this related answer by Gabriel Staples.
Source: www.webupd8.org/2014/02/video-downloader-youtube-dl-gets.html
Source: github.com/rg3/youtube-dl