0

I started to get:

concurrent.futures._base.TimeoutError: Operation did not complete within the designated timeout.

(even for a 5 sec videos & I have timeout=1000)

It started on Oct 5 (before that it work great for months).

What I use: python:3.8.7 ,pip install google-cloud-videointelligence==2.3.3 ,Google cloud ,running on Cloud Run - python:3.8.7-slim

Code:

from google.cloud import videointelligence
video_client = videointelligence.VideoIntelligenceServiceClient()
context = videointelligence.VideoContext(
            segments=None
    )
features=  [  videointelligence.Feature.LABEL_DETECTION,
            videointelligence.Feature.TEXT_DETECTION,
            videointelligence.Feature.OBJECT_TRACKING]
request = videointelligence.AnnotateVideoRequest(
        input_uri="gs://"+path,
        video_context=context,
        features=features
    )
operation = video_client.annotate_video(request)
result = operation.result(timeout=1000)
result = json.loads(MessageToJson(result._pb))
Ricco D
  • 6,873
  • 1
  • 8
  • 18
Tal Yahav
  • 159
  • 8

1 Answers1

0

One of the reasons that you encounter error concurrent.futures._base.TimeoutError: Operation did not complete within the designated timeout. is that you are sending more video material per minute than before and you might be hitting the quota "Backend time in seconds per minute" during processing. See quotas for more information.

Check if you are hitting the quota in Cloud Console > IAM & Admin > Quotas and search for "Backend time in seconds per minute". If so, increase the "Backend time in seconds per minute" quota to your desired value to increase the number of videos processed in parallel.

Just to add, I was able to reproduce the same error when I hit the quota. Below is the sample image:

enter image description here

See actual error message when quota was hit:

enter image description here

Ricco D
  • 6,873
  • 1
  • 8
  • 18