Voiced by Amazon Polly |
Architecture of AWS Kinesis
The onslaught of pandemics has opened up a new normal way of life with which remote working and online classes took the driving seat. Today organizations and educational institutes have started using peer-to-peer and multi-peer live stream video connections in real-time. In this blog, we will look at how to set up peer-to-peer live video streaming with the AWS Kinesis video streams Service.
Amazon Kinesis video streams service is an AWS media service that allows users to connect to peer-to-peer and multi-peer live streaming video connections. It is also used in the majority of IoT (Internet of Things) camera applications to allow users to access their video streams from anywhere in the world.
Customized Cloud Solutions to Drive your Business Success
- Cloud Migration
- Devops
- AIML & IoT
Configuring Amazon Cognito
Log in to the AWS console, type Cognito into the search box, and then choose and navigate to the Cognito service.
Set Up a User Pool
At the Amazon Cognito console choose the Manage user pools
After clicking Create a user pool
Enter Live_stream_user_pool at Pool name
Then choose Review defaults
After reviewing click create a pool
In a short time, a pool will be created. Make note of the Pool Id that we will use later.
On the page of the pool, choose App Client then click Add an app client option.
On the app-client page, enter the app client name as Live_stream_app_client then scroll down and choose the create app client button.
Created app client will be displayed, note down the App client id and App client secret these ids will be used later.
Set Up an Identity Pool
At the Amazon Cognito console choose Manage Identity pools
Enter Identity pool name as Live_stream_identity_pool. Extend the section Authentication providers. Add the User Pool ID and App Client ID data from the previous method to the Cognito tab, then choose to create the pool.
Next page, expand the Show Details part. Choose View Policy Document in the section that has a value for Role name that ends in Auth_Role. Select Edit, and then accept the Edit Policy dialogue box. Then copy and paste the following JSON into the editor.
{
“Version”: “2012-10-17”,
“Statement”: [
{
“Effect”: “Allow”,
“Action”: [
“cognito-identity:*”,
“kinesisvideo:*”
],
“Resource”: [
“*”
]
}
]
}
After clicking Allow. Copy, and save the Identity pool ID value from the Get AWS Credentials code snippet on the next page. This value will be required while configuring the Android application.
Android application development:
To create the mobile application for video streaming, we will require the Android studio IDE (https://developer.android.com/studio/index.html) From this link you can download and install it. We recommend at least version 3.0.0, which was released in October of 2017.
AWS provides SDKs (Software Development Kit) readily available to developers. Run the following command in your system to get the WebRTC SDK for Android (git clone https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android.git) Before executing this command, make sure. git has been installed.
Open Amazon-kinesis-video-streams-webrtc-sdk-android/build.gradle with Open as Project to import the Android WebRTC SDK into the Android Studio integrated development environment (IDE). When you launch Studio for the first time, it will install all the missing packages and select Accept to proceed with the installation.
To configure AWS Cognito credentials, open awsconfiguration.json (from **/src/main/res/raw/) in your Android IDE. The file appears as indicated in the image below.
Testing:
Open the Kinesis video app on your mobile and select Create new account, then complete, select Create new account, complete the form, and sign up. Then, use the username and password to log in. To start a live stream, enter the demo channel at the channel name location and select Start Master. The live stream will begin.
To test the live stream, go to the AWS kinesis video streams interface and select the streaming channel. You should be able to see the demo-channel that was created when we launched Start Master from the mobile app. Open the demo-channel by clicking it.Choose Media playback viewer from the demo-channel portal, then click the play button to view the live streaming video. To establish a peer-to-peer connection, install the same Android app on another device, enter the demo-channel at the channel name location and select the Start Viewer option, after which the video stream will begin from both ends.
Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.
- Cloud Training
- Customized Training
- Experiential Learning
About CloudThat
CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.
CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, AWS GenAI Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, Amazon ECS Service Delivery Partner, AWS Glue Service Delivery Partner, Amazon Redshift Service Delivery Partner, AWS Control Tower Service Delivery Partner, AWS WAF Service Delivery Partner, Amazon CloudFront Service Delivery Partner, Amazon OpenSearch Service Delivery Partner, AWS DMS Service Delivery Partner, AWS Systems Manager Service Delivery Partner, Amazon RDS Service Delivery Partner, AWS CloudFormation Service Delivery Partner, AWS Config, Amazon EMR and many more.
FAQs
1. 1. What is Amazon Kinesis video streams with WebRTC?
ANS: – Amazon Kinesis Video Streams for WebRTC is a fully managed service. It makes developers life easy by freeing them from activities like procuring, installing and maintaining their own media servers.
2. 2. What is WebRTC technology?
ANS: – WebRTC or Web Real-Time Communications is an open source project that helps to accomplish real-time voice, text and video communications between web browsers and devices.

WRITTEN BY Vasanth Kumar R
Vasanth Kumar R works as a Sr. Research Associate at CloudThat. He is highly focused and passionate about learning new cutting-edge technologies including Cloud Computing, AI/ML & IoT/IIOT. He has experience with AWS and Azure Cloud Services, Embedded Software, and IoT/IIOT Development, and also worked with various sensors and actuators as well as electrical panels for Greenhouse Automation.
Comments