diff --git a/video/cloud-client/analyze/beta_snippets.py b/video/cloud-client/analyze/beta_snippets.py index 356b9ec114d..ac91a086342 100644 --- a/video/cloud-client/analyze/beta_snippets.py +++ b/video/cloud-client/analyze/beta_snippets.py @@ -325,7 +325,10 @@ def stream_generator(): requests = stream_generator() # streaming_annotate_video returns a generator. - responses = client.streaming_annotate_video(requests) + # The default timeout is about 300 seconds. + # To process longer videos it should be set to + # larger than the length (in seconds) of the stream. + responses = client.streaming_annotate_video(requests, timeout=600) # Each response corresponds to about 1 second of video. for response in responses: @@ -385,7 +388,10 @@ def stream_generator(): requests = stream_generator() # streaming_annotate_video returns a generator. - responses = client.streaming_annotate_video(requests) + # The default timeout is about 300 seconds. + # To process longer videos it should be set to + # larger than the length (in seconds) of the stream. + responses = client.streaming_annotate_video(requests, timeout=600) # Each response corresponds to about 1 second of video. for response in responses: @@ -442,7 +448,10 @@ def stream_generator(): requests = stream_generator() # streaming_annotate_video returns a generator. - responses = client.streaming_annotate_video(requests) + # The default timeout is about 300 seconds. + # To process longer videos it should be set to + # larger than the length (in seconds) of the stream. + responses = client.streaming_annotate_video(requests, timeout=600) # Each response corresponds to about 1 second of video. for response in responses: @@ -519,7 +528,10 @@ def stream_generator(): requests = stream_generator() # streaming_annotate_video returns a generator. - responses = client.streaming_annotate_video(requests) + # The default timeout is about 300 seconds. + # To process longer videos it should be set to + # larger than the length (in seconds) of the stream. + responses = client.streaming_annotate_video(requests, timeout=600) # Each response corresponds to about 1 second of video. for response in responses: @@ -585,7 +597,10 @@ def stream_generator(): requests = stream_generator() # streaming_annotate_video returns a generator. - responses = client.streaming_annotate_video(requests) + # The default timeout is about 300 seconds. + # To process longer videos it should be set to + # larger than the length (in seconds) of the stream. + responses = client.streaming_annotate_video(requests, timeout=600) for response in responses: # Check for errors.