Pez*_*Pez 5 google-cloud-storage google-cloud-platform video-intelligence-api
我已将视频上传到Google的Cloud Storage存储桶,并在Video Intelligence API中引用了它们的URL。当我尝试获取上载视频的视频时长时,Video Intelligence API不会返回任何内容。
这是我使用的代码:
require "google/cloud/video_intelligence"
video_intelligence_client = Google::Cloud::VideoIntelligence.new
features_element = :LABEL_DETECTION
features = [features_element]
operation = video_intelligence_client.annotate_video input_uri: input_uri, features: features
p "PROCESSING......"
p operation
raise operation.results.message? if operation.error?
operation.wait_until_done!
metadata = operation.metadata
puts metadata
Run Code Online (Sandbox Code Playgroud)
使用Video Intelligence API是否可以获取视频时长?另外,我应该如何从Google Cloud Storage API获取它?
| 归档时间: |
|
| 查看次数: |
88 次 |
| 最近记录: |