Skip to content

Commit 60e9290

Browse files
committed
90f074f release note for v1.4.3
7a5cb25 add README for using pi image. 4e8d554 by default run make with -j 2 79bc1a0 use pkg-config and cmake find_library to locate libraries a8f2467 rm cmake and gcc installation files in the same step to reduce size cbfb47d add option to clean up installation files after build. add option to parallelize make, use system curl to download libraries. b5aa632 add raspberry pi docker file c0d414a new install script option change 6b122f1 optimizing the docker image; updating ubuntu docker image to include gstreamer plugin 2228b7b Updating docker readme for pre-built images
1 parent 1512ea3 commit 60e9290

File tree

9 files changed

+545
-128
lines changed

9 files changed

+545
-128
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,31 +239,31 @@ $ export GST_PLUGIN_PATH=<YourSdkFolderPath>/kinesis-video-native-build/download
239239
```
240240
###### 3.1 Run the following `gst-launch-1.0` command to start streaming from RTSP camera source.
241241
```
242-
$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=512
242+
$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=512
243243
```
244244
###### 3.2 Run the following `gst-launch-1.0` command to start streaming from USB camera source in **Ubuntu**.
245245

246246
```
247-
$ gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name="YourStreamName" storage-size=512
247+
$ gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=512
248248
```
249249
###### 3.3 Run the following `gst-launch-1.0` command to start streaming from USB camera source which has h264 encoded stream already in **Ubuntu**.
250250

251251
```
252-
$ gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name="plugin" storage-size=512
252+
$ gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=512
253253
```
254254

255255
###### 3.4 Run the following `gst-launch-1.0` command to start streaming from camera source in **Mac-OS**.
256256

257257
```
258-
$ gst-launch-1.0 autovideosrc ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! vtenc_h264_hw allow-frame-reordering=FALSE realtime=TRUE max-keyframe-interval=45 bitrate=500 ! h264parse ! video/x-h264,stream-format=avc,alignment=au,width=640,height=480,framerate=30/1 ! kvssink stream-name="YourStreamName" storage-size=512
258+
$ gst-launch-1.0 autovideosrc ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! vtenc_h264_hw allow-frame-reordering=FALSE realtime=TRUE max-keyframe-interval=45 bitrate=500 ! h264parse ! video/x-h264,stream-format=avc,alignment=au,width=640,height=480,framerate=30/1 ! kvssink stream-name=YourStreamName storage-size=512
259259
```
260260

261261
###### 3.5 Run the following `gst-launch-1.0` command to start streaming from camera source in **Raspberry-PI**.
262262

263263
```
264-
$ gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! omxh264enc control-rate=1 target-bitrate=5120000 periodicity-idr=45 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au,width=640,height=480,framerate=30/1 ! kvssink stream-name="YourStreamName" frame-timestamp=KVS_SINK_TIMESTAMP_DTS_ONLY access-key="YourAccessKey" secret-key="YourSecretKey"
264+
$ gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! omxh264enc control-rate=1 target-bitrate=5120000 periodicity-idr=45 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au,width=640,height=480,framerate=30/1 ! kvssink stream-name=YourStreamName frame-timestamp=dts-only access-key=YourAccessKey secret-key=YourSecretKey
265265
```
266-
Note: Raspberry PI camera module requires `frame-timestamp=KVS_SINK_TIMESTAMP_DTS_ONLY` . If USB camera is used for streaming then this property is optional.
266+
Note: Raspberry PI camera module requires `frame-timestamp=dts-only` . If USB camera is used for streaming then this property is optional.
267267

268268
##### 4. Run the demo application from Docker
269269

@@ -424,31 +424,45 @@ make install
424424

425425
----
426426
## Release notes
427+
#### Release 1.4.3 (20th June 2018)
428+
* Added prebuilt docker images for AmazonLinux and Raspbian Stretch
429+
* Updated install-script to accept commandline argument -j and pass the value to `make` to speed up building
430+
* Updated install-script to accept commandline argument -d to remove opensource library installation files after finishing
431+
* Updated CMakeLists.txt in kinesis-video-native-build to link up libraries properly
432+
427433
#### Release 1.4.2 (14th June 2018)
428434
* Release first version of gstreamer plugin kvssink
429435
* Fix gstreamer demo issue when running on raspberry pi
436+
430437
#### Release 1.4.1 (8th May 2018)
431438
* Update log4cplus download link in install-script
439+
432440
#### Release 1.4.0 (25th April 2018)
433441
* Fix for crash caused by latest Mac tool chain issue
434442
* Fix for callbacks returning incorrect custom data in gstreamer sample app
435443
* Support for custom logger
436444
* Fix for multiple callbacks when triggering connection staleness
445+
437446
#### Release 1.3.1 (5th April 2018)
438447
* Fixed video source negotiation error caused by camera with fractional fps
439448
* Docker suport for RTSP streaming
449+
440450
#### Release 1.3.0 (15th March 2018)
441451
* Fixed producer intermittent termination issue for some edge cases involving re-streaming on error.
452+
442453
#### Release 1.2.3 (1st March 2018)
443454
* Updated install-script to fix the local certificate trust issue for curl.
444455
* Added steps in README troubleshooting section for curl trust issues.
456+
445457
#### Release 1.2.2 (March 2018)
446458
* Remove open-source dependencies from KinesisVideoProducerJNI native library. java-install-script can be used to build KinesisVideoProducerJNI native library fast.
447459
* README note improved.
460+
448461
#### Release 1.2.1 (February 2018)
449462
* 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).
450463
* `install-script` is updated to automatically detect OS version and avoid dependency issue on Mac High Sierra and Ubuntu 17.10.
451464
* 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).
465+
452466
#### Release 1.2.0 (February 2018)
453467
* Bug fixes and performance enhancement
454468
* Streaming error recovery improvements
@@ -461,23 +475,27 @@ make install
461475
```
462476
AWS_ACCESS_KEY_ID=<MYACCESSKEYID> AWS_SECRET_ACCESS_KEY=<MYSECRETKEY> ./kinesis_video_gstreamer_sample_rtsp_app <rtspurl> <stream-name>
463477
```
478+
464479
#### Release 1.1.2 (January 2018)
465480
* Allowed devices to output h.264 streams directly
466481
* The user can also supply a streaming resolution through command line arguments.
467482
* 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"
468483
* 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.
469484
* Known issues:
470485
* When streaming on raspberry pi. Some green artifacts might be observed on the preview screen. Reducing the resolution can fix the issue.
486+
471487
#### Release 1.1.1 (December 2017)
472488
* Fix USB webcam support
473489
* Known issues:
474490
* If USB webcam doesn't support 720p, then gstreamer negotiation will fail. Trying lower resolution as mentioned in Troubleshooting may fix this issue.
491+
475492
#### Release 1.1.0 (December 2017)
476493
* Addition of a received application ACK notification callback
477494
* Lifecycle management improvements
478495
* Exposed failure on progressive back-off/retry logic
479496
* Hardening/fixing various edge-cases
480497
* Fixing Raspberry PI frame dropping issue
498+
481499
#### Release 1.0.0 (November 2017)
482500
* First release of the Amazon Kinesis Video Producer SDK for Cpp.
483501
* Known issues:
@@ -487,4 +505,4 @@ AWS_ACCESS_KEY_ID=<MYACCESSKEYID> AWS_SECRET_ACCESS_KEY=<MYSECRETKEY> ./kinesis_
487505

488506
## Documentation
489507

490-
[Kinesis Video Producer SDK CPP](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-sdk-cpp.html)
508+
[Kinesis Video Producer SDK CPP](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-sdk-cpp.html)

docker_native_scripts/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,18 @@ RUN git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-s
3030

3131
WORKDIR /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/
3232
RUN chmod a+x ./install-script
33-
RUN ./install-script a
33+
RUN chmod a+x ./gstreamer-plugin-install-script
34+
RUN ./install-script -a
35+
RUN cp libproducer.so /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib/
36+
ENV KINESIS_VIDEO_STREAMS_PRODUCER_SDK_SOURCE_DIR=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/
37+
ENV SDK_SOURCE_DIR=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/
38+
RUN ./gstreamer-plugin-install-script
3439
RUN ./java-install-script
40+
RUN cp /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-gstreamer-plugin/libgstkvssink.so /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib/
3541
COPY start_rtsp_in_docker.sh /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/
42+
ENV LD_LIBRARY_PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$LD_LIBRARY_PATH
43+
ENV GST_PLUGIN_PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib
44+
ENV PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/bin:/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build:$PATH
3645
RUN chmod a+x ./start_rtsp_in_docker.sh
3746

3847
# comment the following step if you would like to customize the docker image build
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Build docker with
2+
# docker build -t kinesis-video-producer-sdk-cpp-amazon-linux .
3+
#
4+
FROM amazonlinux
5+
RUN yum update -y && \
6+
yum upgrade -y && \
7+
yum install -y autoconf && \
8+
yum install -y automake && \
9+
yum install -y bison && \
10+
yum install -y bzip2 && \
11+
yum install -y cmake && \
12+
yum install -y curl && \
13+
yum install -y diffutils && \
14+
yum install -y flex && \
15+
yum install -y gcc-c++ && \
16+
yum install -y git && \
17+
yum install -y gmp-devel && \
18+
yum install -y libffi && \
19+
yum install -y libffi-devel && \
20+
yum install -y libmpc-devel && \
21+
yum install -y libtool && \
22+
yum install -y m4 && \
23+
yum install -y mpfr-devel && \
24+
yum install -y pkgconfig && \
25+
yum install -y vim && \
26+
yum install -y wget
27+
28+
29+
RUN wget https://cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz && \
30+
tar -zxvf cmake-3.2.3-Linux-x86_64.tar.gz && \
31+
rm cmake-3.2.3-Linux-x86_64.tar.gz
32+
ENV PATH=/cmake-3.2.3-Linux-x86_64/bin/:$PATH
33+
RUN wget https://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.gz && \
34+
tar -xvf gcc-7.2.0.tar.gz && \
35+
cd gcc-7.2.0 && \
36+
./configure --disable-multilib --enable-languages=c,c++ && \
37+
make && \
38+
make install && \
39+
cd .. && \
40+
rm -rf gcc-7.2.0*
41+
RUN /usr/local/bin/gcc "--version"
42+
WORKDIR /opt/
43+
44+
RUN git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git
45+
46+
WORKDIR /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/
47+
48+
ENV CC=/usr/local/bin/gcc
49+
ENV CXX=/usr/local/bin/g++
50+
RUN chmod a+x ./install-script
51+
RUN chmod a+x ./gstreamer-plugin-install-script
52+
# ================= HTTPS Certificate =====================================================================
53+
RUN wget https://www.amazontrust.com/repository/SFSRootCAG2.pem
54+
RUN cp SFSRootCAG2.pem /opt/amazon-kinesis-video-streams-producer-sdk-cpp
55+
# ================ Build producer sdk and gstreamer plugin ================================================
56+
#
57+
RUN chmod +x install-script
58+
RUN ./install-script -a -j 4 -d
59+
RUN cp libproducer.so /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib/
60+
ENV KINESIS_VIDEO_STREAMS_PRODUCER_SDK_SOURCE_DIR=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/
61+
ENV SDK_SOURCE_DIR=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/
62+
RUN pwd
63+
RUN ./gstreamer-plugin-install-script
64+
65+
#
66+
# Copy dynamic libraries into lib folder
67+
RUN cp /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-gstreamer-plugin/libgstkvssink.so /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib/
68+
69+
# Copy all demo sample application binaries kinesis-video-native-build
70+
RUN cp /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-gstreamer-plugin/kvs_producer_plugin* /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/
71+
# Copy gst-launch-1.0 and gst-inspect-1.0 kinesis-video-native-build
72+
RUN cp /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/bin/gst* /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/
73+
74+
# Set environment variables for plugin and libraries
75+
ENV LD_LIBRARY_PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$LD_LIBRARY_PATH
76+
ENV GST_PLUGIN_PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib
77+
ENV PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/bin:/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build:$PATH
78+
79+
WORKDIR /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Using Docker images for Producer SDK (CPP and GStreamer plugin):
2+
3+
Please follow the four steps below to get the Docker image for Producer SDK (includes CPP and GStreamer plugin) and start streaming to Kinesis Video.
4+
5+
#### Pre-requisite:
6+
7+
This requires docker is installed in your system.
8+
9+
Follow instructions to download and start Docker
10+
11+
* [Docker download instructions](https://www.docker.com/community-edition#/download)
12+
* [Getting started with Docker](https://docs.docker.com/get-started/)
13+
14+
15+
Once you have docker installed, you can download the Kinesis Video Producer SDK (CPP and GStreamer plugin) from Amazon ECR (Elastic Container Service) using `docker pull` command.
16+
17+
18+
#### Step 1:
19+
20+
Authenticate your Docker client to the Amazon ECR registry that you intend to pull your image from. Authentication tokens must be obtained for each registry used, and the tokens are valid for 12 hours. For more information, see Registry Authentication.
21+
22+
Example:
23+
24+
You can authenticate to Amazon ECR using the following two commands:
25+
26+
1. `aws ecr get-login --no-include-email --region us-west-2 --registry-ids 546150905175`
27+
28+
you will see an **output** similar to the one below.
29+
30+
2. `docker login -u AWS -p <Password> https://<YourAccountId>.dkr.ecr.us-west-2.amazonaws.com`
31+
32+
Run the command as such in your command prompt. This will authorize the `docker pull` which you will be running next.
33+
34+
35+
#### Step 2: Pull Image
36+
37+
##### 2.1 Steps for getting the Docker images built with AmazonLinux
38+
39+
Run the following command to get the AmazonLinux Docker image to your local environment. E.g.
40+
41+
`sudo docker pull 546150905175.dkr.ecr.us-west-2.amazonaws.com/kinesis-video-producer-cpp-amazon-linux:latest`
42+
`sudo docker pull 546150905175.dkr.ecr.us-west-2.amazonaws.com/kinesis-video-producer-sdk-cpp-raspberry-pi:latest`
43+
44+
you can verify the images in your local docker environment by running `docker images`.
45+
46+
47+
#### Step 3: Run the Docker Image (start the container)
48+
49+
Run the following command to start the kinesis video sdk container
50+
51+
`sudo docker run -it --network="host" --device=/dev/video0 546150905175.dkr.ecr.us-west-2.amazonaws.com/kinesis-video-producer-cpp-amazon-linux:latest /bin/bash`
52+
53+
54+
#### Step 4: Run the GStreamer plugin
55+
56+
Follow the next few steps to start Producer SDK GStreamer plugin element for sending video streams from webcamera to Kinesis Video:
57+
58+
##### 4.1 Set these environment variable:
59+
60+
`export LD_LIBRARY_PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$LD_LIBRARY_PATH`
61+
62+
`export PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/bin:$PATH`
63+
64+
`export GST_PLUGIN_PATH=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$GST_PLUGIN_PATH`
65+
66+
67+
##### 4.2 Start the streaming with `gst-launch-1.0` command.
68+
69+
`gst-launch-1.0 v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=512 ! h264parse ! video/x-h264,stream-format=avc,alignment=au,width=640,height=480,framerate=30/1 ! kvssink stream-name="YOURSTREAMNAME" access-key=YOURACCESSKEY secret-key=YOURSECRETKEY`
70+
71+
For additional examples refer [Readme](https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/README.md) in https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.
72+

0 commit comments

Comments
 (0)