Table of Contents
A low-level client representing Amazon Kinesis Video Streams Archived Media (Kinesis Video Archived Media):
client = session.create_client('kinesis-video-archived-media')
These are the available methods:
Check if an operation can be paginated.
Generate a presigned url given a client, its method, and arguments
The presigned url
Gets media for a list of fragments (specified by fragment number) from the archived data in a Kinesis video stream.
Note
This operation is only available for the AWS SDK for Java. It is not supported in AWS SDKs for other languages.
The following limits apply when using the GetMediaForFragmentList API:
See also: AWS API Documentation
Request Syntax
response = client.get_media_for_fragment_list(
StreamName='string',
Fragments=[
'string',
]
)
[REQUIRED]
The name of the stream from which to retrieve fragment media.
[REQUIRED]
A list of the numbers of fragments for which to retrieve media. You retrieve these values with ListFragments .
dict
Response Syntax
{
'ContentType': 'string',
'Payload': StreamingBody()
}
Response Structure
(dict) --
ContentType (string) --
The content type of the requested media.
Payload (StreamingBody) --
The payload that Kinesis Video Streams returns is a sequence of chunks from the specified stream. For information about the chunks, see PutMedia . The chunks that Kinesis Video Streams returns in the GetMediaForFragmentList call also include the following additional Matroska (MKV) tags:
The following tags will be included if an exception occurs:
Create a paginator for an operation.
Returns an object that can wait for some condition.
Returns a list of Fragment objects from the specified stream and start location within the archived data.
See also: AWS API Documentation
Request Syntax
response = client.list_fragments(
StreamName='string',
MaxResults=123,
NextToken='string',
FragmentSelector={
'FragmentSelectorType': 'PRODUCER_TIMESTAMP'|'SERVER_TIMESTAMP',
'TimestampRange': {
'StartTimestamp': datetime(2015, 1, 1),
'EndTimestamp': datetime(2015, 1, 1)
}
}
)
[REQUIRED]
The name of the stream from which to retrieve a fragment list.
Describes the time stamp range and time stamp origin for the range of fragments to return.
The origin of the time stamps to use (Server or Producer).
The range of time stamps to return.
The starting time stamp in the range of time stamps for which to return fragments.
The ending time stamp in the range of time stamps for which to return fragments.
dict
Response Syntax
{
'Fragments': [
{
'FragmentNumber': 'string',
'FragmentSizeInBytes': 123,
'ProducerTimestamp': datetime(2015, 1, 1),
'ServerTimestamp': datetime(2015, 1, 1),
'FragmentLengthInMilliseconds': 123
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Fragments (list) --
A list of fragment numbers that correspond to the time stamp range provided.
(dict) --
Represents a segment of video or other time-delimited data.
FragmentNumber (string) --
The index value of the fragment.
FragmentSizeInBytes (integer) --
The total fragment size, including information about the fragment and contained media data.
ProducerTimestamp (datetime) --
The time stamp from the producer corresponding to the fragment.
ServerTimestamp (datetime) --
The time stamp from the AWS server corresponding to the fragment.
FragmentLengthInMilliseconds (integer) --
The playback duration or other time value associated with the fragment.
NextToken (string) --
If the returned list is truncated, the operation returns this token to use to retrieve the next page of results. This value is null when there are no more results to return.
The available paginators are: