use
youtube-dl -F first to get a list of the available video/audio formats
Example:
Code: Select all
guest@porteus:~/Test$ youtube-dl -F https://www.youtube.com/watch?v=0LyAey51CmQ
[youtube] 0LyAey51CmQ: Downloading webpage
[youtube] 0LyAey51CmQ: Downloading video info webpage
[info] Available formats for 0LyAey51CmQ:
format code extension resolution note
249 webm audio only tiny 50k , opus @ 50k (48000Hz), 125.75KiB
250 webm audio only tiny 61k , opus @ 70k (48000Hz), 154.07KiB
251 webm audio only tiny 110k , opus @160k (48000Hz), 274.33KiB
140 m4a audio only tiny 127k , m4a_dash container, mp4a.40.2@128k (44100Hz), 357.23KiB
160 mp4 256x144 144p 67k , avc1.4d400c, 25fps, video only, 137.66KiB
278 webm 256x144 144p 83k , webm container, vp9, 25fps, video only, 189.34KiB
133 mp4 426x240 240p 101k , avc1.4d4015, 25fps, video only, 214.12KiB
242 webm 426x240 240p 164k , vp9, 25fps, video only, 348.06KiB
134 mp4 640x360 360p 223k , avc1.4d401e, 25fps, video only, 459.23KiB
243 webm 640x360 360p 295k , vp9, 25fps, video only, 630.51KiB
135 mp4 854x480 480p 367k , avc1.4d401e, 25fps, video only, 756.40KiB
244 webm 854x480 480p 463k , vp9, 25fps, video only, 1017.00KiB
136 mp4 1280x720 720p 622k , avc1.4d401f, 25fps, video only, 1.27MiB
247 webm 1280x720 720p 1004k , vp9, 25fps, video only, 2.06MiB
18 mp4 640x360 360p 441k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 1.21MiB
22 mp4 1280x720 720p 593k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)
download whatever you want with
youtube-dl -f <format code> <video address>
Quote from the page linked above:
You can merge the video and audio of two formats into a single file using -f <video-format>+<audio-format>
(requires ffmpeg or avconv installed),
for example -f bestvideo+bestaudio will download the best video-only format, the best audio-only format
and mux them together with ffmpeg/avconv.