Per tal de baixar videos del YouTube elegint el format de baixada cal seguir aquest camí.

Primer mirem en quin format podem baixar el vídeo:

➜  video youtube-dl -F 'https://youtu.be/3S3_hsqpYg4'
[youtube] 3S3_hsqpYg4: Downloading webpage
[youtube] 3S3_hsqpYg4: Downloading MPD manifest
[info] Available formats for 3S3_hsqpYg4:
format code  extension  resolution note
139          m4a        audio only DASH audio   50k , m4a_dash container, mp4a.40.5 (22050Hz), 3.44MiB
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.40.2 (44100Hz), 9.12MiB
251          webm       audio only DASH audio  137k , webm_dash container, opus  (48000Hz), 6.55MiB
278          webm       256x144    DASH video   95k , webm_dash container, vp9, 30fps, video only
160          mp4        256x144    DASH video  108k , mp4_dash container, avc1.4d400b, 30fps, video only
242          webm       426x240    DASH video  220k , webm_dash container, vp9, 30fps, video only
133          mp4        426x240    DASH video  242k , mp4_dash container, avc1.4d400c, 30fps, video only
134          mp4        640x360    DASH video  364k , mp4_dash container, avc1.4d401e, 30fps, video only, 7.85MiB
243          webm       640x360    DASH video  405k , webm_dash container, vp9, 30fps, video only
244          webm       854x480    DASH video  752k , webm_dash container, vp9, 30fps, video only
135          mp4        854x480    DASH video 1155k , mp4_dash container, avc1.4d4014, 30fps, video only
247          webm       1280x720   DASH video 1505k , webm_dash container, vp9, 30fps, video only
137          mp4        1920x1080  DASH video 2017k , mp4_dash container, avc1.640028, 30fps, video only, 46.69MiB
136          mp4        1280x720   DASH video 2310k , mp4_dash container, avc1.4d4016, 30fps, video only
248          webm       1920x1080  DASH video 2646k , webm_dash container, vp9, 30fps, video only
18           mp4        640x360    360p  327k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 23.03MiB
22           mp4        1280x720   720p  638k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

Ara elegim baixar el vídeo en mp4 per tant el format 22.

➜  video youtube-dl -f 22 'https://youtu.be/3S3_hsqpYg4'
[youtube] 3S3_hsqpYg4: Downloading webpage
[youtube] 3S3_hsqpYg4: Downloading MPD manifest
[download] Destination: Cluster SSH - Manage Multiple Linux Servers Simultaneously-3S3_hsqpYg4.mp4
[download] 100% of 44.98MiB in 00:09