youtube-dl

展示可获得的视频源:

youtube-dl -F https://www.youtube.com/watch?v=D6tC1pyrsTM
[youtube] D6tC1pyrsTM: Downloading webpage                                                         
[youtube] D6tC1pyrsTM: Downloading video info webpage                                              
[info] Available formats for D6tC1pyrsTM:                                                          
format code  extension  resolution note                                                            
249          webm       audio only DASH audio   75k , opus @ 50k, 32.65MiB                         
250          webm       audio only DASH audio   93k , opus @ 70k, 42.86MiB                         
140          m4a        audio only DASH audio  132k , m4a_dash container, mp4a.40.2@128k, 76.19MiB 
171          webm       audio only DASH audio  152k , vorbis@128k, 69.31MiB                        
251          webm       audio only DASH audio  165k , opus @160k, 82.32MiB                         
278          webm       256x144    144p  102k , webm container, vp9, 24fps, video only, 54.03MiB   
160          mp4        256x144    144p  113k , avc1.4d400c, 24fps, video only, 37.06MiB           
242          webm       426x240    240p  246k , vp9, 24fps, video only, 109.85MiB                  
133          mp4        426x240    240p  255k , avc1.4d4015, 24fps, video only, 83.05MiB           
243          webm       640x360    360p  433k , vp9, 24fps, video only, 210.91MiB                  
134          mp4        640x360    360p  754k , avc1.4d401e, 24fps, video only, 257.75MiB          
244          webm       854x480    480p  848k , vp9, 24fps, video only, 394.81MiB                  
135          mp4        854x480    480p 1390k , avc1.4d401e, 24fps, video only, 558.05MiB          
247          webm       1280x720   720p 1829k , vp9, 24fps, video only, 822.81MiB                  
136          mp4        1280x720   720p 2794k , avc1.4d401f, 24fps, video only, 1.12GiB            
248          webm       1920x1080  1080p 3435k , vp9, 24fps, video only, 1.45GiB                   
137          mp4        1920x1080  1080p 5281k , avc1.640028, 24fps, video only, 2.07GiB           
271          webm       2560x1440  1440p 9186k , vp9, 24fps, video only, 4.66GiB                   
313          webm       3840x2160  2160p 18778k , vp9, 24fps, video only, 10.16GiB                 
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k, 44.14MiB                     
36           3gp        320x180    small , mp4v.20.3, mp4a.40.2, 127.83MiB                         
18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k, 425.86MiB                 
43           webm       640x360    medium , vp8.0, vorbis@128k, 454.82MiB                          
22           mp4        1280x720   hd720 , avc1.64001F, mp4a.40.2@192k (best)

下载并合并音视频:

youtube-dl -f 137+251 https://www.youtube.com/watch?v=D6tC1pyrsTM

这样4k的视频都能下载下来了。