I have uploaded a video to Google's Cloud Storage bucket and referenced their URL in the Video Intelligence API. When I tried to get the video duration of the uploaded video, Video Intelligence API doesn't return anything.
This is the code I used:
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
Is it possible to get video time duration using Video Intelligence API? Alternatively, how should I get it from Google Cloud Storage API?