项目作者: envirover

项目描述 :
Amazon Kinesis Video Streams adapter
高级语言: Java
项目地址: git://github.com/envirover/KVAdapter.git
创建时间: 2019-10-12T19:17:42Z
项目社区:https://github.com/envirover/KVAdapter

开源协议:Apache License 2.0

下载


Build Status

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.

Supported Platforms

  • Windows 7
  • Windows 8
  • Windows 8.1
  • Windows 10

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.

Installation

  1. Create a Kinesis Video stream
  2. 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.

    1. [default]
    2. aws_access_key_id=AKIAIOSFODNN7EXAMPLE
    3. aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  3. Install Java 8

  4. Unzip kvadapter-bin.zip to a local folder and set environment variable KVADAPTER_HOME to that folder path.
  5. Install GStreamer.

    For use with QGroundControl it’s recommended to install GStreamer 1.14.4 from https://gstreamer.freedesktop.org/data/pkg/windows/.
    Make sure that C:\gstreamer\1.0\x86_64\bin is added to PATH environment variable.

Use

Enable PowerShell execution on ther machine:

  1. Set-ExecutionPolicy unrestricted

To just start Kinesis Video Streams adapter run PowerShell script kvadapter.ps1:

  1. 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:

  1. 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:

  1. 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.

Build

To build Kinesis Video Streams Adapter:

  1. Install JDK 8.
  2. Install Maven
  3. Install Git
  4. Clone the source code:

    1. git clone git@github.com:envirover/KVAdapter.git
  5. Run Maven

    1. mvn clean install

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Envirover welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

License

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.