Analytics | Amazon Kinesis Video Streams Flashcards

1
Q

What is Amazon Kinesis Video Streams?

General

Amazon Kinesis Video Streams | Analytics

A

Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), and other processing. Kinesis Video Streams automatically provisions and elastically scales all the infrastructure needed to ingest streaming video data from millions of devices. It also durably stores, encrypts, and indexes video data in your streams, and allows you to access your data through easy-to-use APIs. Kinesis Video Streams enables you to quickly build computer vision and ML applications through integration with Amazon Rekognition Video and libraries for ML frameworks such as Apache MxNet, TensorFlow, and OpenCV.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is time-encoded data?

General

Amazon Kinesis Video Streams | Analytics

A

Time-encoded data is any data in which the records are in a time series, and each record is related to its previous and next records. Video is an example of time-encoded data, where each frame is related to the previous and next frames through spatial transformations. Other examples of time-encoded data include audio, RADAR, and LIDAR signals. Amazon Kinesis Video Streams is designed specifically for cost-effective, efficient ingestion and storage of all kinds of time-encoded data for analytics and ML use cases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are common use cases for Kinesis Video Streams?

General

Amazon Kinesis Video Streams | Analytics

A

Kinesis Video Streams is ideal for building computer vision-enabled ML applications that are becoming prevalent in a wide range of use cases such as the following:

Smart Home

With Kinesis Video Streams, you can easily stream video and audio from camera-equipped home devices such as baby monitors, webcams, and home surveillance systems to AWS. You can then use the streams to build a variety of smart home applications ranging from simple video playback to intelligent lighting, climate control systems, and security solutions.

Smart City

Many cities have installed large numbers of cameras at traffic lights, parking lots, shopping malls, and just about every public venue, capturing video 24/7. You can use Kinesis Video Streams to securely and cost-effectively ingest, store, and analyze this massive volume of video data to help solve traffic problems, help prevent crime, dispatch emergency responders, and much more.

Industrial Automation

You can use Kinesis Video Streams to collect a variety of time-encoded data such as RADAR and LIDAR signals, temperature profiles, and depth data from industrial equipment. You can then analyze the data using your favorite machine learning framework including Apache MxNet, TensorFlow, and OpenCV for industrial automation use cases like predictive maintenance. For example, you can predict the lifetime of a gasket or valve and schedule part replacement in advance, reducing downtime and defects in a manufacturing line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does Amazon Kinesis Video Streams manage on my behalf?

Key concepts

Amazon Kinesis Video Streams | Analytics

A

Amazon Kinesis Video Streams is a fully managed video ingestion and storage service. It enables you to securely ingest, process, and store video at any scale for applications that power robots, smart cities, industrial automation, security monitoring, machine learning (ML), and more. Kinesis Video Streams also ingests other kinds of time-encoded data like audio, RADAR, and LIDAR signals. Kinesis Video Streams provides you SDKs to install on your devices to make it easy to securely stream video to AWS. Kinesis Video Streams automatically provisions and elastically scales all the infrastructure needed to ingest video streams from millions of devices. It also durably stores, encrypts, and indexes the video streams and provides easy-to-use APIs so that applications can access and retrieve indexed video fragments based on tags and timestamps. Kinesis Video Streams provides a library to integrate ML frameworks such as Apache MxNet, TensorFlow, and OpenCV with video streams to build machine learning applications. Kinesis Video Streams is integrated with Amazon Rekognition Video, enabling you to build computer vision applications that detect objects, events, and people.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a video stream?

Key concepts

Amazon Kinesis Video Streams | Analytics

A

A video stream is a resource that enables you to capture live video and other time-encoded data, optionally store it, and make the data available for consumption both in real time and on a batch or ad-hoc basis. When you choose to store data in the video stream, Kinesis Video Streams will encrypt the data, and generate a time-based index on the stored data. In a typical configuration, a Kinesis video stream has only one producer publishing data into it. The Kinesis video stream can have multiple consuming applications processing the contents of the video stream.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a fragment?

Key concepts

Amazon Kinesis Video Streams | Analytics

A

A fragment is a self-contained sequence of frames. The frames belonging to a fragment should have no dependency on any frames from other fragments. As fragments arrive, Kinesis Video Streams assigns a unique fragment number, in increasing order. It also stores producer-side and server-side time stamps for each fragment, as Kinesis Video Streams-specific metadata.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a producer?

