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

"Fragment numbers are invalid" exception

arnamoy10 opened this issue · 1 comments

Hello;

I was trying to get media for a list of fragments (within a specified time range) using the listFragments(). Using the getFragments() and getFragmentNumber() functions, I am able to get a list of fragments successfully with their associated fragment numbers. Then I sort that fragment list numbers by their creation time, and pass it to getMediaForFragmentList() function to save it as a video file.

But it is giving me this exception

com.amazonaws.services.kinesisvideo.model.InvalidArgumentException: Fragment numbers are invalid :

I have two streams for two cameras, but the same approach works for one of the streams, but give error for the other stream. They are both in the same region, also uses the same credentials.

Could you please tell why this might be happening?

I was using the wrong stream name while retrieving the media for the fragments.