Any modern browser will most likely be able to request a file using the HTTP protocol, packed in the mp4 transport and containing a video compressed with the h264 / aac codec. And even try to lose it.

Contents

Why mp4 streaming does not exist Magical Marketing
Why mp4 streaming does not exist

So what about mp4 streaming?

This is the most convenient, understandable and standard way to play files. The file lies on a disk, nginx gives it. The code that plays mp4 in browsers is good enough. For example, it can even download parts of the video as needed (unlike Flash Player, which downloads the entire video).

Around h264 there was a lot of hype about its "closedness" and "non-freedom" (see also mpvplayer). So there is an “open” alternative that Google is forcing - vp8 and vp9 video codecs packaged in WebM transport. WebM is a subset of the mkv transport (a.k.a. Matryoshka), which is very similar to mp4 in essence, but differs from it in its “binarity”.

It is from here that the legs of such a phenomenon as “mp4 streaming”, which is arranged like WebM, grow. The fact is that in a normal mp4, the size of the entire container is indicated at the very beginning. Therefore, if we want to give a live broadcast over a regular mp4, we will not succeed. And in order to still succeed and be able to create mp4 without a fixed end, the following move was invented: first, mp4 is written without frames, and then at the end fragments with frames are signed in blocks of several seconds. This is called mp4 fragmented, or mp4 streaming.

In fact, this is not streaming at all, but a crutch that allows you to create its appearance. Mp4 is a great format for downloading videos, but not suitable for streaming, so you can just forget about it and never use the term "mp4 streaming".

Summary

  • Good HTML5 streaming options are MPEG-DASH and HLS. They are suitable for mobile devices, and for PCs, and for set-top boxes.
  • The flash will die after all, and MSE is already taking its place.
  • WebRTC is an HTML5 technology primarily for communication, not for television broadcasting: mpvplayer.com
  • Don't bring old codecs to the web and don't try to deliver mp2video and mp2audio over HLS, even if your player can do it.
  • Never say "mp4 streaming". You are welcome.