“Prekog” lambda script to:
-
Do the timing reconciliation (start/end) in the Dynamo DB
-
Put the media files and metadata in the S3 bucket (JSON format for easy representation)
This is a seperate Lambda Function from the "parse" so that it can be run in parallel each time a Rekognition Label that we want to create a Live to VOD asset is desired. Since the time for the end of the archive probably hasn't happened yet, I needed to create a secondary Lambda to continue to poll the database until the event has been satisfied and we get our cat video.
-
start of archive
-
get 1 entry before in DynamoDB
-
check to see if a "Cat" label exists
-
check to see if scenechange confidence within threshold
-
loop until those are met
-
identify timestamp for start of archive
-
-
end of archive
-
get 1 entry after in DynamoDB
-
check to see if a "Cat" label exists
-
check to see if scenechange confidence within threshold
-
loop until those are met
-
identify timestamp for end of archive
-
-
send XML with start/end times to Delta REST
-
parse response to DyanamoDB table for website
DELTA_URL
DELTA_CONTENTNAME
DYNAMO_MAIN = "catfinder5000-main"
DYNAMO_MAIN_GSI = "id_type-id_filename-index"
DYNAMO_LIST = "catfinder5000-list"
DYNAMO_SUMMARY = "catfinder5000-summary"