You may want to double-check that the file extension of the video file is compatible with QuickTime.
Sometimes we receive a video file from a friend or co-worker and try how to watch QuickTime videos on Mac, only to be disappointed when it does not play.
You can also download and install a third-party app to play or convert the video file, like VLC Media Player. There are many online free converters you can use, but they may take a long time depending on the video file's size or your network connection speed.
However, the MP4 format can be tricky sometimes.
QuickTime supports MPEG-4 files (MP4, MP3, M4V, M4A), QuickTime movie files (MOV), DV Stream, MPEG-2, Mjpeg, AVI, and some audio files like AIFF, WAV, and AAC. Your QuickTime Player can’t open certain files and requires you to change the file for it to work. If none of the code changes for playing your MP4 worked, you may need to convert the original file to a different type that QuickTime natively recognizes.