IIRC, Safari will only play videos with AAC audio. (Audio files in this format use the extension .m4a)
These details change over time though, so making some test video files with different codecs and attempting playback in Safari will give you up-to-date results.
Play video still not working, i'done
- .mp4 with AAC codec (audio play but not video > black screen).
- .mp4 with Vorbis code (video plays but with no audio).
Tryed on iO11, 12, 13 & 14.