When submitting a video to Rekognition, get_text_detection is always returning Timestamp with seconds precision instead of milliseconds. For example:
text_detection: {'Timestamp': 4000, 'TextDetection': {'DetectedText': 'ITV Lunchtime News', 'Type': 'LINE', 'Id': 0, 'Confidence': 99.68327331542969, 'Geometry': {'BoundingBox': {'Width': 0.1505126953125, 'Height': 0.033203125, 'Left': 0.35760498046875, 'Top': 0.0947265625}, 'Polygon': [{'X': 0.35760498046875, 'Y': 0.0947265625}, {'X': 0.50811767578125, 'Y': 0.0947265625}, {'X': 0.50811767578125, 'Y': 0.1279296875}, {'X': 0.35760498046875, 'Y': 0.1279296875}]}}}
Code snippets:
response = self.rekognition.start_text_detection(
Video=self.param_video,
NotificationChannel=self.param_channel,
JobTag=self.job_tag,
Filters=self.param_filters,
)
self.job_id = response["JobId"]
while not finished:
response = self.rekognition.get_text_detection(
JobId=self.job_id, MaxResults=max_results, NextToken=pagination_token
)
for text_detection in response["TextDetections"]:
print(f'text_detection: {text_detection}')
if "NextToken" in response:
pagination_token = response["NextToken"]
else:
finished = True
Looks like a bug to me. But it's weird that I didn't find anyone reporting it before.
So am I doing something wrong?