Amazon Kinesis Video Streams adapter
Kinesis Video Streams Adapter is a TCP server application that serves
video from a Amazon Kinesis Video stream to connected clients such as
GStreamer multimedia framework.
The adaptor was originally made to support low latency video streaming from
Amazon Kinesis Video stream to QGroundControl ground control station. However, it
is fairly generic and can be used for other applications.
Amazon Kinesis Video Streams parser library
has an example for continuously piping the output of GetMedia calls from a
Kinesis Video stream to GStreamer. However, the example uses fdsrc GStreamer
element that is not supported on Windows.
The adapter is a java application that can run on any sysplatformtem supported
by java, however that may require some additional configuration not
described here.
Create IAM user that has permissions to get media
from the stream and configure the user’s AWS access key Id and secret access key in %UserProfile%\.aws\credentials
file.
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Install Java 8
For use with QGroundControl it’s recommended to install GStreamer 1.14.4 from https://gstreamer.freedesktop.org/data/pkg/windows/.
Make sure thatC:\gstreamer\1.0\x86_64\bin
is added toPATH
environment variable.
Enable PowerShell execution on ther machine:
Set-ExecutionPolicy unrestricted
To just start Kinesis Video Streams adapter run PowerShell script kvadapter.ps1:
powershell $Env:KVADAPTER_HOME\bin\kvadapter.ps1 -r <AWS region> -s <stream name>
To start GStreamer pipeline that connects to the adapter on port 4000 and plays
the streaming video, in a separate PowerShell terminal run:
gst-launch-1.0 -v tcpclientsrc port=4000 ! matroskademux ! avdec_h264 ! autovideosink
To start Kinesis Video Streams adapter and a GStreamer pipeline that streames
the h.264 encoded video from the adapter to UDP port 5600 run PowerShell script
kv2udp.ps1:
powershell $Env:KVADAPTER_HOME\bin\kv2udp.ps1 -r <AWS region> -s <stream name>
To test the UPD video stream open file etc\kvstream.sdp in VLC media player.
To build Kinesis Video Streams Adapter:
Clone the source code:
git clone git@github.com:envirover/KVAdapter.git
Run Maven
mvn clean install
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Envirover welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Copyright 2019 Envirover. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the “License”).
You may not use this file except in compliance with
the License. A copy of the License is located at
https://github.com/envirover/KVAdapter/blob/master/LICENSE
or in the “license” file accompanying this file. This file is distributed on
an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language governing
permissions and limitations under the License.