aws / amazon-kinesis-video-streams-parser-library

Amazon Kinesis Video Streams parser library is for developers to include in their applications that makes it easy to work with the output of video streams such as retrieving frame-level objects, metadata for fragments, and more.
Apache License 2.0
102 stars 52 forks source link

Add example that shows integration with Kinesis Video Streams. #4

Closed sayantacC closed 6 years ago

sayantacC commented 6 years ago

Description of changes: Add example that shows integration with Kinesis Video Streams. This example includes:

  1. Create a stream, deleting and recreating if the stream of the same name already exists. It sets the retention period of the created stream to 48 hours.
  2. Call PutMedia to stream video fragments into the stream.
  3. Simultaneously call GetMedia to stream video fragments out of the stream.
  4. It uses the StreamingMkvParser to parse the returned the stream and perform these steps: 4.1 The GetMedia output stream has one mkv segment for each fragment. Merge the mkv segments that share track information into a single segment. 4.2 Log when we receive the start and end of each fragment including the fragment sequence number and millis behind now.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.