layout | categories | tags | excerpt_separator | permalink | name | ||
---|---|---|---|---|---|---|---|
default |
|
|
<!--more--> |
/q&a/embedded |
/q&a/embedded.html |
Audio/Video Support:
- VP8
- H264
- Opus
- G.711 PCM (A-law)
- G.711 PCM (µ-law)
Check our official docs for more details.
Check this Workshop: Cross Compile For Other Platforms provided by IoT Lab.
- Using mbedTLS instead of OpenSSL. This replacement can reduce around 1M RAM usage with one viewer during our test.
- 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
- If your device don't need data channel, use CMake flag
ENABLE_DATA_CHANNEL=OFF
to disable it. - Build with gcc optimization flag and remove debug symbols.
Check this Workshop: Connect Amazon KVS WebRTC with AWS IoT provided by IoT Lab.
- Set log level to
LOG_LEVEL_VERBOSE
. - Use KVS WebRTC Test Page as viewer, KVS WebRTC Embedded C SDK master sample as master to reproduce.
- Get error code in log.
- Locate your error code in WebRTC client header or KVS common header.
- If it's not network/credential related issue, rise an issue at our github repository with your log attached.
This could happen on devices set with incorrect system time. You need to synchronize your system time with UTC via date -s
.
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.
In normal case KVS WebRTC can provide real-time video/audio communication with low latency, if you observed abnormal latency issues:
- Make sure the video/audio frames provided to KVS WebRTC have correct timestamp.
- Try to reduce
DEFAULT_ROLLING_BUFFER_DURATION_IN_SECONDS
at Rtp.h - For some devices with limited cpu resources, log module might impact KVS WebRTC SDK performance. Try to set log level to
LOG_LEVEL_ERROR
orLOG_LEVEL_SILENT
.
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.
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.