mynameislopes
mynameislopes

Reputation: 49

Google Cloud Functions - Video intelligence

Would it be possible to create a Google Cloud Function that would do a video intelligence annotate request every time I upload a video into a bucket?

Upvotes: 2

Views: 222

Answers (2)

london_utku
london_utku

Reputation: 1312

@Guillerno's answer is not entirely true. For instance, if the video file is more than 1 hour with HD resolution, the timeout of Google Function which is top most 540 seconds will not be sufficient for Video Intelligence to analyse the content and this will simply timeout.

The only way to achieve this is to create a Google App Flex Engine with couple of hours timeout, and execute the AnnotateVideo function in that instance.

For long videos, Cloud Function will not be the solution for Video Intelligence.

Upvotes: 0

Guillermo Cacheda
Guillermo Cacheda

Reputation: 2232

Yes:

  • Create a Cloud Function with a Storage Trigger for the desired bucket

  • In the Cloud Function, check if the uploaded file is a video

  • Use the Video Intelligence Client Library to make the request using the file you just uploaded to the bucket

Upvotes: 3

Related Questions