Code Monkey home page Code Monkey logo

amazon-kinesis-video-streams-demos's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-kinesis-video-streams-demos's Issues

Reduce storage requirements for webrtc Canary

As of now, webrtc canary depends on AWS SDK and KVS Webrtc SDK. Since AWS SDK is monorepo, its size is about 500 MB.

To reduce this storage requirement, there are currently 2 solutions:

1. Create a static build and remove everything except the canary binary

This approach is the most preferable, but static builds are flaky, it's consistent across platforms. For example, OpenSSL static build fails only on ubuntu 18.04 not on other versions of ubuntu.

/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_new':
threads_pthread.c:(.text+0x45): undefined reference to `pthread_rwlock_init'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_read_lock':
threads_pthread.c:(.text+0x75): undefined reference to `pthread_rwlock_rdlock'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_write_lock':
threads_pthread.c:(.text+0x95): undefined reference to `pthread_rwlock_wrlock'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_unlock':
threads_pthread.c:(.text+0xb5): undefined reference to `pthread_rwlock_unlock'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_free':
threads_pthread.c:(.text+0xda): undefined reference to `pthread_rwlock_destroy'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_run_once':
threads_pthread.c:(.text+0x105): undefined reference to `pthread_once'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_init_local':
threads_pthread.c:(.text+0x125): undefined reference to `pthread_key_create'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_set_local':
threads_pthread.c:(.text+0x157): undefined reference to `pthread_setspecific'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_cleanup_local':
threads_pthread.c:(.text+0x177): undefined reference to `pthread_key_delete'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `openssl_init_fork_handlers':
threads_pthread.c:(.text+0x1d3): undefined reference to `pthread_once'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `fork_once_func':
threads_pthread.c:(.text+0x16): undefined reference to `pthread_atfork'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_get_local':
threads_pthread.c:(.text+0x143): undefined reference to `pthread_getspecific'

OpenSSL should include pthread as a part of binary (either dynamic or static link to pthread), but it somehow didn't get linked.

2. Create a dynamic build and remove just the source codes

This approach is OK, but we need to create a script that can understand the library dependencies and make sure that we don't end up deleting them. A tool like ldd will tell us these dependencies, but it gets ugly pretty quickly.

CORS error in KVS Browser-based Ingestion

Hi,
i am trying to implement KVS Browser-based Ingestion and getting CORS error. I'm using mongoose for serving. So far i tried;

-using different browsers.
-using different CORS enabling extensions.
-adding

"Access-Control-Allow-Headers" : "Content-Type", 

"Access-Control-Allow-Origin": "*",

 "Access-Control-Allow-Methods": "OPTIONS,POST,GET,PUT,PATCH"  to the header of putMedia. 

The consolo.log is as following;

Access to fetch at 'https://s-*******.kinesisvideo.eu-west-1.amazonaws.com/putMedia' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

main.js:301 POST https://s-*******.kinesisvideo.eu-west-1.amazonaws.com/putMedia net::ERR_FAILED

and network output;

putMedia | CORS error | fetch | main.js:301 | 0 B | 505 ms

putMedia | 403 |   | Other | 0 B | 503 ms

In here https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html it says

“This operation is only available for the AWS SDK for Java. It is not supported in AWS SDKs for other languages.”

would it be the problem?

it is weird that when i use create new stream options, it creates the stream and getDataEndpoint without problem but can't putMedai to endpoint created by himself.

Is there any solution for this CORS Problem? Or any idea?

cmake .. tries to install dependencies to /usr/local

Hi,

I am trying to compile and run the demo example.
When I run cmake .., cmake tries to downdload, compile and install several libraries. However default install path is /usr/local which is not accessible without sudo:

vrichard@vr-desktop:~/amazon-kinesis-video-streams-demos/webrtc-c/canary$ mkdir build0
vrichard@vr-desktop:~/amazon-kinesis-video-streams-demos/webrtc-c/canary$ cd build0/
vrichard@vr-desktop:~/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0$ cmake ..

