aws/amazon-kinesis-video-streams-parser-library

KinesisVideoRenderExampleTest fails with an ArrayIndexOutOfBoundsException

anaelshomrai opened this issue · 0 comments

Hello, we are creating and transmitting live stream from a webcam using the AWS Kinesis video WebRTC SDK for Javascript. We are using the official test page for the creation and transmission, then we start the KinesisVideoRenderExampleTest with our stream, and we successfully see the frames from our stream, however at some point (either instantly or after a few minutes) we are getting the ArrayIndexOutOfBoundsException.

Failure in GetMediaWorker for streamName ********* java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 236176 out of bounds for byte[235520]

Describe the bug
Frames extraction fails after certain time when producing the stream from the AWS Kinesis WebRTC SDK for Javascript.
We've also noticed the wrong width and height are being received so maybe it is related.

To Reproduce
Steps to reproduce the behavior:

  1. Cloned this parser repo
  2. Replace the stream name with my own stream
  3. Create, set all related configurations, and start the stream using AWS JS example page - https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html
  4. After a few minutes (sometimes instantly) this error appear

Steps for configuring and starting the stream from the WebRTC test page:
Signaling channel:

  1. Set the signaling channel name, and create it
    Tracks:
  2. Enable "Send Audio" and "Send Video"
    WebRTC Ingestion and Storage
  3. Set the stream name
  4. Create it
  5. Update Media Storage Configuration
  6. Enable Ingestion and storage peer joins automatically
    Video Resolution:
  7. We need 1280x720 (16:9 widescreen), However we also tried 640x480 which resulted in the same error.

Everything else we leave it as default, and then click on "Start as Master" and waiting for all operations to be completed before we start the parser.