-
Notifications
You must be signed in to change notification settings - Fork 46
Add sample app to stream with WebRTC and Stream Producer SDK simultaneously #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
cb22969
8e9b081
d9576cd
41547bc
f6730a2
7543bea
dce233b
5201e4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [submodule "webrtc-c/webrtc-and-directstream/amazon-kinesis-video-streams-producer-sdk-cpp"] | ||
| path = webrtc-c/webrtc-and-directstream/amazon-kinesis-video-streams-producer-sdk-cpp | ||
| url = https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git | ||
| [submodule "webrtc-c/webrtc-and-directstream/amazon-kinesis-video-streams-webrtc-sdk-c"] | ||
| path = webrtc-c/webrtc-and-directstream/amazon-kinesis-video-streams-webrtc-sdk-c | ||
| url = https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c.git |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "amazon-kinesis-video-streams-producer-sdk-cpp"] | ||
| path = amazon-kinesis-video-streams-producer-sdk-cpp | ||
| url = https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # KVS WebRTC and Direct Stream Simultaneously | ||
| ## Overview | ||
|
|
||
| Added a gstreamer app sample (`kvsWebRTCAndDirectStream.c`) to support streaming video to KVS with WebRTC SDK (for real-time use) and Stream Producer SDK (for video ingestion), simultaneously from 1 camera source. | ||
|
|
||
| This sample is currently only tested on Raspberry Pi 3B equipped with USB Camera. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - AWS Account with configured: | ||
| - Kinesis Video Streams | ||
| - IAM role with appropriate permissions | ||
| - **Physical webcam required**: The application uses `autovideosrc` and will not fallback to `videotestsrc` if no camera is connected | ||
|
|
||
| ## Installation and Configuration | ||
|
|
||
| 1. Clone this repository to your Raspberry Pi with submodules: | ||
| ``` | ||
| git clone --recurse-submodules https://github.com/aws-samples/amazon-kinesis-video-streams-demos.git | ||
| ``` | ||
|
|
||
| Or if already cloned, initialize submodules: | ||
| ``` | ||
| git submodule update --init --recursive | ||
| ``` | ||
|
|
||
| 2. Copy the sample file to the WebRTC SDK samples directory: | ||
| ``` | ||
| cp kvsWebRTCAndDirectStream.c amazon-kinesis-video-streams-webrtc-sdk-c/samples/ | ||
| ``` | ||
|
|
||
| 3. Configure your AWS credentials on the Raspberry Pi | ||
|
|
||
| ### Building the AWS SDKs | ||
|
|
||
| Refer to each SDK main repository for the details of how to build. `-DALIGNED_MEMORY_MODEL=ON` flag might need to be used on Raspberry Pi 4B and 5B. | ||
|
|
||
| - https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c | ||
| - https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp | ||
|
|
||
| #### Building the KVS Producer SDK | ||
|
|
||
| ``` | ||
| cd amazon-kinesis-video-streams-producer-sdk-cpp | ||
| mkdir -p build | ||
| cd build | ||
| cmake .. -DBUILD_DEPENDENCIES=OFF | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also need |
||
| make -j | ||
| ``` | ||
|
|
||
| #### Building the KVS WebRTC SDK | ||
|
|
||
| ``` | ||
| cd amazon-kinesis-video-streams-webrtc-sdk-c | ||
| mkdir -p build | ||
| cd build | ||
| cmake .. -DBUILD_DEPENDENCIES=OFF | ||
| make -j | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| 1. Configure your AWS credentials on the Raspberry Pi | ||
|
|
||
| 2. Configure GStreamer plugin path with the path where you build the KVS Streams Producer app, e.g., `export GST_PLUGIN_PATH=/home/pi/amazon-kinesis-video-streams-producer-sdk-cpp/build` | ||
|
|
||
| 3. Go to `amazon-kinesis-video-streams-webrtc-sdk-c/build/` and run `./samples/kvsWebRTCAndDirectStream <signaling channel name> <kvs stream name>` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I ran the And it might need some linking to the GStreamer libraries since I am seeing these build issues:
|
||
|
|
||
| ## Screenshots | ||
|
|
||
| The following screenshots demonstrate WebRTC and Stream Producer running simultaneously: | ||
|
|
||
| ### WebRTC Signaling Channel Viewer | ||
|  | ||
| *Real-time WebRTC streaming through the signaling channel* | ||
|
|
||
| ### KVS Stream Viewer | ||
|  | ||
| *Near real-time video ingestion to Kinesis Video Stream* | ||
|
|
||
| ### Application Logs | ||
|
|
||
| #### WebRTC Logs | ||
|  | ||
| *WebRTC connection and streaming logs* | ||
|
|
||
| #### KVS Stream Logs | ||
|  | ||
|  | ||
| *Kinesis Video Stream ingestion logs showing successful simultaneous operation* | ||
|
|
||
|
sirknightj marked this conversation as resolved.
|
||
| ## License | ||
|
|
||
| This project uses components from AWS Kinesis Video Streams SDKs which are licensed under the Apache License 2.0. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems there are 2
.gitmodulesfiles?