[...]

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0/_deps/cloudwatch-build/.deps
Scanning dependencies of target AwsChecksums
[  4%] Creating directories for 'AwsChecksums'
[  8%] Performing download step (git clone) for 'AwsChecksums'
Cloning into 'AwsChecksums'...
Note: checking out 'v0.1.5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 519d6d9 Don't return 0 on arm please (#22)
[ 12%] No update step for 'AwsChecksums'
[ 16%] No patch step for 'AwsChecksums'
[ 20%] Performing configure step for 'AwsChecksums'
-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0/_deps/cloudwatch-build/.deps/build/src/AwsChecksums-build
[ 25%] Performing build step for 'AwsChecksums'
Scanning dependencies of target aws-checksums
[  8%] Building C object CMakeFiles/aws-checksums.dir/source/arm/cpuid_arm.c.o
[ 16%] Building C object CMakeFiles/aws-checksums.dir/source/arm/crc32c_arm.c.o
[ 25%] Building C object CMakeFiles/aws-checksums.dir/source/cpuid_generic.c.o
[ 33%] Building C object CMakeFiles/aws-checksums.dir/source/crc.c.o
[ 41%] Building C object CMakeFiles/aws-checksums.dir/source/crc_jni.c.o
[ 50%] Building C object CMakeFiles/aws-checksums.dir/source/crc_sw.c.o
[ 58%] Building C object CMakeFiles/aws-checksums.dir/source/intel/cpuid.c.o
[ 66%] Building C object CMakeFiles/aws-checksums.dir/source/intel/crc32c_sse42_asm.c.o
[ 75%] Linking C shared library libaws-checksums.so
[ 75%] Built target aws-checksums
Scanning dependencies of target aws-checksums-tests
[ 83%] Building C object CMakeFiles/aws-checksums-tests.dir/tests/crc_test.c.o
[ 91%] Building C object CMakeFiles/aws-checksums-tests.dir/tests/run_tests.c.o
[100%] Linking C executable /home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0/_deps/cloudwatch-build/bin/aws-checksums-tests
[100%] Built target aws-checksums-tests
[ 29%] Performing install step for 'AwsChecksums'
[ 75%] Built target aws-checksums
[100%] Built target aws-checksums-tests
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/aws/checksums/crc.h
CMake Error at cmake_install.cmake:46 (file):
  file INSTALL cannot copy file
  "/home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0/_deps/cloudwatch-build/.deps/build/src/AwsChecksums/include/aws/checksums/crc.h"
  to "/usr/local/include/aws/checksums/crc.h": Permission denied.


Makefile:80: recipe for target 'install' failed
make[3]: *** [install] Error 1
CMakeFiles/AwsChecksums.dir/build.make:92: recipe for target 'build/src/AwsChecksums-stamp/AwsChecksums-install' failed
make[2]: *** [build/src/AwsChecksums-stamp/AwsChecksums-install] Error 2
CMakeFiles/Makefile2:153: recipe for target 'CMakeFiles/AwsChecksums.dir/all' failed
make[1]: *** [CMakeFiles/AwsChecksums.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
CMake Error at build0/_deps/cloudwatch-src/CMakeLists.txt:224 (message):
  Failed to build third-party libraries.


-- Configuring incomplete, errors occurred!
See also "/home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0/CMakeFiles/CMakeOutput.log".
See also "/home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build0/CMakeFiles/CMakeError.log".

A solution is to define CMAKE_INSTALL_PREFIX, but it is not mentioned in the readme. Is it the only way?

Improvements in producer C canary

  • Logging error handling - erro handle while creating LogStream
  • Adding support to display error number in application layer
  • Start up latency measurement
  • Set up permutation matrix
  • Have timestamp based cloudwatch logs
  • Have time based canary execution
  • Metric datum handling
  • Add clang format
  • Improve build system
  • Set up environment variables
  • Add error rate tracking

[GST Plugin] Audio is garbled with WebRTC

I'm working on using the gstreamer + kvsplugin as a way to ingest some video streams into KVS for real-time monitoring. The gstreamer pipeline runs successfully, but if I preview the audio in the AWS web console or via the browser example, the audio is coming out scrambled/garbled.

This can be reproduced with this simple test-generator pipeline:

gst-launch-1.0 \
    videotestsrc is-live=TRUE ! queue ! video/x-raw,width=1280,height=720,framerate=30/1 ! \
    x264enc bframes=0 speed-preset=veryfast bitrate=512 byte-stream=TRUE tune=zerolatency ! \
    video/x-h264,stream-format=avc,alignment=au,profile=baseline ! \
    kvsplugin name=kvs aws-region=us-east-1 channel-name=audio-issue enable-streaming=false connect-webrtc=true log-level=3 \
    audiotestsrc is-live=TRUE ! queue ! audioconvert ! audioresample ! faac ! \
    audio/mpeg,rate=48000,channels=2 ! kvs.

I think the underlying cause is codec incompatibility between the kvsplugin sinks and the underlying KVS WebRTC service. No matter which format that is given to kvsplugin (audio/mpeg, audio/x-mulaw, or audio/x-alaw), the plugin always reports it's codec as audio/opus. So the end result is the browser is decoding AAC encoded audio using the opus decoder.

It feels if the GST plugin is meant to support both KVS Video Streams and WebRTC, then it should handle some codec conforming, so that a single audio/video input can be routed to both a Video Stream or Signaling channel. If kvsplugin is meant to support both WebRTC and VideoStreams but not in the same pipeline then it may make sense to add an audio sink that accepts audio/x-opus. What's the best path forward here?

End to end frame latency measurement in producer canary shoots up occasionally

While running the producer and consumer canary, it is noticed that the end to end frame latency shoots up to a very large value. On analyzing the metric, it does look like the metric is emitted as a timestamp measured at the consumer. This could probably happen because of missing timestamp in the canary packet, but some root cause analysis and solution is required to understand why this happens.

Problem to start streaming from a rtsp url

Hey guys,
Im trying to use the rtsp-docker.
So, I built it with docker build -t rtspdockertest .
Then I tried to run it like its described in the readme page, with sudo docker run --network host --rm -it -e AWS_DEFAULT_REGION=us-east-1 rtspdockertest <AWS_ACCESS_KEY_ID> <AWS_SECRET_ACCESS_KEY> ./kinesis_video_gstreamer_sample_app <STREAM_NAME> <RTSP_URL>

I got the following error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"<AWS_ACCESS_KEY_ID>\": executable file not found in $PATH": unknown.

Am I doing something wrong here? Can you help me?

Can't see stream in Media Stream Viewer

Even after starting the stream via http://localhost:8080/dist/ can't see the stream in the sample page https://aws-samples.github.io/amazon-kinesis-video-streams-media-viewer/ and even in media playback section in KinesisVideoStream in amazon console.

JSON I am getting
[ERROR] { "message": "No fragments found in the stream for the streaming request.", "code": "ResourceNotFoundException", "time": "2023-07-17T19:10:57.038Z", "requestId": "1f1d8011-ce45-44ce-8ce9-2200e045af31", "statusCode": 404, "retryable": false, "retryDelay": 78.78418331876465 }

Encountering exception when sending data

I didn't have any issues getting things setup, but when I try to send data I get the following exception. I am running on a Pixel 6 Pro on Android 12.

06-20 23:16:41.748 15842 16356 W KinesisVideoClientWrapper: getKinesisVideoStreamData(): Failed to get the setter method id.
06-20 23:16:41.748 15842 16356 I KinesisVideoClientWrapper: throwNativeException(): Had to clear a pending exception found when throwing "Failed to get setter method id." (code 0xd)
06-20 23:16:41.748 15842 16356 D KinesisVideoClientWrapper: throwNativeException(): Throwing com/amazonaws/kinesisvideo/producer/ProducerException with message: Failed to get setter method id.
06-20 23:16:41.755 15842 16356 E KinesisVideoAndroidClient: 2022-06-20T23:16Z T263: EXCEPTION: ProducerException: Reader threw an exception: Failed to get setter method id. StatusCode: 0xd
06-20 23:16:41.761 15842 16356 I System.out: ERROR: KinesisVideoStreams 2022-06-20T23:16Z T263: EXCEPTION: RuntimeException: Exception thrown on sending thread: Exception while sending encoded chunk in MKV stream !
06-20 23:16:41.761 15842 16356 I KinesisVideoAndroidClient: Complete callback triggered for demo-stream with statuscode 400
06-20 23:16:41.761 15842 16356 D KinesisVideoProducerJNI: Java_com_amazonaws_kinesisvideo_internal_producer_jni_NativeKinesisVideoProducerJni_kinesisVideoStreamTerminated(): Stream terminated event for handle 0x00000078ce81c0b0.

Browser producer cors error

I am trying to run browser example as result i get this error in console

Access to fetch at 'https://*.kinesisvideo.eu-central-1.amazonaws.com/putMedia' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Link to config screenshot

Not sure where cors suppose to be configured. Please advise.

Unify master and viewer into single binary

As of now, webrtc canary assumes that master and viewer will run in different nodes, and there's no way to have master and viewer to run in a single process. Having both peers to run in a single process is useful for some scenarios, e.g. measuring TURN end-to-end latency. So, we need to have a configuration that can decide either run both peers in 1 process or not.

Why a small delay necessary between master and viewer channel creations?

In #98, we need to add a small delay before running the viewer. Otherwise, the viewer will get stuck in "Create Channel" signaling state. The log shows that the server responded with 400 even after the master could successfully create and connect to the channel. This seems to be an issue from the backend. But, we need to get further investigation to accurately find the root cause.

Logs: log-1012.txt

Add file logging option for webrtc canary

We log to cloudwatch with the canary app. But, we should also add a certain degree of redundancy in logging to ensure we have a backup of logs in the device running the canary. We must look into adding a file logging option along with cloudwatch.

Discussion reference: #111

Unable to load kvsplugin

Platform : x86_64
OS: Ubuntu 20.04

Issue: After building the plugin, and exporting the GST_PLUGIN_PATH, inspecting the kvsplugin gives these :

gst-inspect-1.0 kvsplugin

(gst-plugin-scanner:448006): GStreamer-WARNING **: 14:02:31.313: Failed to load plugin '/home/<username>/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/cproducer-src/open-source/lib/libssl.so': /home/<username>/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/cproducer-src/open-source/lib/libssl.so: undefined symbol: EVP_idea_cbc, version OPENSSL_1_1_0

(gst-plugin-scanner:448006): GStreamer-WARNING **: 14:02:31.320: Failed to load plugin '/home/<username>/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-src/open-source/lib/libssl.so': /home/<username>/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-src/open-source/lib/libssl.so: undefined symbol: EVP_idea_cbc, version OPENSSL_1_1_0

(gst-plugin-scanner:447951): GStreamer-WARNING **: 14:02:29.334: Failed to load plugin '/home/<username>/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/libgstkvsplugin.so': /home/<username>/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/libgstkvsplugin.so: undefined symbol: signalingClientFetchSync

No such element or plugin 'kvsplugin'

kvsWebrtcCanaryWebrtc segmentation fault

2020-10-05 19:42:16 ERROR   operator()(): Failed to put sample metric data: At least one of the parameters must be specified.
2020-10-05 19:42:16 ERROR   operator()(): Failed to put sample metric data: At least one of the parameters must be specified.
Process 63026 stopped
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8)
    frame #0: 0x0000000100026326 kvsWebrtcCanaryWebrtc`Canary::Peer::publishStatsForCanary(this=0x00007ffeefbf7510, statsType=RTC_STATS_TYPE_OUTBOUND_RTP) at Peer.cpp:673:13
   670      this->canaryMetrics.requestedTypeOfStats = statsType;
   671      switch (statsType) {
   672          case RTC_STATS_TYPE_OUTBOUND_RTP:
-> 673              CHK_LOG_ERR(::rtcPeerConnectionGetMetrics(this->pPeerConnection, this->videoTransceivers.back(), &this->canaryMetrics));
   674              this->populateOutgoingRtpMetricsContext();
   675              Canary::Cloudwatch::getInstance().monitoring.pushOutboundRtpStats(&this->canaryOutgoingRTPMetricsContext);
   676              break;
Target 0: (kvsWebrtcCanaryWebrtc) stopped.
(lldb) bt
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8)
  * frame #0: 0x0000000100026326 kvsWebrtcCanaryWebrtc`Canary::Peer::publishStatsForCanary(this=0x00007ffeefbf7510, statsType=RTC_STATS_TYPE_OUTBOUND_RTP) at Peer.cpp:673:13
    frame #1: 0x0000000100003c38 kvsWebrtcCanaryWebrtc`canaryRtpOutboundStats(timerId=0, currentTime=16019269659231920, customData=140732920722704) at CanaryWebrtc.cpp:300:16
    frame #2: 0x000000010034a0c1 kvsWebrtcCanaryWebrtc`timerQueueExecutor + 593
    frame #3: 0x00007fff6851c2eb libsystem_pthread.dylib`_pthread_body + 126
    frame #4: 0x00007fff6851f249 libsystem_pthread.dylib`_pthread_start + 66
    frame #5: 0x00007fff6851b40d libsystem_pthread.dylib`thread_start + 13

Here's json config

{"CANARY_USE_TURN":true,"CANARY_DURATION_IN_SECONDS":0,"CANARY_CHANNEL_NAME":"turn-loadtest-channel","CANARY_CLIENT_ID":"hy-client","CANARY_LOG_GROUP_NAME":"TurnLoadTest","CANARY_IS_MASTER":true,"CANARY_TRICKLE_ICE":true,"CANARY_FORCE_TURN":true}

End to end metrics stop emitting after a while

After a while, Master and Viewer stopped pushing end-to-end metrics as this is shown by -nan in the metric value.

This is the only place where the end-to-end metrics gets pushed:

auto handleVideoFrame = [](UINT64 customData, PFrame pFrame) -> VOID {
PPeer pPeer = (Canary::PPeer)(customData);
std::unique_lock<std::recursive_mutex> lock(pPeer->mutex);
PBYTE frameDataPtr = pFrame->frameData + ANNEX_B_NALU_SIZE;
UINT32 rawPacketSize = 0;
// Get size of hex encoded data
hexDecode((PCHAR) frameDataPtr, pFrame->size - ANNEX_B_NALU_SIZE, NULL, &rawPacketSize);
PBYTE rawPacket = (PBYTE) MEMCALLOC(1, (rawPacketSize * SIZEOF(BYTE)));
hexDecode((PCHAR) frameDataPtr, pFrame->size - ANNEX_B_NALU_SIZE, rawPacket, &rawPacketSize);
// Extract the timestamp field from raw packet
frameDataPtr = rawPacket;
UINT64 receivedTs = getUnalignedInt64BigEndian((PINT64)(frameDataPtr));
frameDataPtr += SIZEOF(UINT64);
UINT32 receivedSize = getUnalignedInt32BigEndian((PINT32)(frameDataPtr));
pPeer->endToEndMetricsContext.frameLatency.push_back((DOUBLE)(GETTIME() - receivedTs) / HUNDREDS_OF_NANOS_IN_A_MILLISECOND);
// Do a size match of the raw packet. Since raw packet does not contain the NALu, the
// comparison would be rawPacketSize + ANNEX_B_NALU_SIZE and the received size
pPeer->endToEndMetricsContext.sizeMatch.push_back((rawPacketSize + ANNEX_B_NALU_SIZE) == receivedSize ? 1.0 : 0.0);
SAFE_MEMFREE(rawPacket);
};

From the snippet above, we can tell that:

  1. There can't be any error/jump statement in the callback that leads to unpublished metrics as there's no CHK_*
  2. There's no deadlock since the thread that is driving the callback was still pushing other metrics (e.g. bytes received, packets received, etc.) even after it stopped pushing the end-to-end metrics.
  3. The end-to-end metrics are pushed in the same rate as inbound video FPS, which 30 fps for our case. And, the end-to-end metrics will be averaged and pushed to Cloudwatch once per 30 seconds. So, it's not possible to have empty data since we should expect ~900 data per batch (30 data per second * 30 seconds).

Master Log Snippet:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|   timestamp   |                                                                                                                           message                                                                                                                            |
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1602344463392 | 2020-10-10 15:41:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.993   Dimensions : N/A                                                                                  |
| 1602344463392 | 2020-10-10 15:41:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344464053 | 2020-10-10 15:41:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344467853 | 2020-10-10 15:41:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344474054 | 2020-10-10 15:41:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344482853 | 2020-10-10 15:41:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344484056 | 2020-10-10 15:41:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03248e+06   Dimensions : N/A                                                                               |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.4999   Dimensions : N/A                                                                             |
| 1602344493300 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344493392 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.892   Dimensions : N/A                                                                                  |
| 1602344493393 | 2020-10-10 15:41:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344494058 | 2020-10-10 15:41:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344497853 | 2020-10-10 15:41:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344504059 | 2020-10-10 15:41:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344512853 | 2020-10-10 15:41:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344514061 | 2020-10-10 15:41:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344523393 | 2020-10-10 15:42:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.7772   Dimensions : N/A                                                                                 |
| 1602344523393 | 2020-10-10 15:42:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344524063 | 2020-10-10 15:42:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344527853 | 2020-10-10 15:42:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344534064 | 2020-10-10 15:42:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344542853 | 2020-10-10 15:42:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344544066 | 2020-10-10 15:42:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7999   Dimensions : N/A                                                                                      |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03695e+06   Dimensions : N/A                                                                               |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5329   Dimensions : N/A                                                                             |
| 1602344553300 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344553393 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.738   Dimensions : N/A                                                                                  |
| 1602344553393 | 2020-10-10 15:42:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344554067 | 2020-10-10 15:42:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344557853 | 2020-10-10 15:42:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344564069 | 2020-10-10 15:42:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344572854 | 2020-10-10 15:42:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344574070 | 2020-10-10 15:42:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344583393 | 2020-10-10 15:43:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.6072   Dimensions : N/A                                                                                 |
| 1602344583393 | 2020-10-10 15:43:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344584072 | 2020-10-10 15:43:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344587854 | 2020-10-10 15:43:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344594074 | 2020-10-10 15:43:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344602854 | 2020-10-10 15:43:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344604075 | 2020-10-10 15:43:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.04151e+06   Dimensions : N/A                                                                               |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5668   Dimensions : N/A                                                                             |
| 1602344613300 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344613393 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.5338   Dimensions : N/A                                                                                 |
| 1602344613393 | 2020-10-10 15:43:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344614077 | 2020-10-10 15:43:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344617854 | 2020-10-10 15:43:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344624078 | 2020-10-10 15:43:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344632854 | 2020-10-10 15:43:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344634080 | 2020-10-10 15:43:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344643393 | 2020-10-10 15:44:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.5064   Dimensions : N/A                                                                                 |
| 1602344643393 | 2020-10-10 15:44:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344644081 | 2020-10-10 15:44:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344644309 | 2020-10-10 15:44:04 DEBUG   refreshIceConfigurationCallback(): Refreshing the ICE Server Configuration                                                                                                                                                       |
| 1602344644309 | 2020-10-10 15:44:04 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000100, Next state: 0x0000000000000020                                                                                                                            |
| 1602344644309 | 2020-10-10 15:44:04 DEBUG   operator()(): Signaling client state changed to 6 - 'Get ICE Server Configuration'                                                                                                                                               |
| 1602344644340 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Client append handshake header                                                                                                                                                                         |
| 1602344644340 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Sending the body {  "ChannelARN": "arn:aws:kinesisvideo:us-west-2:232283333863:channel/webrtc-canary-runner-1-WebrtcLongRunning/1602012922349",  "ClientId": "Master",  "Service": "TURN" }, size 170  |
| 1602344644390 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Connected with server response: 200                                                                                                                                                                    |
| 1602344644390 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Received client http                                                                                                                                                                                   |
| 1602344644390 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Received client http read: 537 bytes                                                                                                                                                                   |
| 1602344644390 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Http client completed                                                                                                                                                                                  |
| 1602344644390 | 2020-10-10 15:44:04 DEBUG   lwsHttpCallbackRoutine(): Client http closed                                                                                                                                                                                     |
| 1602344644436 | 2020-10-10 15:44:04 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000020, Next state: 0x0000000000000040                                                                                                                            |
| 1602344644436 | 2020-10-10 15:44:04 DEBUG   operator()(): Signaling client state changed to 7 - 'Ready'                                                                                                                                                                      |
| 1602344644436 | 2020-10-10 15:44:04 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000040, Next state: 0x0000000000000080                                                                                                                            |
| 1602344644436 | 2020-10-10 15:44:04 DEBUG   operator()(): Signaling client state changed to 8 - 'Connecting'                                                                                                                                                                 |
| 1602344644436 | 2020-10-10 15:44:04 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000080, Next state: 0x0000000000000100                                                                                                                            |
| 1602344644436 | 2020-10-10 15:44:04 DEBUG   operator()(): Signaling client state changed to 9 - 'Connected'                                                                                                                                                                  |
| 1602344647854 | 2020-10-10 15:44:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344654083 | 2020-10-10 15:44:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344662854 | 2020-10-10 15:44:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344664084 | 2020-10-10 15:44:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7999   Dimensions : N/A                                                                                      |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03698e+06   Dimensions : N/A                                                                               |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5332   Dimensions : N/A                                                                             |
| 1602344673300 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344673393 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.398   Dimensions : N/A                                                                                  |
| 1602344673393 | 2020-10-10 15:44:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344674086 | 2020-10-10 15:44:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344677854 | 2020-10-10 15:44:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344684087 | 2020-10-10 15:44:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344692855 | 2020-10-10 15:44:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344694089 | 2020-10-10 15:44:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344703394 | 2020-10-10 15:45:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : 35.3865   Dimensions : N/A                                                                                 |
| 1602344703394 | 2020-10-10 15:45:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : 1   Dimensions : N/A                                                                                                    |
| 1602344704090 | 2020-10-10 15:45:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344707855 | 2020-10-10 15:45:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344714092 | 2020-10-10 15:45:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344722855 | 2020-10-10 15:45:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344724093 | 2020-10-10 15:45:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344733300 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344733300 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
| 1602344733300 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344733300 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344733300 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03248e+06   Dimensions : N/A                                                                               |
| 1602344733301 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.4999   Dimensions : N/A                                                                             |
| 1602344733301 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344733394 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344733394 | 2020-10-10 15:45:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344733398 | 2020-10-10 15:45:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344733398 | 2020-10-10 15:45:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344734095 | 2020-10-10 15:45:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344737855 | 2020-10-10 15:45:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344744096 | 2020-10-10 15:45:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344752855 | 2020-10-10 15:45:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344754098 | 2020-10-10 15:45:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344763394 | 2020-10-10 15:46:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344763394 | 2020-10-10 15:46:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344763408 | 2020-10-10 15:46:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344763413 | 2020-10-10 15:46:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344764100 | 2020-10-10 15:46:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344767855 | 2020-10-10 15:46:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344774102 | 2020-10-10 15:46:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344782855 | 2020-10-10 15:46:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344784104 | 2020-10-10 15:46:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344793300 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344793300 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
| 1602344793300 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344793301 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344793301 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03698e+06   Dimensions : N/A                                                                               |
| 1602344793301 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5332   Dimensions : N/A                                                                             |
| 1602344793301 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344793394 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344793394 | 2020-10-10 15:46:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344793398 | 2020-10-10 15:46:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344793398 | 2020-10-10 15:46:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344794106 | 2020-10-10 15:46:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344797855 | 2020-10-10 15:46:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344804108 | 2020-10-10 15:46:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344812856 | 2020-10-10 15:46:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344814110 | 2020-10-10 15:46:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344823394 | 2020-10-10 15:47:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344823394 | 2020-10-10 15:47:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344823408 | 2020-10-10 15:47:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344823409 | 2020-10-10 15:47:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344824112 | 2020-10-10 15:47:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344827856 | 2020-10-10 15:47:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344834114 | 2020-10-10 15:47:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344842856 | 2020-10-10 15:47:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344844115 | 2020-10-10 15:47:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7999   Dimensions : N/A                                                                                      |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.04148e+06   Dimensions : N/A                                                                               |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5665   Dimensions : N/A                                                                             |
| 1602344853301 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344853394 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344853394 | 2020-10-10 15:47:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344853399 | 2020-10-10 15:47:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344853399 | 2020-10-10 15:47:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344854118 | 2020-10-10 15:47:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344857856 | 2020-10-10 15:47:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344864120 | 2020-10-10 15:47:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344872856 | 2020-10-10 15:47:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344874122 | 2020-10-10 15:47:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344883394 | 2020-10-10 15:48:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344883394 | 2020-10-10 15:48:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344883412 | 2020-10-10 15:48:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344883414 | 2020-10-10 15:48:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344884124 | 2020-10-10 15:48:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344887856 | 2020-10-10 15:48:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344894126 | 2020-10-10 15:48:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344902856 | 2020-10-10 15:48:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344904128 | 2020-10-10 15:48:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03698e+06   Dimensions : N/A                                                                               |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5332   Dimensions : N/A                                                                             |
| 1602344913301 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344913394 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344913395 | 2020-10-10 15:48:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344913399 | 2020-10-10 15:48:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344913401 | 2020-10-10 15:48:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344914129 | 2020-10-10 15:48:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344914436 | 2020-10-10 15:48:34 DEBUG   refreshIceConfigurationCallback(): Refreshing the ICE Server Configuration                                                                                                                                                       |
| 1602344914437 | 2020-10-10 15:48:34 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000100, Next state: 0x0000000000000020                                                                                                                            |
| 1602344914437 | 2020-10-10 15:48:34 DEBUG   operator()(): Signaling client state changed to 6 - 'Get ICE Server Configuration'                                                                                                                                               |
| 1602344914461 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Client append handshake header                                                                                                                                                                         |
| 1602344914461 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Sending the body {  "ChannelARN": "arn:aws:kinesisvideo:us-west-2:232283333863:channel/webrtc-canary-runner-1-WebrtcLongRunning/1602012922349",  "ClientId": "Master",  "Service": "TURN" }, size 170  |
| 1602344914640 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Connected with server response: 200                                                                                                                                                                    |
| 1602344914640 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Received client http                                                                                                                                                                                   |
| 1602344914640 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Received client http read: 537 bytes                                                                                                                                                                   |
| 1602344914640 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Http client completed                                                                                                                                                                                  |
| 1602344914640 | 2020-10-10 15:48:34 DEBUG   lwsHttpCallbackRoutine(): Client http closed                                                                                                                                                                                     |
| 1602344914655 | 2020-10-10 15:48:34 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000020, Next state: 0x0000000000000040                                                                                                                            |
| 1602344914655 | 2020-10-10 15:48:34 DEBUG   operator()(): Signaling client state changed to 7 - 'Ready'                                                                                                                                                                      |
| 1602344914655 | 2020-10-10 15:48:34 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000040, Next state: 0x0000000000000080                                                                                                                            |
| 1602344914655 | 2020-10-10 15:48:34 DEBUG   operator()(): Signaling client state changed to 8 - 'Connecting'                                                                                                                                                                 |
| 1602344914655 | 2020-10-10 15:48:34 DEBUG   stepStateMachine(): State Machine - Current state: 0x0000000000000080, Next state: 0x0000000000000100                                                                                                                            |
| 1602344914655 | 2020-10-10 15:48:34 DEBUG   operator()(): Signaling client state changed to 9 - 'Connected'                                                                                                                                                                  |
| 1602344917856 | 2020-10-10 15:48:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344924131 | 2020-10-10 15:48:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344932857 | 2020-10-10 15:48:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344934132 | 2020-10-10 15:48:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344943395 | 2020-10-10 15:49:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344943395 | 2020-10-10 15:49:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344943422 | 2020-10-10 15:49:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344943466 | 2020-10-10 15:49:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344944134 | 2020-10-10 15:49:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344947857 | 2020-10-10 15:49:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344954137 | 2020-10-10 15:49:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344962857 | 2020-10-10 15:49:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344964139 | 2020-10-10 15:49:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7999   Dimensions : N/A                                                                                      |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03699e+06   Dimensions : N/A                                                                               |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5333   Dimensions : N/A                                                                             |
| 1602344973301 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602344973395 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602344973395 | 2020-10-10 15:49:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602344973398 | 2020-10-10 15:49:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344973398 | 2020-10-10 15:49:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602344974141 | 2020-10-10 15:49:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344977857 | 2020-10-10 15:49:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344984143 | 2020-10-10 15:49:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602344992857 | 2020-10-10 15:49:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602344994145 | 2020-10-10 15:49:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345003395 | 2020-10-10 15:50:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602345003395 | 2020-10-10 15:50:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602345003409 | 2020-10-10 15:50:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345003412 | 2020-10-10 15:50:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345004147 | 2020-10-10 15:50:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345007857 | 2020-10-10 15:50:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345014149 | 2020-10-10 15:50:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345022857 | 2020-10-10 15:50:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345024151 | 2020-10-10 15:50:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.03247e+06   Dimensions : N/A                                                                               |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.4998   Dimensions : N/A                                                                             |
| 1602345033301 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602345033395 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602345033395 | 2020-10-10 15:50:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602345033400 | 2020-10-10 15:50:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345033401 | 2020-10-10 15:50:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345034152 | 2020-10-10 15:50:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345037858 | 2020-10-10 15:50:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345044154 | 2020-10-10 15:50:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345052858 | 2020-10-10 15:50:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345054156 | 2020-10-10 15:50:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345063395 | 2020-10-10 15:51:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602345063395 | 2020-10-10 15:51:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602345063414 | 2020-10-10 15:51:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345063415 | 2020-10-10 15:51:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345064158 | 2020-10-10 15:51:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345067858 | 2020-10-10 15:51:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345074160 | 2020-10-10 15:51:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345082858 | 2020-10-10 15:51:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345084162 | 2020-10-10 15:51:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345093301 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602345093301 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7999   Dimensions : N/A                                                                                      |
| 1602345093301 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : NackPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                                              |
| 1602345093301 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFramesRetransmitted   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                   |
| 1602345093301 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingBitRate   Unit       : Kilobits_Second   Values     : 8.04149e+06   Dimensions : N/A                                                                               |
| 1602345093301 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingPacketsPerSecond   Unit       : Count_Second   Values     : 59.5666   Dimensions : N/A                                                                             |
| 1602345093302 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : IncomingFramesDroppedPerSecond   Unit       : Count_Second   Values     : 0   Dimensions : N/A                                                                             |
| 1602345093395 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602345093395 | 2020-10-10 15:51:33 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602345093399 | 2020-10-10 15:51:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345093401 | 2020-10-10 15:51:33 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345094164 | 2020-10-10 15:51:34 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345097858 | 2020-10-10 15:51:37 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345104165 | 2020-10-10 15:51:44 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345112858 | 2020-10-10 15:51:52 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345114167 | 2020-10-10 15:51:54 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345123396 | 2020-10-10 15:52:03 DEBUG   push(): Emitted the following metric:    Name       : EndToEndFrameLatency   Unit       : Milliseconds   Values     : -nan   Dimensions : N/A                                                                                    |
| 1602345123396 | 2020-10-10 15:52:03 DEBUG   push(): Emitted the following metric:    Name       : FrameSizeMatch   Unit       : Count   Values     : -nan   Dimensions : N/A                                                                                                 |
| 1602345123413 | 2020-10-10 15:52:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345123416 | 2020-10-10 15:52:03 ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: MalformedInput Message:                                                                                                                           |
| 1602345124169 | 2020-10-10 15:52:04 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345127858 | 2020-10-10 15:52:07 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345134171 | 2020-10-10 15:52:14 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345142859 | 2020-10-10 15:52:22 DEBUG   handleStunPacket(): Received STUN binding indication                                                                                                                                                                             |
| 1602345144173 | 2020-10-10 15:52:24 DEBUG   lwsWssCallbackRoutine(): Client is writable                                                                                                                                                                                      |
| 1602345153301 | 2020-10-10 15:52:33 DEBUG   push(): Emitted the following metric:    Name       : PercentageFrameDiscarded   Unit       : Percent   Values     : 0   Dimensions : N/A                                                                                        |
| 1602345153301 | 2020-10-10 15:52:33 DEBUG   push(): Emitted the following metric:    Name       : FramesPerSecond   Unit       : Count_Second   Values     : 29.7833   Dimensions : N/A                                                                                      |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Full Logs:
Master: WebrtcLongRunning-Master-1602306331864
Viewer: WebrtcLongRunning-Viewer-1602306331864

CMake FetchContent module requires CMake 3.11+

Hi,

I am trying to compile webrtc-c demos on Ubuntu 18.04, for which latest CMake version is 3.10.2.

cmake_minimum_required(VERSION 3.10.2)
project(KVSWebRTCCanary LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 11)
include(FetchContent)

In the CMakeLists.txt above the minimum version is set to 3.10.2. However it uses FetchContent module which is only available in 3.11+.

I get the following error on my machine:

vrichard@vr-desktop:~/amazon-kinesis-video-streams-demos/webrtc-c/canary/build$ cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:6 (include):
  include could not find load file:

    FetchContent


CMake Error at CMakeLists.txt:13 (FetchContent_Declare):
  Unknown CMake command "FetchContent_Declare".


-- Configuring incomplete, errors occurred!
See also "/home/vrichard/amazon-kinesis-video-streams-demos/webrtc-c/canary/build/CMakeFiles/CMakeOutput.log".

The problem disappear when I use a recent version of CMake.

RTSP demo application disconnecting after some time

Hi team,

I have setup two RTSP cameras on my network and I have followed the RTSP demo application (https://github.com/aws-samples/amazon-kinesis-video-streams-demos/tree/master/producer-cpp/docker-rtsp) that uses docker desktop on Windows to send both streams to Amazon Kinesis Video. I was successfully able to see each video feed on amazon console for each stream. However after I left the sample to run for some time. After some time the process shuts down and the stream is stopped. I can see some warnings before the error "Error received from element source: Could not read from resource." is thrown. Seems the first warning that is thrown is " curlCompleteSync(): curl perform failed for url https://xxxxxxxxxxxxxx.us-west-2.amazonaws.com/putMedia with result Failure when receiving data from the peer: OpenSSL SSL_read: Connection reset by peer, errno 104". I have seen some suggestions on threads on this site which suggested to turn down the camera stream "Frame Size", "Max Bit Rate", "Target Quality" and finally "Intra Frame Period". When I was running at ("Frame Size" = "1920 1080") sometimes it would stop stream after about 20-30 mins. But since I have turned it down to ("Frame Size" = "640 360", "Target Quality" = "Medium", "Max Bit Rate" = "1 MBps" and "Intra Frame Period" = "1s") and it actually ran for about 2.5 hours before shutting down with the same issue. I have blacked out all the keys and credentials and attached two screen shots to this message. They contain all the warnings and the error that is thrown before the process is shut down. We plan to use architecture for a client and we will be adding many more cameras to the network.

Can you please guide me to what can be causing this issue and ways to improve this so the process does not shut down. Also please let me know if you need anything else.

Thanks for your time

Screenshot1
image

gst-launch-1.0: command not found

Hi,
I followed the instructions to run the RTSP example application using Docker from the https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/examples-rtsp.html official documentation. When executing AWS_ACCESS_KEY_ID=$1 AWS_SECRET_ACCESS_KEY=$2 AWS_DEFAULT_REGION="us-east-1" gst-launch-1.0 rtspsrc location=rtsp://$3 ! rtph264depay ! h264parse ! kvssink stream-name=$4 storage-size=512 within the docker container then getting the error.

bash: gst-launch-1.0: command not found

[GST Plugin] Signaling channel not respecting `aws-region` property

Hi! I am working on getting the GST plugin up and running so I can push video to both a video stream and signaling channel. While the plugin is working in the sense that it is publishing to both a video stream an signaling channel, the signaling channel is not respecting the aws-region property on kvsplugin and is always pushing to us-west-2

The problem is very reproducible with any command, but for reference this is the test command I am running:

gst-launch-1.0 uridecodebin uri=https://ia800701.us.archive.org/26/items/SampleVideo1280x7205mb/SampleVideo_1280x720_5mb.mp4 ! vtenc_h264_hw max-keyframe-interval=30 bitrate=500 ! kvsplugin aws-region=us-east-1

And this is how I am verifying the signaling channel is being created in the incorrect region:

$ aws kinesisvideo list-streams --region us-east-1
{
    "StreamInfoList": [
        {
            "DeviceName": "VPI9Y8SDEEW3OTOY",
            "StreamName": "DEFAULT_STREAM",
            "StreamARN": "arn:aws:kinesisvideo:us-east-1:XXXXXXXXXXXX:stream/DEFAULT_STREAM/1614895586442",
            "MediaType": "video/h264",
            "KmsKeyId": "arn:aws:kms:us-east-1:028923058570:alias/aws/kinesisvideo",
            "Version": "8i2cifJ2iTKCh4zHfOuO",
            "Status": "ACTIVE",
            "CreationTime": "2021-03-04T17:06:26.442000-05:00",
            "DataRetentionInHours": 2
        }
    ]
}

$ aws kinesisvideo list-signaling-channels --region us-east-1
{
    "ChannelInfoList": []
}

$ aws kinesisvideo list-signaling-channels --region us-west-2
{
    "ChannelInfoList": [
        {
            "ChannelName": "DEFAULT_CHANNEL",
            "ChannelARN": "arn:aws:kinesisvideo:us-west-2:XXXXXXXXXXXX:channel/DEFAULT_CHANNEL/1614895587705",
            "ChannelType": "SINGLE_MASTER",
            "ChannelStatus": "ACTIVE",
            "CreationTime": "2021-03-04T17:06:27.705000-05:00",
            "SingleMasterConfiguration": {
                "MessageTtlSeconds": 60
            },
            "Version": "IEoqKrmPSLsMvE18zgjT"
        }
    ]
}

Maybe I am missing something, but I also tried set both AWS_REGION and AWS_DEFAULT_REGION and had the same results. Thanks in advance for your help!

Add Automatic Intermittent Producer To Canary

With the recently added automatic intermittent producer handling in PIC and Producer C, we should add a long running test for this in the Canary, the test is simple just putting frames and pausing (no API call just stop producing frames) alternating for 1 minute (or some other fixed pre-determined time) would be great. If possible I'd prefer something like this pseudocode:

while(true) 
  int i = random_int_in_range_1_10;
  put_frames_for_i_mins;
  int j = random_int_in_range_1_10;
  sleep_for_j_mins;
end

This way we won't always stop/start on a key frame we'll regularly be testing those scenarios and make sure our SDK / back-end doesn't generate any errors.

Unable to load kvsplugin

KVS GStreamer Plugin is not building correctly. Goal is to have a gst plugin/sink that streams to kvs webrtc.

libgstkvsplugin.so is built, but gst-inspect-1.0 kvsplugin gives:

(gst-plugin-scanner:93604): GStreamer-WARNING **: 03:51:21.896: Failed to load plugin '/host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/libgstkvsplugin.so': /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/libgstkvsplugin.so: undefined symbol: signalingClientFetchSync
No such element or plugin 'kvsplugin'

Related issue #241 was closed but it was not resolved, since PR #245 was not merged in.
#241 (comment)
#245 (comment)


Steps to reproduce:
OS: Ubuntu 22.04.2 Arch: x86_64

git clone --recursive https://github.com/aws-samples/amazon-kinesis-video-streams-demos.git
mkdir -p amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build
cd amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build 
cmake -DBUILD_GSTREAMER_PLUGIN=TRUE ..
make
# libgstkvsplugin.so is built 

cd ..
export GST_PLUGIN_PATH=`pwd`/build
gst-inspect-1.0 kvsplugin

Expected: gstreamer inspection page... showing the properties of a working plugin.

Extra info:

ldd libgstkvsplugin.so 
	linux-vdso.so.1 (0x00007fff47b8e000)
	libgstbase-1.0.so.0 => /lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007fbd6b0e7000)
	libgstreamer-1.0.so.0 => /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007fbd6af96000)
	libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fbd6af36000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbd6adfc000)
	libkvsWebrtcClient.so => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-build/libkvsWebrtcClient.so (0x00007fbd6ad89000)
	libkvsWebrtcSignalingClient.so => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-build/libkvsWebrtcSignalingClient.so (0x00007fbd6ad5d000)
	libcproducer.so => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/cproducer-build/libcproducer.so (0x00007fbd6acdd000)
	libcurl.so => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/cproducer-src/open-source/lib/libcurl.so (0x00007fbd6ac2c000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbd6aa00000)
	libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fbd6a9f9000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbd6a912000)
	libunwind.so.8 => /lib/x86_64-linux-gnu/libunwind.so.8 (0x00007fbd6a8f7000)
	libdw.so.1 => /lib/x86_64-linux-gnu/libdw.so.1 (0x00007fbd6a84b000)
	libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fbd6a83e000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fbd6a7c8000)
	libssl.so.1.1 => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-src/open-source/lib/libssl.so.1.1 (0x00007fbd6a730000)
	libcrypto.so.1.1 => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-src/open-source/lib/libcrypto.so.1.1 (0x00007fbd6a400000)
	libusrsctp.so.1 => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-src/open-source/lib/libusrsctp.so.1 (0x00007fbd6a32f000)
	libwebsockets.so.15 => /host/tests/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/build/_deps/webrtc-src/open-source/lib/libwebsockets.so.15 (0x00007fbd6a6f4000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbd6a313000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fbd6b19e000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fbd6a2e8000)
	libelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x00007fbd6a2ca000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fbd6a2b7000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fbd6a2ac000)


