I don't know if this is the correct exchange site to ask this question. I would like to know what is the difference between mkv and mp4 files?
One thing I have found with video creating/playing software on GNU/Linux is that the MP4 container format can only be replayed once a video is finished while mkv (Matroska) containers will replay even on partially completed files. So at least when using the common Free Software toolchains on GNU/Linux, mkv appears better suited for streaming.
You can use the same codecs either way. WEBM is a subset of Matroska with a restricted list of permissible codecs.