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

Amazon Kinesis Video Streams parser library is for developers to include in their applications that makes it easy to work with the output of video streams such as retrieving frame-level objects, metadata for fragments, and more.
Apache License 2.0
103 stars 52 forks source link

EBML ID too large? #113

Closed iann0036 closed 3 years ago

iann0036 commented 3 years ago

I'm sending an MP4 (codec: avc1.64001f (H.264 High@3.1)) to a KVS stream and attempting to parse its contents using these instructions.

I receive the following error:

java.lang.IllegalArgumentException: Trying to decode an EBML ID and it wants 4 more bytes, but IDs max out at 4 bytes. firstByte was 12

Code ref

Any ideas about what to change to fix this issue?

MushMal commented 3 years ago

Likely your producer has had an issue with the stream. This is a real-time end to end so your application unlike the sample will need to handle cases when the producer session errs out for example when the network pressures happen.

iann0036 commented 3 years ago

I've retried all of the documented steps from scratch many times and received the same error. Is there a more detailed explanation or steps to reproduce the kinesisvideosagemakerintegration_release:V1.0.3 Docker image so I can debug?

MushMal commented 3 years ago

The documentation for the sample doesn’t have the details around the producer and consumer side of error handling.

You could try to configure your stream to have a low bitrate that’s sustainable for upload and the consequent download if on the same device.

Try to capture the debug logs from the producer that might give you some clues.

On the consumer side, you might want to handle these types of exceptions as they will arise on the real-time streaming path

iann0036 commented 3 years ago

I lowered the bitrate on the MP4 I was streaming through via the GStreamer plugin, which solved the EBML issue, but I had all sorts of issues after that (NullPointerException's, ThreadSleepInterrupted etc.). Looks like I got an event through SageMaker -> KDS -> Lambda but I don't really understand why that's not the huge amount I was looking for.

Giving up until a more concrete end-to-end example is provided in the docs.