Key concepts

Amazon Kinesis Video Streams | Analytics

A

A producer is a general term used to refer to a device or source that puts data into a Kinesis video stream. A producer can be any video-generating device, such as a security camera, a body-worn camera, a smartphone camera, or a dashboard camera. A producer can also send non-video time-encoded data, such as audio feeds, images, or RADAR data. One producer can generate one or more video streams. For example, a video camera can push video data to one Kinesis video stream and audio data to another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a consumer?

Key concepts

Amazon Kinesis Video Streams | Analytics

A

Consumers are your custom applications that consume and process data in Kinesis video streams in real time, or after the data is durably stored and time-indexed when low latency processing is not required. You can create these consumer applications to run on Amazon EC2 instances. You can also use other Amazon AI services such as Amazon Rekognition, or third party video analytics providers to process your video streams.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a chunk?

Key concepts

Amazon Kinesis Video Streams | Analytics

A

Upon receiving the data from a producer, Kinesis Video Streams stores incoming media data as chunks. Each chunk consists of the actual media fragment, a copy of media metadata sent by the producer, and the Kinesis Video Streams-specific metadata such as the fragment number, and server-side and producer-side timestamps. When a consumer requests media data through the GetMedia API operation, Kinesis Video Streams returns a stream of chunks, starting with the fragment number that you specify in the request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do I think about latency in Amazon Kinesis Video Streams?

Publishing data to streams

Amazon Kinesis Video Streams | Analytics

A

There are four key contributors to latency in an end-to-end media data flow.

Time spent in the device’s hardware media pipeline: This pipeline can comprise of the image sensor and any hardware encoders as appropriate. In theory, this is can be as little as a single frame duration. In practice it rarely is. All encoders in order to work effectively for media encoding (compression) will accumulate several frames to construct a fragment. This process and any corresponding motion compensation algorithms will add anywhere from one second to several seconds of latency on the device before the data is packaged for transmission.

Latency incurred on actual data transmission on the internet: The quality of the network throughput and latency can vary significantly based on where the producing device is located.

Latency added by the Kinesis Video Streams as it receives data from the producer device: The incoming data is made available immediately on the GetMedia API operation for any consuming application. If you choose to retain data, then Kinesis Video Streams will ensure that the data is encrypted using AWS Key Management Service (AWS KMS) and generate a time-based index on the individual fragments in the video stream. When you access this retained data using the GetMediaforFragmentList API, Kinesis Video Streams fetches the fragments from durable storage, decrypt the data, and make it available for the consuming application.

Time latency on data transmission back to the consumer: There can be consuming devices on the internet or other AWS regions that request the media data. The quality of the network throughput and latency can vary significantly based on where the consuming device is located.

Finally the Kinesis Video Streams management console fetches the supported H.264 media type, trans-packages it for various browsers, and allows you to playback streams for development or test purposes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do I publish data to my Kinesis video stream?

Publishing data to streams

Amazon Kinesis Video Streams | Analytics

A

You can publish media data to a Kinesis video stream via the PutMedia operation, or use the Kinesis Video Streams Producer SDKs in Java, C++, or Android. If you choose to use the PutMedia operation directly, you will be responsible for packaging the media stream according to the Kinesis Video Streams data specification, handle the stream creation, token rotation, and other actions necessary for reliable streaming of media data to the AWS cloud. We recommend using the Producer SDKs to make these tasks simpler and get started faster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Kinesis Video Streams PutMedia operation?

Publishing data to streams

Amazon Kinesis Video Streams | Analytics

A

Kinesis Video Streams provides a PutMedia API to write media data to a Kinesis video stream. In a PutMedia request, the producer sends a stream of media fragments. As fragments arrive, Kinesis Video Streams assigns a unique fragment number, in increasing order. It also stores producer-side and server-side time stamps for each fragment, as Kinesis Video Streams-specific metadata.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the Kinesis Video Streams Producer SDK?

Publishing data to streams

Amazon Kinesis Video Streams | Analytics

A

The Amazon Kinesis Video Streams Producer SDK are a set of easy-to-use and highly configurable libraries that you can install and customize for your specific producers. The SDK makes it easy to build an on-device application that securely connects to a video stream, and reliably publishes video and other media data to Kinesis Video Streams. It takes care of all the underlying tasks required to package the frames and fragments generated by the device’s media pipeline. The SDK also handles stream creation, token rotation for secure and uninterrupted streaming, processing acknowledgements returned by Kinesis Video Streams, and other tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In which programming platforms is the Kinesis Video Streams Producer SDK available?

