Skip to content

Commit e2722d0

Browse files
committed
added alternative pipeline for x264 enabled devices. added verification for supported streaming resolution
1 parent 7a8053e commit e2722d0

File tree

3 files changed

+219
-59
lines changed

3 files changed

+219
-59
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Amazon Kinesis Video Streams Producer SDK Cpp
55
This library is licensed under the Amazon Software License.
66

77
## Introduction
8-
Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), and other processing.
8+
Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), and other processing.
99

10-
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.
10+
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.
1111

1212
Amazon Kinesis Video Streams Producer SDK for C/C++ contains the following sub-directories/projects:
1313
* 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.
@@ -19,7 +19,7 @@ Amazon Kinesis Video Streams Producer SDK for C/C++ contains the following sub-d
1919
## Building from Source
2020
There are few build-time tools/dependencies which need to be installed in order to build the core SDK libraries and the samples.
2121

22-
### Build Dependencies
22+
### Build Dependencies
2323
Please install the following additional build tools before proceeding (the example below is for Mac Os X).
2424
* autoconf 2.69 (License GPLv3+/Autoconf: GNU GPL version 3 or later) http://www.gnu.org/software/autoconf/autoconf.html
2525
* cmake 3.7/3.8 https://cmake.org/
@@ -30,7 +30,7 @@ Please install the following additional build tools before proceeding (the examp
3030
* xCode (Mac OS) / clang / gcc (xcode-select version 2347)
3131
* Java jdk (for Java JNI compilation)
3232

33-
After you've downloaded the code from GitHub, you can build it on Mac OS or Ubuntu using ./kinesis-video-native-build/install-script script. This will produce the core library, the JNI library, unit tests executable and the sample GStreamer application. The script will download and build the dependent open source components in the 'downloads' directory and link against it.
33+
After you've downloaded the code from GitHub, you can build it on Mac OS or Ubuntu using ./kinesis-video-native-build/install-script script. This will produce the core library, the JNI library, unit tests executable and the sample GStreamer application. The script will download and build the dependent open source components in the 'downloads' directory and link against it.
3434

3535
**Important:** Set the JAVA_HOME environment variable to your version of the JDK `export JAVA_HOME=<your java home directory>` in order to build and link JNI component.
3636

@@ -52,18 +52,18 @@ The projects depend on the following open source components. Running `install-sc
5252

5353
#### GStreamer Demo App
5454
* gstreamer - https://gstreamer.freedesktop.org/documentation/licensing.html
55-
* gst-plugins-base
56-
* gst-plugins-good
57-
* gst-plugins-bad
55+
* gst-plugins-base
56+
* gst-plugins-good
57+
* gst-plugins-bad
5858
* gst-plugins-ugly
5959
* x264 - https://www.videolan.org/developers/x264.html
6060

6161
## Certificate store integration
62-
Kinesis Video Streams Produicer SDK for C++ needs to establish trust with the backend service through TLS. This is done through validating the CAs in the public certificate store. On Linux-based models, this store is located in /etc/ssl/ directory by default.
62+
Kinesis Video Streams Produicer SDK for C++ needs to establish trust with the backend service through TLS. This is done through validating the CAs in the public certificate store. On Linux-based models, this store is located in /etc/ssl/ directory by default.
6363

64-
Please download the PEM file from
64+
Please download the PEM file from
6565
https://www.amazontrust.com/repository/SFSRootCAG2.pem
66-
66+
6767
to `/etc/ssl/cert.pem`. Append to the end of the file if it exists.
6868

6969
Many platforms come with a cert file with a lot of the well-known public certs in them.
@@ -79,7 +79,12 @@ optionally, set `AWS_SESSION_TOKEN` if integrating with temporary token and `AWS
7979
* The executable will be built in ./kinesis-video-native-build/start. Launch it and it will run the unit test and kick off dummy frame streaming.
8080

8181
#### GStreamer demo app
82-
* The GStreamer demo app will be built in kinesis-video-native-build/kinesis_video_gstreamer_sample_app. Launch it with a stream name and it will start streaming from the camera.
82+
* The GStreamer demo app will be built in kinesis-video-native-build/kinesis_video_gstreamer_sample_app. Launch it with a stream name and it will start streaming from the camera. The user can also supply a streaming resolution through command line arguments.
83+
A. 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
84+
with an error msg "Resolution not supported"
85+
86+
B. If no resolution is specified, the demo will try to use resolutions 1920x1080, 1280x720 and 640x480 in that order (highest resolution first)
87+
and will start streaming once the camera supported resolution is detected.
8388

8489
### Enabling verbose logs
8590
Define `HEAP_DEBUG` and `LOG_STREAMING` C-defines by uncommenting the appropriate lines in ./kinesis-video-native-build/CMakeList.txt
@@ -172,7 +177,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
172177
$ curl --version
173178
curl 7.55.1 (x86_64-pc-linux-gnu) libcurl/7.55.1 OpenSSL/1.0.2g zlib/1.2.11 libidn2/2.0.2 libpsl/0.18.0 (+libidn2/2.0.2) librtmp/2.3
174179
Release-Date: 2017-08-14
175-
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
180+
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
176181
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy PSL
177182

178183

@@ -223,7 +228,7 @@ $ls /dev/video* {not found}
223228

224229
$vcgencmd get_camera {output is similar to supported=1 detected=1}
225230

226-
if the driver does not detect the camera then
231+
if the driver does not detect the camera then
227232

228233
* Check for the camera setup and whether it's connected properly
229234
* Run firmware update `$ sudo rpi-update` and restart
@@ -235,7 +240,7 @@ $ls /dev/video* {lists the device}
235240

236241
* Raspberry PI timestamp/range assertion at runtime. Update the Raspberry PI firmware.
237242

238-
$ sudo rpi-update
243+
$ sudo rpi-update
239244

240245
$ sudo reboot
241246

@@ -246,13 +251,14 @@ $ sudo reboot
246251
* Raspberry PI seg fauls after some time running on libx264.so. Rebuilding the libx264.so library and re-linking the demo application fixes the issue.
247252

248253

249-
* If an USB webcam is used with a Raspberry PI and the webcam does not support 720p. The following error can occur. Reduce the resolution to 480p at line 336 and 356 should fix the problem. (change the number from 1280 and 720 to 640 and 480)
250-
251-
Error received from element source: Internal data stream error.
252-
Debugging information: gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:test-pipeline/GstV4l2Src:source:
253-
streaming stopped, reason not-negotiated (-4)
254-
255254
## Release Notes
255+
### Release 1.1.2 (January 2018)
256+
* Allowed devices to output h.264 streams directly
257+
* The user can also supply a streaming resolution through command line arguments.
258+
* 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"
259+
* 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.
260+
* Known issues:
261+
* When streaming on raspberry pi. Some green artifacts might be observed on the preview screen. Reducing the resolution can fix the issue.
256262
### Release 1.1.1 (December 2017)
257263
* Fix USB webcam support
258264
* Known issues:

0 commit comments

Comments
 (0)