Skip to content

Commit

Permalink
Create Video Intelligence: Qwik Start
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush7-BIT authored Jul 19, 2023
1 parent 086eb2c commit ee2e124
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Video Intelligence: Qwik Start
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
gcloud services enable videointelligence.googleapis.com
gcloud iam service-accounts create quickstart
gcloud iam service-accounts keys create key.json --iam-account quickstart@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com
gcloud auth activate-service-account --key-file key.json
gcloud auth print-access-token
cat > request.json <<EOF
{
"inputUri":"gs://spls/gsp154/video/train.mp4",
"features": [
"LABEL_DETECTION"
]
}
EOF

export RESPONSE=$(curl -s -H 'Content-Type: application/json' -H 'Authorization: Bearer '$(gcloud auth print-access-token)'' 'https://videointelligence.googleapis.com/v1/videos:annotate' -d @request.json | jq -r '.name')
curl -s -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$(gcloud auth print-access-token)'' \
'https://videointelligence.googleapis.com/v1/$RESPONSE'

0 comments on commit ee2e124

Please sign in to comment.