Troubleshooting
Images not delivered to the Amazon S3 bucket
To troubleshoot this issue, there are a few things to look out for:
-
Missing permissions
-
The image generation configuration is incorrect
-
The tag was not added to the fragment
Missing permissions
If you're using a customer managed KMS key, ensure that the role performing the PutMedia calls (uploader) has the
appropriate encrypt and decrypt permissions, and has access to the Amazon S3 bucket, as follows:
-
kms:Encrypt -
kms:GenerateDataKey -
kms:Decrypt -
s3:PutObject
For more information, see How do I get started with server-side encryption?.
Verify the destination
Use the Amazon CLI to call the DescribeImageGenerationConfiguration API for your stream.
aws kinesisvideo describe-image-generation-configuration \ --stream-name "demo-stream"
Review the DestinationConfig in the response and confirm it looks correct.
Verify that the image generation tag was added to the fragment
-
Check that the
putKinesisVideoEventMetadatacall succeeded.The
putKinesisVideoEventMetadatamethod returns a status code 0 upon success. We recommend checking the return values of the functions for 0. If a non-zero status code is returned, convert it to hex and check the Error code reference for more information.Make sure you have error logs turned on and review the logs for any other errors in the application. Review and compare your application's frame submission call pattern against the recommended implementation: Adding image generation tags to fragments.
-
Verify the locally-generated MKV file
Confirm that the Producer SDK or Sample Application appended the tags correctly.
-
Set the
KVS_DEBUG_DUMP_DATA_FILE_DIRenvironment variable. If this value is set, the Producer SDK writes the media files that it would have sent to Kinesis Video Streams to the specified location.export KVS_DEBUG_DUMP_DATA_FILE_DIR=/path/to/output/directoryNote
The SDK will not create a new directory if the path doesn't exist. Create the folder if necessary.
-
Run the application again. You should see
.mkvfiles getting written to the specified output directory. -
Verify the contents to ensure the tag is present using MKVToolNix, or other software.
-
Install MKVToolNix:
brew install mkvtoolnix -
Run MKVToolNix with one of the
.mkvfiles in the output directory.mkvinfo -v ./path/to/video/file -
Review the MKVToolNix output. If the
KinesisVideoStream::PutFragmentMetadataproducer SDK method was invoked correctly, you should see the following MKV tag.|+ Tags | + Tag | + Simple | + Name: AWS_KINESISVIDEO_IMAGE_GENERATIONNote
The tags belong to the Cluster before it.
-
-
If the MKV tag is not present, ensure that the
KinesisVideoStream::PutEventMetadataproducer SDK method has been called with theSTREAM_EVENT_TYPE_IMAGE_GENERATIONargument, and that it returned a success (0) code.
-