Bump jackson-databind from 2.13.4.1 to 2.13.4.2 (#178)
Bumps jackson-databind from 2.13.4.1 to 2.13.4.2.
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production …
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Amazon Kinesis Video Streams Parser Library
License
This library is licensed under the Apache 2.0 License.
Introduction
The Amazon Kinesis Video Streams Parser Library for Java enables Java developers to parse the streams returned by
GetMediacalls to Amazon Kinesis Video. It contains:StreamingMkvReaderthat provides an iterative interface to read theMkvElements in a stream.OutputSegmentMergerandFragmentMetadataVisitorbuilt using theStreamingMkvReader.EBMLParserthat minimizes data buffering and copying.StreamingMkvReaderis built on top ofEBMLParserBuilding from Source
After you’ve downloaded the code from GitHub, you can build it using Maven. Use this command:
mvn clean installDetails
StreamingMkvReader
StreamingMkvReaderwhich provides an iterative interface to readMkvElements from a stream. A caller callsnextIfAvailableto get the nextMkvElement. AnMkvElementwrapped in anOptionalis returned if a complete element is available. It buffers an individualMkvElementuntil it can return a completeMkvElement.The
mightHaveNextmethod returns true if there is a chance that additionalMkvElementscan be returned. It returns false when the end of the input stream has been reached.MkvElement
There are three types of
MkvElementvended by aMkvStreamReader:MkvDataElement: This encapsulates Mkv Elements that are not master elements and contain data.MkvStartMasterElement: This represents the start of a master Mkv element that contains child elements. Child elements can be other master elements or data elements.MkvEndMasterElement: This represents the end of master element that contains child elements.MkvElementVisitor
The
MkvElementVisitoris a visitor pattern that helps process the events in theMkvElementhierarchy. It has a visit method for each type ofMkvElement.Visitors
A
GetMediacall to Kinesis Video vends a stream of fragments where each fragment is encapsulated in a Mkv stream containing EBML and Segment elements.OutputSegmentMergercan be used to merge consecutive fragments that share the same EBML and Track data into a single Mkv stream with a shared EBML and Segment. This is useful for passing the output ofGetMediato any downstream processor that expects a single Mkv stream with one Segment. Its use can be seen inOutputSegmentMergerTestFragmentMetadataVisitoris aMkvElementVisitorthat collects the Kinesis Video specific meta-data (such as FragmentNumber and Server Side Timestamp ) for the current fragment being processed. ThegetCurrentFragmentMetadatamethod can be used to get the current fragment’s metadata. SimilarlygetPreviousFragmentMetadatacan be used get the previous fragment’s metadata. ThegetMkvTrackMetadatamethod can be used to get the details of a particular track.ElementSizeAndOffsetVisitoris a visitor that writes out the metadata of the Mkv elements in a stream. For each element the name, offset, header size and data size is written out. The output uses indentation to indicate the hierarchy of master elements and their child elements.ElementSizeAndOffsetVisitoris useful for looking into Mkv streams, where mkvinfo fails.CountVisitoris a visitor that can be used to count the number of Mkv elements of different types in a Mkv stream.CompositeMkvElementVisitoris a visitor that is made up of a number of constituent visitors. It calls accept on the visitedMkvElementfor each constituent visitor in the order in which the visitors are specified.FrameVisitoris a visitor used to process the frames in the output of a GetMedia call. It invokes an implementation of theFrameVisitor.FrameProcessorand provides it with aFrameobject and the metadata of the track to which theFramebelongs.CopyVisitoris a visitor used to copy the raw bytes of the Mkv elements in a stream to an output stream.ResponseStreamConsumers
The
GetMediaResponseStreamConsumeris an abstract class used to consume the output of a GetMedia* call to Kinesis Video in a streaming fashion. It supports a single abstract method called process that is invoked to process the streaming payload of a GetMedia response. The first parameter for process method is the payload inputStream in a GetMediaResult returned by a call to GetMedia. Implementations of the process method of this interface should block until all the data in the inputStream has been processed or the process method decides to stop for some other reason. The second argument is a FragmentMetadataCallback which is invoked at the end of every processed fragment. TheGetMediaResponseStreamConsumerprovides a utility methodprocessWithFragmentEndCallbacksthat can be used by child classes to implement the end of fragment callbacks. The process method can be implemented using a combination of the visitors described earlier.MergedOutputPiper
The
MergedOutputPiperextendsGetMediaResponseStreamConsumerto merge consecutive mkv streams in the output of GetMedia and pipes the merged stream to the stdin of a child process. It is meant to be used to pipe the output of a GetMedia* call to a processing application that can not deal with having multiple consecutive mkv streams. Gstreamer is one such application that requires a merged stream.Example
KinesisVideoExample
KinesisVideoExampleis an example that shows how theStreamingMkvReaderand the different visitors can be integrated with the AWS SDK for the Kinesis Video. This example provides examples forOutputSegmentMerger,FragmentMetadataVisitorvisitors along with a local one as part of the sameCompositeMkvElementVisitorvisitor.KinesisVideoRendererExample
KinesisVideoRendererExampleshows parsing and rendering of KVS video stream fragments using JCodec(http://jcodec.org/) that were ingested using Producer SDK GStreamer sample application.testExampleinKinesisVideoRendererExampleTest. After starting the unitTest you should be able to view the frames in a JFrame.PutMediaWorkerbut also streams sent to Kinesis Video Streams using GStreamer Demo application (https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp)KinesisVideoGStreamerPiperExample
KinesisVideoGStreamerPiperExampleis an example for continuously piping the output of GetMedia calls from a Kinesis Video stream to GStreamer. The testKinesisVideoGStreamerPiperExampleTestprovides an example that pipes the output of a KVS GetMedia call to a Gstreamer pipeline. The Gstreamer pipeline is a toy example that demonstrates that Gstreamer can parse the mkv passed into it.KinesisVideo - Rekognition Examples
Kinesis Video - Rekognition examples demonstrate how to combine Rekognition outputs (JSON) with KinesisVideo Streams output (H264 fragments) and render the frames with overlapping bounding boxes.
KinesisVideoRekognitionIntegrationExample
KinesisVideoRekognitionIntegrationExampledecodes H264 frames and renders them with bounding boxes locally using JFrame. To run the sample, runKinesisVideoRekognitionIntegrationExampleTestwith appropriate inputs.KinesisVideoRekognitionLambdaExample
KinesisVideoRekognitionLambdaExampledecodes H264 frames, overlaps bounding boxes, encodes to H264 frames again and ingests them into a new Kinesis Video streams using Kinesis Video Producer SDK. To run the sample follow the below steps:mvn packagefrom ‘amazon-kinesis-video-streams-parser-library’ folder. Upload ‘./target/amazon-kinesis-video-streams-parser-library-$VERSION-shaded.jar’ file to a S3 bucket.LambdaExampleCFnTemplate.ymlin the github package.Release Notes
Release 1.2.4 (Mar 2022)
Release 1.2.3 (Feb 2022)
Release 1.2.2 (Jan 2022)
Release 1.2.1 (Jan 2022)
Release 1.2.0 (Jan 2022)
Release 1.1.0 (Dec 2021)
Release 1.0.15 (Aug 2020)
OputputSegmentMergerto enable creation of a playable MKV file from a sparse KVS stream.Release 1.0.14 (Aug 2019)
Release 1.0.13 (Apr 2019)
Release 1.0.12 (Mar 2019)
Release 1.0.11 (Mar 2019)
Release 1.0.10 (Feb 2019)
Release 1.0.9 (Jan 2019)
Release 1.0.8 (Dec 2018)
Release 1.0.7 (Sep 2018)
Release 1.0.6 (Sep 2018)
Release 1.0.5 (May 2018)
GetMediaResponseStreamConsumeras an abstract class used to consume the output of a GetMedia* call to Kinesis Video in a streaming fashion. Child classes will use visitors to implement different consumers.MergedOutputPiperextendsGetMediaResponseStreamConsumerto merge consecutive mkv streams in the output of GetMedia and pipes the merged stream to the stdin of a child process.MergedOutputPiper.Release 1.0.4 (April 2018)
KinesisVideoRekognitionIntegrationExample, the decode/renderer sample using JCodec may not be able to decode all mkv files.Release 1.0.3 (Februrary 2018)
KinesisVideoRendererExample, the decode/renderer sample using JCodec may not be able to decode all mkv files.Release 1.0.2 (December 2017)
Release 1.0.1 (November 2017)
Release 1.0.0 (November 2017)
MkvTypeInfosare not readable by the user usingStreamingMkvReader.MkvTypeInfosof unknown length lead to an exception.CRC-32element.