Allow JSON file to initialize config

As of now, the webrtc canary only uses environment variables to initialize config. We should also allow JSON format to give more flexibility to the runner.

[GST Plugin] AAC Invalid Codec Private Data

Hi! I'm working on pumping video data (H264/AAC) from an upstream source to Kinesis Video Streams via the gstreamer plugin. While the gst pipeline runs and submits data successfully, when I try to generate an HLS playlist I get the following error:

$ aws kinesis-video-archived-media get-hls-streaming-session-url --endpoint $ENDPOINT_URL --stream-name aac-audio-issue --hls-fragment-selector FragmentSelectorType=SERVER_TIMESTAMP,TimestampRange={StartTimestamp=2021-04-06T15:05:00.007Z} --playback-mode LIVE_REPLAY

An error occurred (MissingCodecPrivateDataException) when calling the GetHLSStreamingSessionURL operation: Missing codec private data in fragment for track 2.

If I grab the fragment via get-media-for-fragment-list, the fragment AAC has an invalid sampling rate:

$ ffprobe -hide_banner fragment.webm 
[aac @ 0x7fdfb6820c00] invalid sampling rate index 13
[matroska,webm @ 0x7fdfb680de00] Failed to open codec in avformat_find_stream_info
[aac @ 0x7fdfb6820c00] invalid sampling rate index 13
    Last message repeated 1 times
