Skip to content

start_stream_processor

start_stream_processor(
    name: StreamProcessorName,
    *,
    config_overrides: Optional[RekognitionClientConfig] = None,
    start_selector: Optional[StreamProcessingStartSelector] = None,
    stop_selector: Optional[StreamProcessingStopSelector] = None,
) -> StartStreamProcessorResponse

Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers. For more information, see Rekognition feature availability changes.

This change does not impact the availability of other Amazon Rekognition features.

Starts processing a stream processor. You create a stream processor by calling CreateStreamProcessor. To tell StartStreamProcessor which stream processor to start, use the value of the Name field specified in the call to CreateStreamProcessor.

If you are using a label detection stream processor to detect labels, you need to provide a Start selector and a Stop selector to determine the length of the stream processing time.

Parameters:

  • name (StreamProcessorName) –

    The name of the stream processor to start processing.

  • start_selector (Optional[StreamProcessingStartSelector], default: None ) –

    Specifies the starting point in the Kinesis stream to start processing. You can use the producer timestamp or the fragment number. If you use the producer timestamp, you must put the time in milliseconds. For more information about fragment numbers, see Fragment.

    This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

  • stop_selector (Optional[StreamProcessingStopSelector], default: None ) –

    Specifies when to stop processing the stream. You can specify a maximum amount of time to process the video.

    This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

Raises:

Source code in docs_src/capo_rekognition/_services/rekognition.py
def start_stream_processor(
    self,
    name: "capo_rekognition.types.stream_processor_name.StreamProcessorName",
    *,
    config_overrides: Optional[RekognitionClientConfig] = None,
    start_selector: Optional[
        "capo_rekognition.types.stream_processing_start_selector.StreamProcessingStartSelector"
    ] = None,
    stop_selector: Optional[
        "capo_rekognition.types.stream_processing_stop_selector.StreamProcessingStopSelector"
    ] = None,
) -> "capo_rekognition.types.start_stream_processor_response.StartStreamProcessorResponse":
    """<important> <p>Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers. For more information, see <a href="https://docs.aws.amazon.com/rekognition/latest/dg/rekognition-availability-changes.html">Rekognition feature availability changes</a>.</p> <p> <b>This change does not impact the availability of other Amazon Rekognition features.</b> </p> </important> <p>Starts processing a stream processor. You create a stream processor by calling <a>CreateStreamProcessor</a>. To tell <code>StartStreamProcessor</code> which stream processor to start, use the value of the <code>Name</code> field specified in the call to <code>CreateStreamProcessor</code>.</p> <p>If you are using a label detection stream processor to detect labels, you need to provide a <code>Start selector</code> and a <code>Stop selector</code> to determine the length of the stream processing time.</p>

    Args:
        name: <p>The name of the stream processor to start processing.</p>
        start_selector: <p> Specifies the starting point in the Kinesis stream to start processing. You can use the producer timestamp or the fragment number. If you use the producer timestamp, you must put the time in milliseconds. For more information about fragment numbers, see <a href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_Fragment.html">Fragment</a>. </p> <p>This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.</p>
        stop_selector: <p> Specifies when to stop processing the stream. You can specify a maximum amount of time to process the video. </p> <p>This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.</p>

    Raises:
        capo_rekognition.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform the action.</p>
        capo_rekognition.errors.internal_server_error.InternalServerError: <p>Amazon Rekognition experienced a service issue. Try your call again.</p>
        capo_rekognition.errors.invalid_parameter_exception.InvalidParameterException: <p>Input parameter violated a constraint. Validate your parameter before calling the API operation again.</p>
        capo_rekognition.errors.provisioned_throughput_exceeded_exception.ProvisionedThroughputExceededException: <p>The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.</p>
        capo_rekognition.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is already being used.</p>
        capo_rekognition.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request cannot be found.</p>
        capo_rekognition.errors.throttling_exception.ThrottlingException: <p>Amazon Rekognition is temporarily unable to process the request. Try your call again.</p>
        capo_rekognition.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rekognition.types.start_stream_processor_request.StartStreamProcessorRequest]",
    ) -> OperationResponse[
        "capo_rekognition.types.start_stream_processor_response.StartStreamProcessorResponse"
    ]:
        import capo_rekognition._operations.rekognition_service.start_stream_processor

        output, http_response = (
            capo_rekognition._operations.rekognition_service.start_stream_processor.start_stream_processor(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartStreamProcessor")
    )
    input_: capo_rekognition.types.start_stream_processor_request.StartStreamProcessorRequest = {
        "name": name
    }
    if start_selector is not None:
        input_["start_selector"] = start_selector
    if stop_selector is not None:
        input_["stop_selector"] = stop_selector

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output