Corrupted video files (AWS Lambda, Docker, react js): moov atom not found

Guys the issue was neither with S3 nor with openCV, instead the issue was in the JS code which was uploading the media file to S3.

Basically the video was getting corrupted because of my react client using

new FormData()

to upload to S3.

Referrence