This library is the core of the kinesis video streamer sub-application. It has been modified from stock to remove excess dependencies, and build scripts modified to support our rather unique build artifacts.
This library is pre-compiled for you, in the third-party directory. If you need to make any changes to it, you will need to recomplie:
CTM Builds
kinesis-video-native-build/CMakeLists.txt has already been customized for this purpose. To compile:
- Run docker
- cd kinesis-video-native-build
- cmake .
- make
BSP4 Builds
Modify kinesis-video-native-build/CMakeLists.txt as necessary. See sections labelled MIOVISION. Then:
- Run docker
- cd kinesis-video-native-build
- cmake .
- make
BSP3 Builds
Obtain a a complete built copy of the OpenGear BSP, including a later libcurl (See libcurl instructions in bundle folder).
- Modify kinesis-video-native-build/CMakeLists.txt as necessary. See sections labelled MIOVISION. Use the compilers at /usr/local/bin/arm-linux-gnueabi-20140823-g++ and /usr/local/bin/arm-linux-gnueabi-20140823-gcc
- Run docker
- cd kinesis-video-native-build
- cmake .
- make
NOTE: Personally, I always delete any old cmake build artifacts berfore rerunning cmake. I don't trust that it regenerates things properly. This includes:
- CMakeCache.txt
- CMakeFiles/
- Makefile
- cmake_install.cmake
Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), and other processing.
Amazon Kinesis Video Streams Producer SDK for C/C++ 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.
Amazon Kinesis Video Streams Producer SDK for C/C++ contains the following sub-directories/projects:
- kinesis-video-pic - The Platform Independent Codebase which is the basic building block for the C++/Java producer SDK. The project includes multiple sub-projects for each sub-component with unit tests.
- kinesis-video-producer - The C++ Producer SDK with unit test.
- kinesis-video-producer-jni - The C++ wrapper for JNI to expose the functionality to Java/Android.
- kinesis-video-gst-demo - C++ GStreamer sample application (for webcam, USB camera and RTSP) .
- kinesis-video-gstreamer-plugin - GStreamer plugin sink element (kvssink) and demo application.
- kinesis-video-native-build - Native build directory with a build script for Mac OS/Linux/Raspberry PI/Windows. This is the directory that will contain the artifacts (executable binaries) and JNI libraries after the build.
- This should be your current working directory for running the install-scripts.
There are few build-time tools/dependencies which need to be installed in order to compile the core producer SDK libraries and the sample applications. Sample applications are provided to demonstrate how to send video from webcam, USB camera, or IP camera (RTSP).
Please follow the installation instructions applicable to your operating system.
- Linux
- Mac OS
- Windows OS
Kinesis Video Producer SDK CPP documentation
This library is licensed under the Amazon Software License.
- JNI namespace change
- Improve kvssink plugin retry behavior
- Unify GetTimeFunc in C++ producer for override
- Support for custom user agent string
- Fragment Metadata Support for Producer SDK
- Add fallback frame rate to avoid negotiation issue on certain machines like macbook air
- Windows Support for Producer SDK
- Intermittent producer support
- Various bug fixes
- Added prebuilt docker images for AmazonLinux and Raspbian Stretch
- Updated install-script to accept commandline argument -j and pass the value to
make
to speed up building - Updated install-script to accept commandline argument -d to remove opensource library installation files after finishing
- Updated CMakeLists.txt in kinesis-video-native-build to link up libraries properly
- Release first version of gstreamer plugin kvssink
- Fix gstreamer demo issue when running on raspberry pi
- Update log4cplus download link in install-script
- Fix for crash caused by latest Mac tool chain issue
- Fix for callbacks returning incorrect custom data in gstreamer sample app
- Support for custom logger
- Fix for multiple callbacks when triggering connection staleness
- Fixed video source negotiation error caused by camera with fractional fps
- Docker suport for RTSP streaming
- Fixed producer intermittent termination issue for some edge cases involving re-streaming on error.
- Updated install-script to fix the local certificate trust issue for curl.
- Added steps in README troubleshooting section for curl trust issues.
- Remove open-source dependencies from KinesisVideoProducerJNI native library. java-install-script can be used to build KinesisVideoProducerJNI native library fast.
- README note improved.
- Bug fix for producer timestamp video playback in the console should be fixed if proper timestamp is provided to SDK. Current setting in sample app uses Gstreamer frame timecode and relative timestamp (used by SDK).
install-script
is updated to automatically detect OS version and avoid dependency issue on Mac High Sierra and Ubuntu 17.10.- Known issue: Producer timestamp mode video playback in console will not work if GStreamer demoapp is configured to use frame timecode and absolute timestamp (used by SDK).
- Bug fixes and performance enhancement
- Streaming error recovery improvements
- Minor API changes:
- create stream APIs return shared pointers instead of unique pointers
- Addition of StreamClosed callback to notify the caller application when the stream is finished draining the existing buffered frames before closing in the graceful termination case.
- Added RTSP Demo Sample
- Run the demo using:
AWS_ACCESS_KEY_ID=<MYACCESSKEYID> AWS_SECRET_ACCESS_KEY=<MYSECRETKEY> ./kinesis_video_gstreamer_sample_rtsp_app <rtspurl> <stream-name>
- Allowed devices to output h.264 streams directly
- The user can also supply a streaming resolution through command line arguments.
- If resolution is provided then the sample will try to check if the camera supports that resolution. If it does then streaming starts; else, it will fail with an error msg "Resolution not supported"
- If no resolution is specified, the demo will try to use resolutions 1920x1080, 1280x720 and 640x480 in that order (highest resolution first)and will start streaming once the camera supported resolution is detected.
- Known issues:
- When streaming on raspberry pi. Some green artifacts might be observed on the preview screen. Reducing the resolution can fix the issue.
- Fix USB webcam support
- Known issues:
- If USB webcam doesn't support 720p, then gstreamer negotiation will fail. Trying lower resolution as mentioned in Troubleshooting may fix this issue.
- Addition of a received application ACK notification callback
- Lifecycle management improvements
- Exposed failure on progressive back-off/retry logic
- Hardening/fixing various edge-cases
- Fixing Raspberry PI frame dropping issue
- First release of the Amazon Kinesis Video Producer SDK for Cpp.
- Known issues:
- Missing build scripts for Windows-based systems.
- Missing cross-compile option.
- Sample application/unit tests can't handle buffer pressures properly - simple print in debug log.