Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into clean-start/stop
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankiesz committed Mar 27, 2024
2 parents 7dafff8 + ca558f7 commit c173d9b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
40 changes: 40 additions & 0 deletions docs/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'`

<details>
<summary>Quick-Install</summary>

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"
```

</details>

### How to run sample applications for sending media to KVS using [GStreamer](https://gstreamer.freedesktop.org/):

##### Setting credentials in environment variables
Expand Down

0 comments on commit c173d9b

Please sign in to comment.