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

How to merge output from getMediaForFragmentList API into a single MKV file #181

Open prugit1 opened 1 year ago

prugit1 commented 1 year ago

I want to retrieve media from KVS for a given time range using getMediaForFragmentList API call. I have gone through this code (https://github.com/aws-samples/amazon-kinesis-video-streams-demos/blob/master/parser-java/kvs-archived-media-retrieval-sample/src/main/java/com/amazonaws/kinesisvideo/KinesisVideoRendererArchivedExample.java) which retrieve data from KVS using getMediaForFragmentList and the result will be displayed locally via JFrame.

Is it possible to merge media output from the above getMediaForFragmentList API call into a single MKV file using OutputSegmentMerger and CompositeMkvElementVisitor. Is there any reference for the same ?

Note: Data from KVS might have different tracks and ebml data.