Publishing data to streams

Amazon Kinesis Video Streams | Analytics

A

Kinesis Video Streams Producer SDK’s core is built in C, so it is efficient and portable to a variety of hardware platforms. Most developers will prefer to use the C++ or Java versions of the Kinesis Video Streams producer SDK. There is also an Android version of the producer SDK for mobile app developers who want to stream video data from Android devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What should I be aware of before getting started with the Kinesis Video Streams producer SDK?

Reading data from streams

Amazon Kinesis Video Streams | Analytics

A

The Kinesis Video Streams producer SDK does all the heavy lifting of packaging frames and fragments, establishes a secure connection, and reliably streams video to AWS. However there are many different varieties of hardware devices and media pipelines running on them. To make the process of integration with the media pipeline easier, we recommend having some knowledge of: 1) the frame boundaries, 2) the type of a frame used for the boundaries, I-frame or non I-frame, and 3) the frame encoding time stamp.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the GetMedia API?

Reading data from streams

Amazon Kinesis Video Streams | Analytics

A

You can use the GetMedia API to retrieve media content from a Kinesis video stream. In the request, you identify stream name or stream Amazon Resource Name (ARN), and the starting chunk. Kinesis Video Streams then returns a stream of chunks in order by fragment number. When you put media data (fragments) on a stream, Kinesis Video Streams stores each incoming fragment and related metadata in what is called a “chunk.” The GetMedia API returns a stream of these chunks starting from the chunk that you specify in the request.

17
Q

What is the GetMediaForFragmentList API?

Reading data from streams

Amazon Kinesis Video Streams | Analytics

A

You can use the GetMediaForFragmentList API to retrieve media data for a list of fragments (specified by fragment number) from the archived data in a Kinesis video stream. Typically a call to this API operation is preceded by a call to the ListFragments API.

18
Q

What is the ListFragments API?

Reading data from streams

Amazon Kinesis Video Streams | Analytics

A

You can use the ListFragments API to return a list of Fragments from the specified video stream and start location - using the fragment number or timestamps - within the retained data.

19
Q

How long can I store data in Kinesis Video Streams?

Reading data from streams

Amazon Kinesis Video Streams | Analytics

A

You can store data in their streams for as long as you like. Kinesis Video Streams allows you to configure the data retention period to suit your archival and storage requirements.

20
Q

What is the Kinesis Video Streams parser library?

Reading data from streams

Amazon Kinesis Video Streams | Analytics

A

The Kinesis Video Streams parser library makes it easy for developers to consume and process the output of Kinesis Video Streams GetMedia operation. Application developers will include the library in their video analytics and processing applications that operate on video streams. The applications themselves will run on your EC2 instances, although they can be run elsewhere. The library has features that make it easy to get a frame-level object and its associated metadata, extract and collect Kinesis Video Streams-specific metadata attached to fragments, and consecutive fragments. You can then build custom applications that can more easily use the raw video data for your use cases.

21
Q

If I have a custom processing application that needs to use the frames (and fragments) carried by the Kinesis video stream, how do I do that?

Console

Amazon Kinesis Video Streams | Analytics

A

In general, if you want to consume video streams and then manipulate them to fit your custom application’s needs, then there are two key steps to consider. First, get the bytes in a frame from the formatted stream vended by the GetMedia API. You can use the stream parser library to get the frame objects. Next, get the metadata necessary to decode a frame such as the pixel height, width, codec id, and codec private data. Such metadata is embedded in the track elements. The parser library makes extracting this information easier by providing helper classes to collect the track information for a fragment.

The steps after this are highly application dependent. You may wish to decode frames, format them for a playback engine, transcode them for content distribution, or feed them into a custom deep learning application format. The Kinesis Video Streams stream parser library is open-sourced so that you can extend it for your specific use cases.

22
Q

What is the Kinesis Video Streams management console?

Console

Amazon Kinesis Video Streams | Analytics

A

