youtube-dl 最高质量的 DASH 视频和音频,无需人工干预 [英] youtube-dl DASH video and audio in highest quality without human intervention

查看:90
本文介绍了youtube-dl 最高质量的 DASH 视频和音频,无需人工干预的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 youtube-dl,我首先查看可用的视频质量,然后在第二步中下载可能的最高质量(在本例中为 -f 137+140).Youtube-dl 会自动合并音视频流(DASH 格式)

With youtube-dl I first look what video quality is available and then in second step I download highest possible quality (in this example -f 137+140). Youtube-dl will automatically merge audio and video stream (DASH format)

如何使用 shell 脚本自动执行此操作?对于每个网址,选择最高的音频和视频质量?

How to automate that with shell script? With every URL, choose highest audio and video quality?

> youtube-dl -F 'https://www.youtube.com/watch?v=VAdRBLyjLRQ&feature=youtu.be&t=8m14s'                              
[youtube] Downloading login page                                                                                                      
[youtube] Logging in                                                                                                                  
[youtube] VAdRBLyjLRQ: Downloading webpage                                                                                            
[youtube] VAdRBLyjLRQ: Downloading video info webpage                                                                                 
[youtube] VAdRBLyjLRQ: Extracting video information                                                                                   
[youtube] VAdRBLyjLRQ: Downloading DASH manifest                                                                                      
[youtube] VAdRBLyjLRQ: Downloading DASH manifest                                                                                      
[info] Available formats for VAdRBLyjLRQ:                                                                                             
format code  extension  resolution note                                                                                               
249          webm       audio only DASH audio , opus @ 50k                                                                            
250          webm       audio only DASH audio , opus @ 70k                                                                            
251          webm       audio only DASH audio , opus @160k                                                                            
171          webm       audio only DASH audio  117k , vorbis@128k (44100Hz), 7.68MiB                                                  
140          m4a        audio only DASH audio  128k , m4a_dash container, aac  @128k (44100Hz), 11.58MiB                              
160          mp4        256x144    DASH video  112k , avc1.4d400c, 15fps, video only, 9.94MiB                                         
278          webm       256x144    DASH video  136k , webm container, VP9, 15fps, video only, 9.10MiB                                 
133          mp4        426x240    DASH video  248k , avc1.4d4015, 30fps, video only, 22.27MiB                                        
242          webm       426x240    DASH video  316k , vp9, 30fps, video only, 22.20MiB                                                
243          webm       640x360    DASH video  557k , vp9, 30fps, video only, 41.05MiB                                                
134          mp4        640x360    DASH video  609k , avc1.4d401e, 30fps, video only, 52.94MiB                                        
244          webm       854x480    DASH video 1021k , vp9, 30fps, video only, 74.05MiB                                                
135          mp4        854x480    DASH video 1115k , avc1.4d401f, 30fps, video only, 97.02MiB                                        
247          webm       1280x720   DASH video 2011k , vp9, 30fps, video only, 150.61MiB                                               
136          mp4        1280x720   DASH video 2282k , avc1.4d401f, 30fps, video only, 189.40MiB                                       
248          webm       1920x1080  DASH video 3838k , vp9, 30fps, video only, 286.61MiB                                               
137          mp4        1920x1080  DASH video 4209k , avc1.640028, 30fps, video only, 354.19MiB                                       
17           3gp        176x144                                                                                                       
36           3gp        320x240                                                                                                       
5            flv        400x240                                                                                                       
43           webm       640x360                                                                                                       
18           mp4        640x360                                                                                                       
22           mp4        1280x720   (best)                                                                                             
> youtube-dl -f 137+140 'https://www.youtube.com/watch?v=VAdRBLyjLRQ&feature=youtu.be&t=8m14s'                      
[youtube] Downloading login page                                                                                                      
[youtube] Logging in                                                                                                                  
[youtube] VAdRBLyjLRQ: Downloading webpage                                                                                            
[youtube] VAdRBLyjLRQ: Downloading video info webpage                                                                                 
[youtube] VAdRBLyjLRQ: Extracting video information                                                                                   
(...)

推荐答案

只需使用 -f bestvideo+bestaudio/best 即可获得最高的结果质量.

Just use -f bestvideo+bestaudio/best for highest resulting quality available.

如果您想更喜欢 MP4 格式的容器而不是 WebM,请使用:

If you wanted to prefer MP4 format containers instead of WebM, use:

-f bestvideo[ext!=webm]‌ +bestaudio[ext!=webm]‌/best[ext!=webm].

这篇关于youtube-dl 最高质量的 DASH 视频和音频,无需人工干预的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