[matroska,webm @ 0x7fdfb680de00] Failed to open codec in avformat_find_stream_info
[matroska,webm @ 0x7fdfb680de00] Could not find codec parameters for stream 1 (Audio: aac, 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from 'fragment.webm':
  Metadata:
    title           : Kinesis Video SDK
    encoder         : Kinesis Video SDK 1.1.0
    AWS_KINESISVIDEO_FRAGMENT_NUMBER: 91343852333181724596048935557323111792491521698
    AWS_KINESISVIDEO_SERVER_TIMESTAMP: 1617721523.251
    AWS_KINESISVIDEO_PRODUCER_TIMESTAMP: 1617721523.469
  Duration: N/A, start: 1617721523.469000, bitrate: N/A
    Stream #0:0(eng): Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 30.30 fps, 30 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      title           : kvs_video_track
    Stream #0:1(eng): Audio: aac, 0 channels, fltp (default)
    Metadata:
      title           : kvs_audio_track
[aac @ 0x7fdfb686a800] invalid sampling rate index 13
Could not open codec for input stream 1

To confirm that the GST pipeline isn't the culprit, I replaced kvsplugin with an matroskamux/filesink and the file works correctly (see pipeline.mkv). I also tried conforming the CPD by calling mkvgenGenerateAacCpd, but ran into the same error (see aac_cpd.patch)

This is my test gst pipeline:

gst-launch-1.0 \
    filesrc location=src.mkv do-timestamp=TRUE !  matroskademux name=demux ! identity sync=TRUE ! queue ! \
    video/x-h264,group-id=1 ! multiqueue name=q sync-by-running-time=true demux. ! audio/mpeg,group-id=1 ! q. \
    kvsplugin name=kvs aws-region=us-east-1 stream-name=aac-audio-issue enable-streaming=true connect-webrtc=false log-level=3 \
    q. ! video/x-h264 ! h264parse ! kvs. \
    q. ! audio/mpeg ! aacparse ! kvs.

All my test media and my unsuccessful attempt at a fix is attached:
media.zip
aac_cpd.patch.txt

Thank you in advanced for helping us get to the bottom of this one.

Use cmake3 from yum

Currently, cmake is manually installed so that version 3 is available, but it's available from yum and cmake3 and should replace the install of cmake to remove the unused package and reduce image size

Fix end to end frame latency measurement in webrtc canary

When frames are generated a higher rate, the number of end to end latencies data generated might be more within the current 30 second cloudwatch metric duration. This leads to the following error:

ERROR   operator()(): Failed to put sample metric data: Unable to parse ExceptionName: RequestEntityTooLarge Message: Request size 41154 exceeded 40960 bytes"

The metric emitting frequency must be based on the frame rate to avoid this issue and to ensure we do not lose data points.

Add gstreamer plugin usage demo for kinesis webrtc (gst-launch pipeline)

Although we have usage samples on how to integrate the gstreams libs into a program, another common pattern is run directly as a gst-launch-1.0 pipeline.

Sending a mkv file directly to a video stream channel: (works)

gst-launch-1.0 -v \
filesrc location=/path/Jellyfish_1080_10s_2MB.mkv \
! matroskademux name=demux  demux.video_0\
! decodebin \
! videoconvert \
! x264enc bframes=0 key-int-max=45 bitrate=500 ! video/x-h264,stream-format=avc,alignment=au,profile=baseline \
! kvssink stream-name="stream_name" storage-size=512 aws-region="us-west-2" \
iot-certificate="iot-certificate,endpoint=xxxx.credentials.iot.us-west-2.amazonaws.com,cert-path=/path/aws-iot-cert.pem.crt,key-path=/path/aws-iot-cert.pem.key,ca-path=/home/path/aws-iot-cert-rootca.pem,role-aliases=IoTRoleAlias,iot-thing-name=thing_name"

What is the equivalent pipeline allowing a mkv video to be sent to a signaling channel?
(based on kvsplugin -- for webrtc)

I've read many samples in the official docs or across the web but am having a hard time making it to work with gst-launch-1.0 directly. (and found many others also struggling).
Having a couple more samples based on gst-launch would be really nice.

I can test and prepare a PR with more cases (ex: webcam->webrtc, other sources, etc), but need help figuring out one initial working case of how to get kvsplugin to send a file to webrtc.

ERROR running producer C canary

Hello guys,
after building the executable and added the iot credentials, i tried to run the KvsProducerSampleCloudwatch but i always get this error below:

2022-12-06 13:17:33 ERROR main(): operation returned status code: 0x00000009
2022-12-06 13:17:33 ERROR main(): operation returned status code: 0x00000009

Screenshot from 2022-12-06 14-33-25

error in aws kinesis stream setup in raspberry pi with docker file

sudo docker run -it --device=/dev/video0 --device=/dev/vchiq -v /opt/vc:/opt/vc /bin/bash

during running this command in raspberry pi4 Iam getting this error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
docker: Error response from daemon: error gathering device information while adding custom device "/dev/video0": no such file or director
Screenshot from 2021-12-14 17-13-04

Use Makefile instead to add consumer to our CI

I'd highly recommend to use Makefile instead so we can even add this to our CI.

To add this to the CI, you just need to create a Makefile that has "test" as the target, and add the directory path to the target in .travis.yaml below:

- env: TARGET=webrtc-c/canary

It's definitely not the best test, but it can add some sanity check at least.

Originally posted by @lherman-cs in #64 (comment)

ReferenceError: SharedArrayBuffer is not defined

when running on chrome the message says ReferenceError: SharedArrayBuffer is not defined. Getting this error when trying to upload an object
Unhandled Promise Rejection: ReferenceError: Can't find variable: SharedArrayBuffer, Getting this error when trying to start webcam.

HLS stream url is not playing

Using node js getting the stream hls and it does not play via vlc quicktime or jwt.
How do I Identify the issue?

public async getHLSStreamingSessionURL() {
        console.log("getHLSStreamingSessionURL");
        var dataParams = {
            APIName: 'GET_HLS_STREAMING_SESSION_URL',
            StreamName: 'THE_NAME'
        };
        var kinesisvideo = new AWS.KinesisVideo({ region: 'us-east-1' });
        var StartTimestamp = new Date(2020, 11, 15, 15, 0, 0, 0);
        var EndTimestamp = new Date(2020, 11, 15, 18, 0, 0, 0);

        var dataResult = await kinesisvideo.getDataEndpoint(dataParams).promise();
        console.log("dataResult", dataResult);

        //https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KinesisVideoArchivedMedia.html#getHLSStreamingSessionURL-property
        var kinesisvideoarchivedmedia = new AWS.KinesisVideoArchivedMedia({
            endpoint: dataResult.DataEndpoint
        });


        var params = {
            ContainerFormat: 'FRAGMENTED_MP4', //FRAGMENTED_MP4 | MPEG_TS
            DiscontinuityMode: 'NEVER', //ALWAYS | NEVER | ON_DISCONTINUITY
            DisplayFragmentTimestamp: 'NEVER', //ALWAYS | NEVER
            Expires: 300,
            HLSFragmentSelector: {
                FragmentSelectorType: 'PRODUCER_TIMESTAMP', //PRODUCER_TIMESTAMP | SERVER_TIMESTAMP
                TimestampRange: {
                    StartTimestamp: StartTimestamp,
                    EndTimestamp: EndTimestamp
                }
            },
            MaxMediaPlaylistFragmentResults: 300,
            PlaybackMode: 'LIVE_REPLAY', //LIVE | LIVE_REPLAY | ON_DEMAND
            StreamName: 'THE_NAME'

        };
        var result = await kinesisvideoarchivedmedia.getHLSStreamingSessionURL(params).promise();
        console.log("result", result);
        return result;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.