向Google Cloud Video API发送请求。

huangapple go评论51阅读模式
英文:

Making request to Google Cloud Video API

问题

我正在尝试使用Google Cloud Video API来分析一些视频。
我正在尝试创建注释请求,应该是这样的

curl -X POST \
  -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
  -H "Content-Type: application/json; charset=utf-8" \
  --data '{"inputUri":"gs://YOUR_BUCKET/YOUR_OBJECT","features":["LABEL_DETECTION"]}'\
  "https://videointelligence.googleapis.com/v1/videos:annotate"

我的问题是,我不知道YOUR_BUCKET和YOUR_OBJECT代表什么?文档中没有指定这些参数是什么。有人可以帮我解释一下吗?

英文:

I am trying to use the Google Cloud Video API to analyse some videos.
I am trying to make the annotation request and it should be like this

curl -X POST \
  -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
  -H "Content-Type: application/json; charset=utf-8" \
  --data '{"inputUri":"gs://YOUR_BUCKET/YOUR_OBJECT","features":["LABEL_DETECTION"]}'\
  "https://videointelligence.googleapis.com/v1/videos:annotate"

My question is I have no idea what YOUR_BUCKET and YOUR_OBJECT represent? and there is no where on the documentation that specifies what this parameters are. Can someone help tell me what they are?

答案1

得分: 1

那个网址(gs://.....)表示一个Google云存储位置(URL)。

如果您查看文档,它说

> 要运行您的应用程序,只需将视频的Cloud Storage URI传递给它:
> gs://YOUR_BUCKET/YOUR_OBJECT

YOUR_BUCKET 是指您的云存储桶的名称,而 YOUR_OBJECT 是视频文件的名称。

英文:

That url (gs://.....) indicates a google cloud storage location (url).

If you look at the docs, it says

> To run your application, simply pass it the Cloud Storage URI of a video:
> gs://YOUR_BUCKET/YOUR_OBJECT

YOUR_BUCKET is referring to the name of your cloud storage bucket while YOUR_OBJECT is the name of the video file

huangapple
  • 本文由 发表于 2023年7月13日 23:30:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76681099.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定