awslabs / amazon-kinesis-video-streams-producer-c

https://awslabs.github.io/amazon-kinesis-video-streams-producer-c/group__PublicMemberFunctions.html
Apache License 2.0
54 stars 72 forks source link

Handling stream errors #153

Closed ronievron closed 3 years ago

ronievron commented 3 years ago

Hi,

Is there a way to resubmit a clip that encountered a stream error on an initial attempt? In the documentation I see a reference to https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/samples/kinesis_video_gstreamer_sample_app.cpp But, this link does not exist. Looking at the c++ gstreamer sample, the stream error handler just terminates the process. The issue that I am facing is that when I send frames with a timestamp older then the most recent accepted frame, I see an error message stating that the timestamp is too old. If I cannot resend old frames, how can I tell what is the time stamp of the most recent frame that was successfully received?

Thanks,

Roni

MushMal commented 3 years ago

Some samples are here: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/tree/master/samples

We have a demo repository which has richer samples: https://github.com/aws-samples/amazon-kinesis-video-streams-demos

To dive deeper. The samples are using what's called Continuous Retry policy which would reset and retry on particular errors. There are errors which are recoverable and some that are not from the perspective of the core. The irrecoverable errors are for example auth errors. Recoverable are issues like networking. The higher-level policy resets the stream and restarts, potentially loosing the buffered data.

There are other class of issues related to media itself:

The two issues just above are normally setup/bringup related and can be debugged and stabilized during the device bringup. Normally, they are related to bad encoder settings or some non-default settings in the KVS. These are not normal for production devices.

Please resolve if you have no further questions regarding this subject

disa6302 commented 3 years ago

Closing based on tag.