Try conrol-clicking on the file and then clicking on Encode Selected Video Files from the dropdown menu. to create a new file. Then see if the re-encoded new file will play. Your original file will be preserved.
Also, possibly a defective permission is causing an issue with the rendering process when you share out the project from iMovie. Try deleting/resetting preferences. To delete/reset preferences open iMovie while holding down the Option and Command
keys and select to delete preferences in the box that appears. iMovie will open in a new library. Reopen your old library to get back to your projects. Deleting preferences is a safe procedure that will not cause data loss or disruption to your project.
-- Rich