What codec??
QuickTime Player refuses to play some H.265/HEVC flavors. Currently macOS 11 Big Sur is more forgiving but it still has the following issues with "Codec ID" and "Chroma subsampling" options.
You can check all those pesky details with apps like Invisor (my favorite because it neatly highlights differences when a folder is dropped on it) or MediaInfo.
H.265 Codec ID hvc1 plays OK (as well as H.264 Codec ID avc1).
H.265 Codec ID hev1 has an error message "This file contains media which isn't compatible with QuickTime Player" and plays audio only. There is a lossless fix if you install ffmpeg and add '-tag:v hvc1' without re-encoding in the Terminal:
ffmpeg -i input.mp4 -c copy -tag:v hvc1 output.mp4
Chroma subsampling 4:2:0 (Bit depth 8 bits) plays OK.
Chroma subsampling 4:2:2 (Bit depth 10 bits) has an error message "This file contains media which isn't compatible with QuickTime Player". Opens anyway in Big Sur but fails in Mojave.