The Kinesis Video Streams management console enables you to create, update, manage, and monitor your video streams. It console can also playback your media streams live or on an on-demand basis, as long as the content in the streams is in the supported media type. Using the player controls, you can view the live stream, skip forwards or backwards 10 seconds, use the date and time picker to rewind to a point in the past when you have set the corresponding retention period for the video stream. The Kinesis Video Streams management console’s video playback capabilities are offered as a quick diagnostic tool for development and test scenarios for developers as they build solutions using Kinesis Video Streams.

23
Q

What media type does the console support?

Console

Amazon Kinesis Video Streams | Analytics

A

The only supported video media type for playback in the Kinesis Video Streams management console is the popular H.264 format. This media format has wide support on devices, hardware and software encoders and playback engines. While, you can ingest any variety of video, audio, or other custom time-encoded data types for your own consumer applications and use cases, the management console will not perform playback of those other data types.

24
Q

What is the delay in the playback of video on the Kinesis Video Streams management console?

Encryption

Amazon Kinesis Video Streams | Analytics

A

For a producer that is transmitting video data into the video stream, you will experience a 2 - 10 second lag in the live playback experience in the Kinesis Video Streams management console. The majority of the latency is added by the producer device as it accumulates frames into fragments before it transmits data over the internet. Once the data enters into the Kinesis Video Streams endpoint and you request playback, the console will get H.264 media type fragments from the durable storage, trans-package the fragments into a media format suitable for playback across different internet browsers. The trans-packaged media content will then be transferred to your location where you requested the playback from over the internet.

25
Q

What Is Server-Side Encryption for Kinesis Video Streams?

Encryption

Amazon Kinesis Video Streams | Analytics

A

Server-side encryption is a feature in Kinesis Video Streams that automatically encrypts data before it’s at rest by using an AWS KMS customer master key (CMK) that you specify. Data is encrypted before it is written to the Kinesis Video Streams storage layer, and it is decrypted after it is retrieved from storage. As a result, your data is always encrypted at rest within the Kinesis Video Streams service.

26
Q

How do I get started with server-side encryption?

Encryption

Amazon Kinesis Video Streams | Analytics

A

Server-side encryption is always enabled on Kinesis video streams. If a user-provided key is not specified when the stream is created, the default key (provided by Kinesis Video Streams) is used.

A user-provided AWS KMS master key must be assigned to a Kinesis Video Streams stream when it is created. You can’t later assign a different key to a stream using the UpdateStream API.

You can assign a user-provided AWS KMS master key to a Kinesis video stream in two ways: When creating a Kinesis video stream in the console, specify the AWS KMS master key in the Encryption section on the Create new Kinesis Video stream page. Or when creating a Kinesis Video Streams stream using the CreateStream API, specify the key ID in the KmsKeyId parameter.

27
Q

How much does it cost to use server-side encryption?

Pricing and billing

Amazon Kinesis Video Streams | Analytics

A

When you apply server-side encryption, you are subject to AWS KMS API usage and key costs. Unlike custom AWS KMS master keys, the (Default) aws/kinesis-video customer master key (CMK) is offered free of charge. However, you still pay for the API usage costs that Kinesis Video Streams incurs on your behalf. API usage costs apply for every CMK, including custom ones. Kinesis Video Streams calls AWS KMS approximately every 45 minutes when it is rotating the data key. In a 30-day month, the total cost of AWS KMS API calls that are initiated by a Kinesis Video Streams stream should be less than a few dollars. This cost scales with the number of user credentials that you use on your data producers and consumers because each user credential requires a unique API call to AWS KMS.

28
Q

Is Amazon Kinesis Video Streams available in AWS Free Tier?

Pricing and billing

Amazon Kinesis Video Streams | Analytics

A

No. Amazon Kinesis Video Streams is not available in AWS Free Tier.

29
Q

How much does Kinesis Video Streams cost?

Pricing and billing

Amazon Kinesis Video Streams | Analytics

A

Kinesis Video Streams uses a simple pay as you go pricing. There is neither upfront cost nor minimum fees and you only pay for the resources you use. Kinesis Video Streams pricing is based on the data volume (GB) ingested, volume of data consumed (GB), and data stored (GB-Month) across all the video streams in your account.

Furthermore, Kinesis Video Streams will only charge for media data it successfully received, with a minimum chunk size of 4 KB. For comparison, a 64 kbps audio sample is 8 KB in size, so the minimum chunk size is set low enough to accommodate the smallest of audio or video streams.