diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc22b135..27442f27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -322,8 +322,8 @@ jobs: - name: Install dependencies run: | choco install nasm strawberryperl - choco install gstreamer --version=1.16.2 - choco install gstreamer-devel --version=1.16.2 + choco install gstreamer --version=1.22.8 + choco install gstreamer-devel --version=1.22.8 - name: Build repository run: | $env:Path += ";C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;C:\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\lib;C:\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\bin" diff --git a/CMakeLists.txt b/CMakeLists.txt index 96290778..2b5dcbb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,10 +123,10 @@ message("LOG4CPLUS_INCLUDE_DIR is ${LOG4CPLUS_INCLUDE_DIR}") message("LOG4CPLUS_LIBRARIES is ${LOG4CPLUS_LIBRARIES}") if (WIN32) - if(EXISTS "C:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe") - set(PKG_CONFIG_EXECUTABLE "C:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe") + if(EXISTS "C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe") + set(PKG_CONFIG_EXECUTABLE "C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe") else() - set(PKG_CONFIG_EXECUTABLE "D:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe") + set(PKG_CONFIG_EXECUTABLE "D:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe") endif() endif() diff --git a/docs/linux.md b/docs/linux.md index a1e92a3e..6198cee4 100644 --- a/docs/linux.md +++ b/docs/linux.md @@ -3,6 +3,46 @@ * Ubuntu/Debian - `apt-get install cmake m4 git build-essential` * RHEL/CentOS - `yum install cmake git m4 && yum groupinstall 'Development Tools'` +
+ Quick-Install + + In case you want to try Kinesis Video Streams but without installing or downloading anything on your local computer, follow this procedure. + + Create an Amazon Cloud9 instance, or Amazon EC2 instance. **t2.micro** is sufficient. Change the platform to **Ubuntu 22.04 LTS**. + + If you're on Amazon Cloud9, increase the storage size of the underlying EC2. Run the following script in the Amazon Cloud9 terminal. It will increase the storage size to 20 GiB. + ```sh + wget https://awsj-iot-handson.s3-ap-northeast-1.amazonaws.com/kvs-workshop/resize_volume.sh + chmod +x resize_volume.sh + ./resize_volume.sh + rm resize_volume.sh + ``` + + In the Cloud9 or EC2 instance, install the necessary dependencies and build the C++ Producer SDK and the sample applications. Run the following commands in the terminal: + ```sh + sudo apt-get update + sudo apt-get install -y cmake m4 git build-essential pkg-config libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools + git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git + cd amazon-kinesis-video-streams-producer-sdk-cpp + mkdir build + cd build + cmake .. -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_DEPENDENCIES=OFF + make + export GST_PLUGIN_PATH=`pwd` + ``` + + Sample GStreamer pipeline that generates test video with timestamp overlay to send to Kinesis Video Streams: + ```sh + gst-launch-1.0 -v videotestsrc is-live=true \ + ! video/x-raw,framerate=10/1,width=640,height=480 \ + ! clockoverlay time-format="%a %B %d, %Y %I:%M:%S %p" \ + ! x264enc bframes=0 key-int-max=10 \ + ! h264parse \ + ! kvssink stream-name="YourStreamName" aws-region="us-west-2" access-key="YourAccessKey" secret-key="YourSecretKey" + ``` + +
+ ### How to run sample applications for sending media to KVS using [GStreamer](https://gstreamer.freedesktop.org/): ##### Setting credentials in environment variables