youtube-dl 下载语音和视频

首先查看youtube单个音像的视频和音频对应的编号:

 youtube-dl -F  https://www.youtube.com/watch?v=ZsVcKcBiYHM

[youtube] ZsVcKcBiYHM: Downloading webpage

[youtube] ZsVcKcBiYHM: Downloading MPD manifest

[youtube] ZsVcKcBiYHM: Downloading player b128dda0

[info] Available formats for ZsVcKcBiYHM:

format code  extension  resolution note

139          m4a        audio only DASH audio   56k , m4a_dash container, mp4a.40.5 (22050Hz), 42.06MiB

251          webm       audio only tiny  120k , webm_dash container, opus @120k (48000Hz), 104.14MiB

140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 111.63MiB

278          webm       256×144    DASH video   95k , webm_dash container, vp9, 30fps, video only

160          mp4        256×144    DASH video  108k , mp4_dash container, avc1.4d400b, 30fps, video only

242          webm       426×240    DASH video  220k , webm_dash container, vp9, 30fps, video only

133          mp4        426×240    DASH video  242k , mp4_dash container, avc1.4d400c, 30fps, video only

134          mp4        640×360    360p  104k , mp4_dash container, avc1.4d401e@ 104k, 30fps, video only, 89.95MiB

243          webm       640×360    DASH video  405k , webm_dash container, vp9, 30fps, video only

244          webm       854×480    DASH video  752k , webm_dash container, vp9, 30fps, video only

135          mp4        854×480    DASH video 1155k , mp4_dash container, avc1.4d400a, 30fps, video only

136          mp4        1280×720   720p  243k , mp4_dash container, avc1.64001f@ 243k, 30fps, video only, 209.51MiB

247          webm       1280×720   DASH video 1505k , webm_dash container, vp9, 30fps, video only

137          mp4        1920×1080  1080p  404k , mp4_dash container, avc1.640028@ 404k, 30fps, video only, 348.85MiB

248          webm       1920×1080  DASH video 2646k , webm_dash container, vp9, 30fps, video only

18           mp4        640×360    360p  198k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 170.78MiB

22           mp4        1280×720   720p  371k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

选择对应的编号下载:

youtube-dl -f 135+140 https://www.youtube.com/watch?v=ZsVcKcBiYHM