youtube视频通常具有多种视频分辨率(质量),例如240p,360p,720p等,我如何检索youtube视频具有的视频分辨率(质量)是否有可以获取此信息的youtube api?Google.Apis.YouTube .v3客户端库不提供信息。
最佳答案
如果我们看YouTuve API V3的视频文件
contentDetails.definition
Indicates whether the video is available in high definition (HD) or only in standard definition.Valid values for this property are: hd sd
如果您尝试使用具有高分辨率的视频在google Api Explorer中尝试,则可以看到结果:
"contentDetails": {
"duration": "PT3M26S",
"dimension": "2d",
"definition": "hd",
"caption": "false",
"licensedContent": true
}
definition": "hd"
您无法获得视频的最高分辨率,只能知道它是否为高清。
您无法区分720p,1080p,1440p,2160p。
关于.net - 使用youtube API检索youtube视频的视频分辨率(质量)是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25154229/