Rekognition / Client / start_stream_processor

start_stream_processor#

Rekognition.Client.start_stream_processor(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.start_stream_processor(
    Name='string',
    StartSelector={
        'KVSStreamStartSelector': {
            'ProducerTimestamp': 123,
            'FragmentNumber': 'string'
        }
    },
    StopSelector={
        'MaxDurationInSeconds': 123
    }
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The name of the stream processor to start processing.

  • StartSelector (dict) –

    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.

    • KVSStreamStartSelector (dict) –

      Specifies the starting point in the stream to start processing. This can be done with a producer timestamp or a fragment number in a Kinesis stream.

      • ProducerTimestamp (integer) –

        The timestamp from the producer corresponding to the fragment, in milliseconds, expressed in unix time format.

      • FragmentNumber (string) –

        The unique identifier of the fragment. This value monotonically increases based on the ingestion order.

  • StopSelector (dict) –

    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.

    • MaxDurationInSeconds (integer) –

      Specifies the maximum amount of time in seconds that you want the stream to be processed. The largest amount of time is 2 minutes. The default is 10 seconds.

Return type:

dict

Returns:

Response Syntax

{
    'SessionId': 'string'
}

Response Structure

  • (dict) –

    • SessionId (string) –

      A unique identifier for the stream processing session.

Exceptions