Skip to content

Latest commit

 

History

History
96 lines (68 loc) · 4.94 KB

KVS WebRTC Embedded C SDK Q&A.md

File metadata and controls

96 lines (68 loc) · 4.94 KB
layout categories tags excerpt_separator permalink name
default
Q&A
KVS WebRTC
<!--more-->
/q&a/embedded
/q&a/embedded.html

KVS WebRTC Embedded C SDK Q&A/Development Guide

Supported video/audio format?

Audio/Video Support:

  • VP8
  • H264
  • Opus
  • G.711 PCM (A-law)
  • G.711 PCM (µ-law)

Is there any limitation for KVS WebRTC?

Check our official docs for more details.

How can I cross compile it to my platforms?

Check this Workshop: Cross Compile For Other Platforms provided by IoT Lab.

How to optimize WebRTC C SDK memory(RAM/Flash)?

  1. Using mbedTLS instead of OpenSSL. This replacement can reduce around 1M RAM usage with one viewer during our test.
  2. Reducing Rolling buffer size. SDK itself will maintain a 3 seconds rolling buffer by default(DEFAULT_ROLLING_BUFFER_DURATION_IN_SECONDS * HIGHEST_EXPECTED_BIT_RATE / 8 / DEFAULT_MTU_SIZE). Reduce rolling buffer according to your user cases at Rtp.h, i.e.:
     #define DEFAULT_MTU_SIZE                           1200
     #define DEFAULT_ROLLING_BUFFER_DURATION_IN_SECONDS 1
     #define HIGHEST_EXPECTED_BIT_RATE                  (5 * 1024 * 1024)
     #define DEFAULT_SEQ_NUM_BUFFER_SIZE                1000
     #define DEFAULT_VALID_INDEX_BUFFER_SIZE            1000
     #define DEFAULT_PEER_FRAME_BUFFER_SIZE             (5 * 1024)
     #define SRTP_AUTH_TAG_OVERHEAD                     10
  3. If your device don't need data channel, use CMake flag ENABLE_DATA_CHANNEL=OFF to disable it.
  4. Build with gcc optimization flag and remove debug symbols.

How to use x509 certificates to connect to KVS WebRTC?

Check this Workshop: Connect Amazon KVS WebRTC with AWS IoT provided by IoT Lab.

How can I troubleshoot runtime error on an IP camera?

  1. Set log level to LOG_LEVEL_VERBOSE.
  2. Use KVS WebRTC Test Page as viewer, KVS WebRTC Embedded C SDK master sample as master to reproduce.
  3. Get error code in log.
  4. Locate your error code in WebRTC client header or KVS common header.
  5. If it's not network/credential related issue, rise an issue at our github repository with your log attached.

How to solve Error: "Signature not yet current: xxxxx is still later than xxxxxxxx + 5 min."?

This could happen on devices set with incorrect system time. You need to synchronize your system time with UTC via date -s.

Does KVS WebRTC SDK support dynamic video bitrate/resolution?

KVS WebRTC SDK supports dynamic bitrate/resolution on the fly, since H.264 SPS contains video bitrate/resolution information. If both the encoder and decoder support dynamic video bitrate/resolution, change video bitrate/resolution will work on the fly.

How can I troubleshoot latency issues?

In normal case KVS WebRTC can provide real-time video/audio communication with low latency, if you observed abnormal latency issues:

  1. Make sure the video/audio frames provided to KVS WebRTC have correct timestamp.
  2. Try to reduce DEFAULT_ROLLING_BUFFER_DURATION_IN_SECONDS at Rtp.h
  3. For some devices with limited cpu resources, log module might impact KVS WebRTC SDK performance. Try to set log level to LOG_LEVEL_ERROR or LOG_LEVEL_SILENT.

How can I monitor cloud side metrics?

There are several metrics available on AWS Cloud watch

Signaling:

  • ConnectAsMaster
  • ConnectAsViewer
  • SendSdpOffer
  • SendSdpAnswer
  • SendCandidate
  • SendAlexaOfferToMaster
  • GetIceServerConfig
  • Disconnect

Those metrics could be used to troubleshoot connection issues.

TURN:

  • TURNConnectedMinutes

This metrics could be used to track charges.

How can I connect Amazon KVS WebRTC with Alexa Echo Show?

Alexa provides an interface Alexa.RTCSessionController in Smart Home Skills. By implementing skills with Alexa.RTCSessionController, user could connect Amazon KVS WebRTC with Alexa Echo Show.